Comments (9)
sorry I should have noted this is running on my iPad
from react-native-threads.
ps. I also verified that log message does indeed come from the ThreadManager.m:24
from react-native-threads.
Think I found the problem... In RCTBundleURLProvider.m:
- (NSURL *)jsBundleURLForBundleRoot:(NSString *)bundleRoot fallbackResource:(NSString *)resourceName
{
resourceName = resourceName ?: @"main";
NSString *packagerServerHost = [self packagerServerHost];
if (!packagerServerHost) {
return [[NSBundle mainBundle] URLForResource:resourceName withExtension:@"jsbundle"];
} else {
NSString *path = [NSString stringWithFormat:@"/%@.bundle", bundleRoot];
// When we support only iOS 8 and above, use queryItems for a better API.
NSString *query = [NSString stringWithFormat:@"platform=ios&dev=%@&minify=%@",
[self enableDev] ? @"true" : @"false",
[self enableMinification] ? @"true": @"false"];
return [[self class] resourceURLForResourcePath:path packagerHost:packagerServerHost query:query];
}
}
That bit of code will default to 'main.jsbundle' if there is no packagerServerHost. Not sure how this would ever work for release/production for the thread bundle?
(this is running "react-native": "0.49.1")
from react-native-threads.
oh wait... it just means the ThreadManager needs to pass the thread name along as the fallbackResource? Let me try that
from react-native-threads.
Ok getting somewhere..
1- needed to change the production script to --bundle-output ./ios/navigator.jsbundle
2- needed to edit the ThreadManager to pass the name of the thread to the fallbackResource
That now at least tries to load the correct bundle!
(but it now crashes with EXC_BAD_ACCESS on RCTImageLoader - no idea if that is related or not)
from react-native-threads.
That exception appears to be a red herring... refreshing did the trick.
I'll see if I can put together a PR for the ThreadManager
from react-native-threads.
@jliebrand Thanks for figuring all this out! You're right, the wrong file gets loaded in release mode 🙈 I'll go over your PR's now
from react-native-threads.
fixes are merged! thanks again for the help
from react-native-threads.
NP
from react-native-threads.
Related Issues (20)
- Unable to run react native app after ejecting from expo: error: constructor DevSettingsModule in class DevSettingsModule cannot be applied to given types; new DevSettingsModule(catalystApplicationContext, reactInstanceManager.getDevSupportManager())
- Main thread not receiving message HOT 2
- Multiple threads PROD environment
- Understanding HOT 1
- I don't think it works on 0.63 iOS HOT 3
- Error: Unable to resolve module `./worker.thread` from ``: HOT 5
- Invariant Violation: Native module cannot be null. IOS
- Worker thread has much slower performance HOT 4
- Using main bundle instead of thread bundle in iOS release mode (react-native 0.68.1) HOT 2
- Release mode build phase Xcode HOT 1
- [Delete me]
- Can't get message in thread.js on Android HOT 2
- Support new architecture
- Android App Crash
- ThreadManager.m uses `jsBundleURLForBundleRoot:fallbackResource`, which no longer exists in RN 68 HOT 2
- -
- Unable to connect to thread in ios release mode HOT 1
- [EXPO] Its possibility ability on expo?
- RN 69 is no longer auto-linking this module on iOS due to pod issues HOT 3
- Any guidance on using this library with version 0.70? HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-threads.