JS bundle regresses to the one bundled with the app, if no connection

#1

When failing to load updated JS bundle on slow connection, app regresses to the very first JS bundled and gets stuck with that JS version before the next exp publish.

Example: binary was released with JS v1, then new code was pushed several times and new JS is v30. User has problem downloading JS v31, the app is stuck with JS v1, before the next JS update.

Is there a way to load the last successfully downloaded version of the JS bundle instead?

1 Like
#2

Hi @andrey - really sorry you’re experiencing this, this is definitely not the intended behavior. Could you post your app.json, and also, which platform is this happening on? Finally, could you go into a bit more detail about what happens when loading the bundle fails? Does it try to download and wait a while before timing out and falling back to the older version?

#3

Hi @esamelson, thanks for your reply. Yeah, it shows splash screen, waits till timeout, then loads the older version. Happens on iOS, haven’t checked Android yet.

{
  "expo": {
    "name": "",
    "description": "",
    "slug": "",
    "privacy": "public",
    "sdkVersion": "28.0.0",
    "platforms": ["ios", "android"],
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/images/icon.png",
    "splash": {
      "image": "./assets/images/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 15000
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "",
      "buildNumber": "2",
      "config": {
        "usesNonExemptEncryption": false
      }
    },
    "android": {
      "package": "",
      "versionCode": 2,
      "permissions": [
        "READ_PHONE_STATE",
        "RECORD_AUDIO",
        "VIBRATE",
        "com.anddoes.launcher.permission.UPDATE_COUNT",
        "com.android.launcher.permission.INSTALL_SHORTCUT",
        "com.google.android.c2dm.permission.RECEIVE",
        "com.google.android.gms.permission.ACTIVITY_RECOGNITION",
        "com.google.android.providers.gsf.permission.READ_GSERVICES",
        "com.htc.launcher.permission.READ_SETTINGS",
        "com.htc.launcher.permission.UPDATE_SHORTCUT",
        "com.majeur.launcher.permission.UPDATE_BADGE",
        "com.sec.android.provider.badge.permission.READ",
        "com.sec.android.provider.badge.permission.WRITE",
        "com.sonyericsson.home.permission.BROADCAST_BADGE"
      ]
    },
    "androidStatusBar": {
      "barStyle": "light-content",
      "backgroundColor": "#999999"
    }
  }
}
#4

Hi @andrey - thanks very much for reporting this. We’ve been able to repro – it seems like it only happens intermittently when there is an error in the middle of downloading a new version. We’re working on a fix and hope to have it ready soon.

#5

Awesome, thanks!

#6

Hey @andrey - sorry for the slow update here. I’ve landed a fix internally for this which will go out at the time of our next release, SDK 29. This should be soon – hopefully within the next week. You can watch our blog as we will announce there when it’s out.

Thanks again for reporting this; we really appreciate it!

2 Likes
#7

Awesome, Thank you!

closed #8

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