How do you enable publishing new versions?


#1

Is it enough to set the loadJSInBackgroundExperimental flag to true in order to get updates pushed automatically? If so, I am not seeing them.

Or do you need to do that as well as call Util.reload()?


#2

hi @ericmorgan1, for a standalone apps setting the loadJSInBackgroundExperimental to true should be sufficient. A couple questions:

  1. You are publishing your project in Expo, and it is not updating? (ie) pressing publish in XDE or running exp publish https://docs.expo.io/versions/latest/guides/publishing.html
  2. Are you running a standalone app, or testing from the Expo client mobile app?

One thing to make sure is that the SDK version on your standalone app is compatible with the SDK Version you are publishing. https://docs.expo.io/versions/latest/guides/advanced-release-channels.html#what-version-of-the-app-will-my-users-get


#3

Hi @quinlanj,

Thank you for the reply.

  1. Yes, I am publishing by clicking “Publish” in XDE.

  2. I have a standalone app published in the Apple App Store. None of the published changes appear in the standalone App Store app. However, when I use the Expo mobile app, my changes DO appear there.

I don’t think it is an issue with the SDK version being different. I just used Expo to build a new version yesterday and it was published to the App Store this morning. Then, I tried publishing a small change and it does not appear in the standalone version (but does appear in the Expo mobile app version).

Thank you.


#4

Hey @ericmorgan1

Is your standalone app built with loadJSInBackgroundExperimental? The default behavior is to fetch the js experience right away. The flag you set enables fetching to happen in the background instead – it is experimental and if this flag is enabled, it could be a bug.

Also, just to make sure – im assuming you have not explicitly set isRemoteJsEnabled flag in app.json to false.
https://docs.expo.io/versions/latest/guides/configuration.html#isremotejsenabled


#5

Hi @quinlanj,

Yes, I believe it is built with that flag set to true.
I have it in my app.json and used exp build:ios to build the app.

I don’t have isRemoteJsEnabled in my app.json file. It says the default is true, but do I need to have it?
The only settings in my ios node of app.json are bundleIdentifier, supportsTablet, and loadJSInBackgroundExperimental.


#6

hi @ericmorgan1

  1. Ok, this might be a bug with loadJSInBackgroundExperimental. Your observation that the updates work in the Expo Client (which isnt standalone so the app is eagerly updated), but not in your standalone suggest this is a problem with the loadJSInBackgroundExperimental feature.

  2. You dont need to set any additional flags – i just wanted to make sure you didnt disable OTA updates (which setting isRemoteJsEnabled to false would do)

To unblock yourself, if you get rid of the loadJSInBackgroundExperimental flag, it should enable OTA updates by eagerly grabbing the most recent updates. If you’ve got some reproducible steps (or can make a reproducible toy project), please do create a github issue so we can root cause this: https://github.com/expo/expo/issues. Thanks!


#7

@quinlanj

Ok, thank you. So just removing the flag will still allow published updates to be sent to the standalone app?

I will attempt to make a project to reproduce this and post it as an issue on github.


#8

Hey @ericmorgan1 - how the loadJSInBackgroundExperimental flag should work is that the first time the app is launched after an update is published, the app will run the old (cached) version while fetching the new one in the background.

You can verify it’s working as expected by publishing an update, opening the app (and seeing the old version), then swiping closed and re-opening the app. At that point, you should see the newest published version. If that is not working, then it is a bug in the loadJSInBackgroundExperimental code. However, if that works and you just want the update to be applied immediately after publishing, then removing that flag will give you the behavior you want.

Note that we’ll be deprecating that flag in SDK 26 and giving you a different set of configuration options in app.json to allow a bit more customization (and removing the “experimental” tag). So depending on the behavior you want, it may be best to just wait until then and try out the new options.

Hope that helps!


#9

Hi @esamelson

Thanks for the info.
Yes, the behavior you described is not working for me.
However, given what you and @quinlanj have told me, and that it will be deprecated soon, I think I’ll just try removing the flag. Thank you!


closed #10

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.