react-native-threads
react-native-threads copied to clipboard
[Android] Release mode is calling for .bundle instead of .jsbundle
Crash java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unable to load script from assets 'threads/pre-load-data-worker.thread.bundle'. Make sure your bundle is packaged correctly or you're running a packager server.
You're right!
The issue is here: https://github.com/joltup/react-native-threads/blob/master/android/src/main/java/com/reactlibrary/RNThreadModule.java#L182
We need up update the code to look for a .jsbundle
suffix rather than a .bundle
suffix
@Traviskn I was planing on using background threads and sharing them across multiple screens/activities, this seems like good project being inspired from the earlier two which are no longer maintained.
Coning to the issue, is changing .bundle
to .jsbundle
only change needed for this to work?
If that is the case I would be haapy to raise a PR, otherwise too let me know how can I help here.
yep that's the only change. I found that in our app we're just generating a .bundle
file for android and a .jsbundle
for iOS, but it would definitely be nice to make that more consistent
This and the fact that the README states that the bundle should be generated with a .jsbundle
is probably confusing a lot of newcomers who wouldn't have the reflex to look at the logcat. Is there a reason it is still not fixed (backwards compatibility ?) or is it just noone did a PR.
If it is just a PR, I can make one.