Using Expo and working with RN last half year. It is a great product set and actually I’ve already published with it.
I’ve followed all steps for caching of assets, made my build according to instructions (exp cli) and actually got all resources cached well.
However I can’t figure out how to make application not crash if there is no network and bundled JS can’t be updated.
Even after couple of re-starts, I found that if network is off, application will fail to start as it looks for bundle script on cloudfront.net.
Here is the log from logcat:
01-10 01:19:13.157 29005-29870/? E/b: Couldn’t preload bundle: java.net.UnknownHostException: Unable to resolve host “d1wp6m56sqw74a.cloudfront.net”: No address associated with hostname
Anybody has any experience with this please?
Oh I’ve forgotten such important fact as the one that Expo supports OTA updates.
In the meantime I’ve played with JS and managed to find older code that comparison algoirithm of engine has no issues with. This effectively enabled me to get back on right track in terms of rolling out necessary updates but avoiding offline work issues.
So in case that someone is still looking into this, it seems that when I over-complicated my JS with base64 resource strings, engine was always trying to download most recent version and failed with error when offline.
In other words, there is still likely a bug as application shouldn’t fail if it is unable to access network for latest bundled JS. At least that is what documentation is stating (https://docs.expo.io/versions/latest/guides/offline-support.html).
hi @mpalos, could you list the steps you took to cause the application to fail (ie) 1. publish app, 2. open app in expo client, 3. publish app again, 4. see the crash
afaik, we are working on allowing apps to work with no internet connection but the feature is not fully complete yet. https://expo.canny.io/feature-requests/p/allow-standalone-apps-to-load-and-function-with-no-internet-connection
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.