Background JS loading not behaving as expected in SDK 25, leading to slow app launch
See original GitHub issueI have a production app built with sdk 24 (I’m not upgrading to sdk 25 since the startup of the app is much slower with that) with loadJSInBackgroundExperimental enabled. I also have following in my app.json
"assetBundlePatterns": [
"assets/fonts/*",
"node_modules/@expo/vector-icons/fonts/*"
],
which is supposed to bundle everything I have inside the app.
The issue is that at the first start with a slow internet connection app is stuck at loading screen until it loads all of the assets or js bundle (not sure which).
I also get following error in Sentry:
Error: Could not download from 'https://d1wp6m56sqw74a.cloudfront.net/~assets/d2285965fe34b05465047401b8595dd0'
at None (app:///main.ios.bundle:18:806)
at None (app:///main.ios.bundle:18:860)
at value (app:///main.ios.bundle:20:3368)
at None (app:///main.ios.bundle:20:1141)
at value (app:///main.ios.bundle:20:2507)
...
(1 additional frame(s) were not displayed)
I’m pretty sure it used to be working for me because I tested it with Charles proxy.
Is there any way to disable loading assets and js bundle at all to make sure first app start (which can be last in case someone has to wait for THAT long) takes reasonable time or at least doesn’t depend on Expo backend? That would be the only real solution I see.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
This affects both iOS and Android and not only the first launch. Second and further launches have two “blocking” facebook and exp.host calls (up to 5 seconds combined).
Hey everyone who was taking a look at this thread - can you try with SDK 26? We redid the way the app fetches updates.
We didn’t pay special attention to requests made by our third party libs like Facebook. It’s possible you’ll still see network traffic from those. Let us know if it seems to be adversely affecting your app launch.