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.

OTA updates are not working in production when connected to wifi

See original GitHub issue

šŸ› Bug Report

Environment

Expo CLI 3.13.1 environment info: System: OS: macOS 10.15.2 Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.6.0 - /usr/local/bin/node Yarn: 1.17.3 - /usr/local/bin/yarn npm: 6.9.0 - /usr/local/bin/npm IDEs: Android Studio: 3.5 AI-191.8026.42.35.5900203 Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild npmPackages: expo: ^36.0.0 => 36.0.2 react: 16.9.0 => 16.9.0 react-native: https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz => 0.61.4 react-navigation: ^4.0.10 => 4.0.10

Taregets: iOS, Android

Steps to Reproduce

Not much to this issue to be reproduced, 1- Run expo publish 2- Restart app while connected to WiFi 3- Expo.Updates throws an error

Expected Behavior

OTA updates to be downloaded while on WiFi

Actual Behavior

OTA updates are not being downloaded

Reproducible Demo

https://github.com/SamyOptimize/demo2

It won’t throw the correct error if it was used on a simulator or during development mode, I had to build an apk and download it to my phone and that’s when i get the error at the bottom.

Haven’t tried it on a built .ipa yet but i’m guessing it’s for a related reason because i can’t get the OTA updates to download on our own production app.

OTA updates in an ejected app are not being downloaded in production apps when it’s connected to a WiFi connection, it works fine if the phone is only using its own mobile data.

Logging the error for the Updates module for android from our own production app returns this:

{
  "framesToPop": 1,
  "nativeStackAndroid": [
    {
      "methodName": "onFailure",
      "lineNumber": 1,
      "file": "ExponentManifest.java",
      "class": "host.exp.exponent.g$b"
    },
    {
      "methodName": "a",
      "lineNumber": 34,
      "file": "ExponentHttpClient.java",
      "class": "host.exp.exponent.s.e"
    },
    {
      "methodName": "a",
      "lineNumber": 1,
      "file": "ExponentHttpClient.java",
      "class": "host.exp.exponent.s.e"
    },
    {
      "methodName": "onResponse",
      "lineNumber": 4,
      "file": "ExponentHttpClient.java",
      "class": "host.exp.exponent.s.e$d"
    },
    {
      "methodName": "execute",
      "lineNumber": 5,
      "file": "RealCall.java",
      "class": "okhttp3.RealCall$AsyncCall"
    },
    {
      "methodName": "run",
      "lineNumber": 3,
      "file": "NamedRunnable.java",
      "class": "okhttp3.internal.NamedRunnable"
    },
    {
      "methodName": "processTask",
      "lineNumber": 1187,
      "file": "ThreadPoolExecutor.java",
      "class": "java.util.concurrent.ThreadPoolExecutor"
    },
    {
      "methodName": "runWorker",
      "lineNumber": 1152,
      "file": "ThreadPoolExecutor.java",
      "class": "java.util.concurrent.ThreadPoolExecutor"
    },
    {
      "methodName": "run",
      "lineNumber": 641,
      "file": "ThreadPoolExecutor.java",
      "class": "java.util.concurrent.ThreadPoolExecutor$Worker"
    },
    {
      "methodName": "run",
      "lineNumber": 784,
      "file": "Thread.java",
      "class": "java.lang.Thread"
    }
  ],
  "userInfo": null,
  "message": null,
  "code": "E_FETCH_MANIFEST_FAILED",
  "line": 20,
  "column": 1111,
  "sourceURL": "/data/user/0/com.optimizeapp.optimizeapp/files/36.0.0/cached-bundle-experience-%40samyoptimize%2Foptimize_app-1658896835-36.0.0"
}

and for our own production app on iOS returns this"

{
  "framesToPop": 1,
  "code": "E_CHECK_UPDATE_FAILED",
  "message": "The request timed out.",
  "domain": "EXNetwork",
  "userInfo": {
    "_kCFStreamErrorDomainKey": 4,
    "NSErrorFailingURLKey": null,
    "_kCFStreamErrorCodeKey": -2102,
    "NSErrorFailingURLStringKey": "http://exp.host/@samyoptimize/optimize_app",
    "NSLocalizedDescription": "The request timed out.",
    "NSUnderlyingError": {
      "code": "-1001",
      "message": "underlying error",
      "domain": "kCFErrorDomainCFNetwork",
      "userInfo": {
        "_kCFStreamErrorDomainKey": 4,
        "_kCFStreamErrorCodeKey": -2102
      },
      "nativeStackIOS": [
        "0   optimizeapp                         0x000000010514d5bc _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 518316",
        "1   optimizeapp                         0x000000010514d7a8 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 518808",
        "2   optimizeapp                         0x0000000105112718 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 277000",
        "3   optimizeapp                         0x00000001050396b8 optimizeapp + 890552",
        "4   optimizeapp                         0x000000010500b910 optimizeapp + 702736",
        "5   optimizeapp                         0x0000000105012268 optimizeapp + 729704",
        "6   CFNetwork                           0x00000001c07b9be4 CFNetServiceBrowserSearchForServices + 93664",
        "7   CFNetwork                           0x00000001c07ca6f4 _CFHTTPMessageSetResponseProxyURL + 9540",
        "8   Foundation                          0x00000001bd92b410 503900AF-2ECD-329F-B742-C07C3E672BEB + 1131536",
        "9   Foundation                          0x00000001bd835138 503900AF-2ECD-329F-B742-C07C3E672BEB + 123192",
        "10  Foundation                          0x00000001bd92d698 503900AF-2ECD-329F-B742-C07C3E672BEB + 1140376",
        "11  Foundation                          0x00000001bd834dd0 503900AF-2ECD-329F-B742-C07C3E672BEB + 122320",
        "12  Foundation                          0x00000001bd92e090 503900AF-2ECD-329F-B742-C07C3E672BEB + 1142928",
        "13  Foundation                          0x00000001bd92db5c 503900AF-2ECD-329F-B742-C07C3E672BEB + 1141596",
        "14  libdispatch.dylib                   0x00000001bd216998 A3849F96-1C9F-36C5-A15F-70C566F14CFF + 260504",
        "15  libdispatch.dylib                   0x00000001bd233184 A3849F96-1C9F-36C5-A15F-70C566F14CFF + 377220",
        "16  libdispatch.dylib                   0x00000001bd20ce8c A3849F96-1C9F-36C5-A15F-70C566F14CFF + 220812",
        "17  libdispatch.dylib                   0x00000001bd20c600 A3849F96-1C9F-36C5-A15F-70C566F14CFF + 218624",
        "18  libdispatch.dylib                   0x00000001bd219110 A3849F96-1C9F-36C5-A15F-70C566F14CFF + 270608",
        "19  libdispatch.dylib                   0x00000001bd2198b0 A3849F96-1C9F-36C5-A15F-70C566F14CFF + 272560",
        "20  libsystem_pthread.dylib             0x00000001bd282b48 _pthread_wqthread + 212",
        "21  libsystem_pthread.dylib             0x00000001bd285760 start_wqthread + 8"
      ]
    },
    "errorCode": "NETWORK_ERROR"
  },
  "nativeStackIOS": [
    "0   optimizeapp                         0x000000010514d5bc _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 518316",
    "1   optimizeapp                         0x0000000105112718 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 277000",
    "2   optimizeapp                         0x00000001050396b8 optimizeapp + 890552",
    "3   optimizeapp                         0x000000010500b910 optimizeapp + 702736",
    "4   optimizeapp                         0x0000000105012268 optimizeapp + 729704",
    "5   CFNetwork                           0x00000001c07b9be4 CFNetServiceBrowserSearchForServices + 93664",
    "6   CFNetwork                           0x00000001c07ca6f4 _CFHTTPMessageSetResponseProxyURL + 9540",
    "7   Foundation                          0x00000001bd92b410 503900AF-2ECD-329F-B742-C07C3E672BEB + 1131536",
    "8   Foundation                          0x00000001bd835138 503900AF-2ECD-329F-B742-C07C3E672BEB + 123192",
    "9   Foundation                          0x00000001bd92d698 503900AF-2ECD-329F-B742-C07C3E672BEB + 1140376",
    "10  Foundation                          0x00000001bd834dd0 503900AF-2ECD-329F-B742-C07C3E672BEB + 122320",
    "11  Foundation                          0x00000001bd92e090 503900AF-2ECD-329F-B742-C07C3E672BEB + 1142928",
    "12  Foundation                          0x00000001bd92db5c 503900AF-2ECD-329F-B742-C07C3E672BEB + 1141596",
    "13  libdispatch.dylib                   0x00000001bd216998 A3849F96-1C9F-36C5-A15F-70C566F14CFF + 260504",
    "14  libdispatch.dylib                   0x00000001bd233184 A3849F96-1C9F-36C5-A15F-70C566F14CFF + 377220",
    "15  libdispatch.dylib                   0x00000001bd20ce8c A3849F96-1C9F-36C5-A15F-70C566F14CFF + 220812",
    "16  libdispatch.dylib                   0x00000001bd20c600 A3849F96-1C9F-36C5-A15F-70C566F14CFF + 218624",
    "17  libdispatch.dylib                   0x00000001bd219110 A3849F96-1C9F-36C5-A15F-70C566F14CFF + 270608",
    "18  libdispatch.dylib                   0x00000001bd2198b0 A3849F96-1C9F-36C5-A15F-70C566F14CFF + 272560",
    "19  libsystem_pthread.dylib             0x00000001bd282b48 _pthread_wqthread + 212",
    "20  libsystem_pthread.dylib             0x00000001bd285760 start_wqthread + 8"
  ],
  "line": 22,
  "column": 1111,
  "sourceURL": "https://d1wp6m56sqw74a.cloudfront.net/%40samyoptimize%2Foptimize_app%2F0.3.230%2F278a8fa7d16012311a7d603043396d22-36.0.0-ios.js"
}

Had a similar issue with the WiFi problem a while back https://forums.expo.io/t/expokit-apks-for-android-crash-when-opening/34344 Which was fixed based on this github issue https://github.com/expo/expo/issues/7304 so i’m not sure if it has to do with expo’s servers again

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mskgcommented, Mar 23, 2020

I’ve tried using your example code and the steps you listed out above, but I still can’t reproduce the error šŸ™

I also can’t reproduce that.

0reactions
cruzachcommented, Mar 26, 2020

That’s fine, you’ll still have the option to host updates from your own server in the bare workflow

Going to close this since it seems like it’s not a bug with Expo

Read more comments on GitHub >

github_iconTop Results From Across the Web

OTA updates are not working in production ... - Expo Forums
OTA updates in an ejected app are not being downloaded in production apps when it's connected to a WiFi connection, it works fine...
Read more >
Troubleshooting Poor Connectivity Issues & OTA - Particle docs
Troubleshooting Poor Connectivity Issues & OTA. The guide looks at certain issues and solutions for Poor Connectivity and OTA failures.
Read more >
what's the problem with Android OTA updates and how to fix it?
If the update is not received, the device drops from the list, and subsequent repeated clicking on the button 'check for updates' automatically...
Read more >
OTA Updates for Remote Devices: Methods Explained - JFrog
OTA updates can be deployed through the internet, a local network (router), a dedicated gateway device or even it can be deployed by...
Read more >
OTA update problem with cc3200 - Wi-Fi forum - TI E2E
Can you tell me if any errors or any issues with current SDK OTA files. As We are going to mass production mode...
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