question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ios] Standalone apps - Serve the proper js bundle based on publish time

See original GitHub issue

IPA’s always prefer loading the cached js bundle over the embedded one. However, there are cases when this is not correct. For example, if you upload a new IPA with a newer embedded bundle than what is originally cached on a user’s phone, the old cache version will be preferred over the newer embedded version.

Relevant parts from someone experiencing this on forums:

Reproducing issue

For example, I have two builds:

SDK version Build version Embedded JS version
v25.0.0 1.3.9 1.3.9
v27.0.0 1.4.5 1.4.5

Then, do the followings:

  1. Install v1.3.9 in TestFlight
  2. Open it, showing version 1.3.9
  3. Update to app with build version 1.4.5 in TestFlight
  4. Open it, still showing version 1.3.9
    • (which is not even in the same channel, of the same SDK version)
  5. Close app, reopen, showing version 1.4.5
    • (not downloaded remotely because I have set "checkAutomatically": "ON_ERROR_RECOVERY")

Btw, this happens on ios AND android.

Build procedure

I am building a standalone each time with following precedures:

# Publish updates
exp publish --release-channel prod-v4

# Build apps
exp build:ios --release-channel prod-v4 --no-publish  # --no-publish will use the most recent published release
exp build:android --release-channel prod-v4  --no-publish

Investigation direction

Can you guys have a check on the logics of choosing js version in standalones?

The updated standalone may be using the JS cache in local storage, but using embedded JS should be prior to using the JS cache.

Full thread: https://forums.expo.io/t/updating-standalone-always-use-old-js-bundle-at-first-launch/9457/7

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
martsiecommented, Jul 9, 2018

I think our issue was happening because we weren’t incrementing the app version in the app.json (we were only incrementing the build versions for Android and iOS which are required to upload to the stores). Incrementing the app version fixed the issue.

2reactions
martsiecommented, Jul 6, 2018

We’ve had the same issue the last 2 releases using sdk27. Deployed apps are opening with old release versions despite exp:publish:history --platform android showing the most recent build. Maybe it’s due to having different release channels for different platforms - we’re going to try not using release channels for our next build to hopefully fix it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Preparing your app for distribution - Apple Developer
Provide all the required information about your app—such as a unique bundle ID, build string, app icon, and launch screen.
Read more >
Building Standalone Apps - Expo Documentation
Classic Build service allows you to create standalone binaries for the Expo app using the Expo CLI. You can use that binary to...
Read more >
main.jsbundle does not exist. this must be a bug with + echo ...
Open Xcode and navigate to "Build Phase" under "Copy Bundle Resource" add "main. jsbundle" file. Clean your project also clear your derived ...
Read more >
Publish your PWA to the iOS App Store
Publish your Progressive Web Apps (PWAs) to the iOS App Store using ... By default, we populate these based on your PWA's web...
Read more >
Get started with Firebase Hosting - Google
Catch up on everything announced at Firebase Summit, and learn how Firebase can help you accelerate app development and run your app with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found