Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tm-android): TM SyncVoidKind methods throws JSError #40788

Conversation

krystofwoldrich
Copy link
Contributor

Summary:

Other RM Sync method calls do return JSError with the throwable information.

Changelog:

[ANDROID] [ADDED] - TM SyncVoidKind methods throws JSError

Test Plan:

Output of caught error console.log(e, e.stack, e.cause);

 LOG  [Error: Exception in HostFunction: Intentional exception from JVM voidFuncThrows] Error: Exception in HostFunction: Intentional exception from JVM voidFuncThrows
    at voidFuncThrows (native)
    at voidFuncThrows (http://10.0.2.2:8081/js/examples/TurboModule/SampleTurboModuleExample.bundle//&platform=android&lazy=true&app=com.facebook.react.uiapp&modulesOnly=true&dev=true&minify=false&runModule=true&shallow=true:100:127)
    at onPress (http://10.0.2.2:8081/js/examples/TurboModule/SampleTurboModuleExample.bundle//&platform=android&lazy=true&app=com.facebook.react.uiapp&modulesOnly=true&dev=true&minify=false&runModule=true&shallow=true:235:71)
    at _performTransitionSideEffects (http://10.0.2.2:8081/js/RNTesterApp.android.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:67991:22)
    at _receiveSignal (http://10.0.2.2:8081/js/RNTesterApp.android.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:67941:45)
    at onResponderRelease (http://10.0.2.2:8081/js/RNTesterApp.android.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:67784:34)
    at apply (native)
    at invokeGuardedCallbackProd (http://10.0.2.2:8081/js/RNTesterApp.android.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:4727:21)
    at apply (native)
    at invokeGuardedCallback (http://10.0.2.2:8081/js/RNTesterApp.android.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:4903:42)
    at apply (native)
    at invokeGuardedCallbackAndCatchFirstError (http://10.0.2.2:8081/js/RNTesterApp.android.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:4917:36)
    at executeDispatch (http://10.0.2.2:8081/js/RNTesterApp.android.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:4994:48)
    at executeDispatchesInOrder (http://10.0.2.2:8081/js/RNTesterApp.android.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:5016:26)
    at executeDispatchesAndRelease (http://10.0.2.2:8081/js/RNTesterApp.android.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:7640:35)
    at executeDispatchesAndReleaseTopLevel (http://10.0.2.2:8081/js/RNTesterApp.android.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:7647:43)
    at forEach (native)
    at forEachAccumulated (http://10.0.2.2:8081/js/RNTesterApp.android.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:5610:22)
    at runEventsInBatch (http://10.0.2.2:8081/js/RNTesterApp.android.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:7660:27)
    at runExtractedPluginEventsInBatch (http://10.0.2.2:8081/js/RNTesterApp.android.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:7693:25)
    at anonymous (http://10.0.2.2:8081/js/RNTesterApp.android.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:7734:42)
    at batchedUpdates$1 (http://10.0.2.2:8081/js/RNTesterApp.android.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:20049:20)
    at batchedUpdates (http://10.0.2.2:8081/js/RNTesterApp.android.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:7616:36)
    at dispatchEvent (http://10.0.2.2:8081/js/RNTesterApp.android.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:7705:23)
{"message": "Intentional exception from JVM voidFuncThrows", "name": "java.lang.RuntimeException", "stackElements": [{"className": "com.facebook.fbreact.specs.SampleTurboModule", "fileName": "SampleTurboModule.java", "lineNumber": 186, "methodName": "voidFuncThrows"}, {"className": "com.facebook.jni.NativeRunnable", "fileName": "NativeRunnable.java", "lineNumber": -2, "methodName": "run"}, {"className": "android.os.Handler", "fileName": "Handler.java", "lineNumber": 958, "methodName": "handleCallback"}, {"className": "android.os.Handler", "fileName": "Handler.java", "lineNumber": 99, "methodName": "dispatchMessage"}, {"className": "com.facebook.react.bridge.queue.MessageQueueThreadHandler", "fileName": "MessageQueueThreadHandler.java", "lineNumber": 27, "methodName": "dispatchMessage"}, {"className": "android.os.Looper", "fileName": "Looper.java", "lineNumber": 205, "methodName": "loopOnce"}, {"className": "android.os.Looper", "fileName": "Looper.java", "lineNumber": 294, "methodName": "loop"}, {"className": "com.facebook.react.bridge.queue.MessageQueueThreadImpl$4", "fileName": "MessageQueueThreadImpl.java", "lineNumber": 234, "methodName": "run"}, {"className": "java.lang.Thread", "fileName": "Thread.java", "lineNumber": 1012, "methodName": "run"}]}

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Sentry Partner: Sentry Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Oct 11, 2023
@github-actions
Copy link

Warnings
⚠️

Can't find the E2E test log for ci/circleci: test_e2e_ios. Job link

⚠️

Can't find the E2E test log for ci/circleci: test_e2e_ios. Job link

Generated by 🚫 dangerJS against 8548657

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 17,218,453 +8
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 20,586,932 +3
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 8b88883
Branch: main

@javache javache requested a review from philIip October 11, 2023 11:16
@facebook-github-bot
Copy link
Contributor

@javache has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@javache
Copy link
Member

javache commented Oct 11, 2023

Wow, short turn-around time on @philIip's recent changes!

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Oct 11, 2023
@facebook-github-bot
Copy link
Contributor

@javache merged this pull request in cd78e39.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. p: Sentry Partner: Sentry Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants