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.

Expo v31 Android release build would not load JS bundle ( iOS build works on both debug and release configs)

See original GitHub issue

Environment

Expo CLI 2.6.14 environment info: System: OS: macOS 10.14.2 Shell: 5.3 - /bin/zsh Binaries: Node: 8.11.4 - /usr/local/bin/node Yarn: 1.9.4 - /usr/local/bin/yarn npm: 5.6.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman IDEs: Android Studio: 3.2 AI-181.5540.7.32.5056338 Xcode: 10.1/10B61 - /usr/bin/xcodebuild npmPackages: @storybook/react-native: ^3.2.5 => 3.4.11 expo: ^31.0.4 => 31.0.6 react: 16.5.0 => 16.5.0 react-native: https://github.com/expo/react-native/archive/sdk-31.0.1.tar.gz => 0.57.1 react-navigation: v1.0.0-beta.26 => 1.0.0-beta.26 npmGlobalPackages: expo-cli: 2.6.14

Steps to Reproduce

We have detached version of app that uses Expo v31.0.0. In iOS App works fine. (Both debug and release versions). But in Android, only debug version works. When we try to run a release build, App woudln’t load. Apparently the JS bundle is not loading. We have correctly set up release-config.

(Write your steps here:)

  1. Published JS bundle usingexp publishcommand (we tried expo publish too)
  2. Created an APK and launched on an Android device.

Expected Behavior

App should load.

(Write what you thought would happen.)

Actual Behavior

Only splash screen loads, then this error pops up.

image

Any idea why ?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:14
  • Comments:32 (5 by maintainers)

github_iconTop GitHub Comments

7reactions
Supun94commented, Jan 23, 2019

I’m having the same issue after upgrading to EXPO 31. Seems like this is a know issue without any exact solution and I also tried EXPO 32 as well.

Changed PUBLISHED_URL after completed expo publish, I have updated expo-cli version to 2.6.14 but nothing works for me. Couldn’t find proper solution for this issue. It would be a great help to get an input from expo contributors to fix this issue.

CC: @terribleben @brentvatne @ide @sjchmiela

3reactions
disappearercommented, Jul 5, 2019

Problem, in my case is that publishedUrl() method in MainActivity.java was returning the wrong value. I was previously logged in as another user, so it was most likely a leftover from that time. Not really sure.

  public String publishedUrl() {
    return "exp://exp.host/@wrong_user/project";
  }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Android failed to load JS bundle - react native - Stack Overflow
To bundle JS file into your apk while having your server running ( react-native start ) download bundle into assets directory of your...
Read more >
Create a simple widget - Android Developers
App Widgets are miniature application views that can be embedded in other applications (such as the home screen) and receive periodic updates.
Read more >
Expo SDK 43. Today we're announcing the release of…
Experimental support for Hermes on iOS is now available on apps built with EAS Build, custom development clients, and in expo-updates. Hermes ...
Read more >
Firebase Unity SDK Release Notes
(Android) Update Firebase Android BoM dependencies to v31.0.0. ... Fix #218 that Firebase editor tool not loading when iOS build support is not...
Read more >
Languages and frameworks: React Native - JetBrains Rider
Debug a React Native application that uses Expo · Clear the Build and launch checkbox because this bundler takes care of the process...
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