-
Notifications
You must be signed in to change notification settings - Fork 32
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
Android: app crash when using workers #262
Comments
@silviudeacyour test application is working as expected on my side - no crash and the worker is doing its job when executed. Is the issue happening on a specific device/API level (I've tested on emulator API28) ? |
I tried replicating by running from CLI and to my surprise it does not replicate:
The crash happens only when running using Visual Studio Code by using the 'Launch on Android' configuration:
Alternatively I have also replicated this by running from CLI and attaching the Visual Studio Code debugger afterwards, so it is somehow related to that though interestingly happening only on Android. |
@silviudeac ok it seems that debugging a worker is broken - thanks for reporting that one. Moving the issue to the VScode repo. |
I am facing the same issue. My app i using workers. I can't debug it with VSCode |
news? |
Environment
Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):Describe the bug
Using Workers on Android causes the application to crash.
The stack trace seems to indicate that the crash originates in the android-runtime:
Click to expand
adb logcat
To Reproduce
I have uploaded a sample project.
The crash occurs whenever a message is posted from the main thread to the worker outside the constructor. It is interesting that this does not replicate when posting from the constructor, but at a later date.
I have slightly modified the demo from worker-loader to reproduce the issue when tapping the button.
Expected behavior
Application should not crash and worker onMessage method should execute to completion.
Sample project
worker-loader.zip
The text was updated successfully, but these errors were encountered: