React-native-code-push: Something went wrong. Please verify if generated JS bundle is correct.

Created on 28 Oct 2017  路  5Comments  路  Source: microsoft/react-native-code-push

Steps to Reproduce

  1. On Xcode, select Edit Scheme > Run.
  2. Change Build Configuration from Debug to Release.
  3. Press cmd + R to run app.

Expected Behavior

What you expected to happen?
Run app correctly with no error.
Export a log like [CodePush] Loading JS bundle from file:///~ , I think.

Actual Behavior

What actually happens?

*** Terminating app due to uncaught exception 'RCTFatalException: Something went wrong. Please verify if generated JS bundle is correct. ', reason: 'Something went wrong. Please verify if generated JS bundle is correct. '

Environment

  • react-native-code-push version: 2.1.1-beta
  • react-native version: 0.44.0
  • iOS/Android/Windows version: Every version of iOS I tried.
  • Does this reproduce on a debug build or release build? Only release build
  • Does this reproduce on a simulator, or only on a physical device? Both of them.

Most helpful comment

The error was fixed.
Process is below.

  1. Create main.jsbundle file manually.
    I run react-native bundle --platform ios --dev false --entry-file index.ios.js --bundle-output iOS/main.jsbundle command.
  2. Reattach main.jsbundle file to Xcode.
    Remove reference of main.jsbundle from Xcode and add main.jsbundle to Xcode again

All 5 comments

The error was fixed.
Process is below.

  1. Create main.jsbundle file manually.
    I run react-native bundle --platform ios --dev false --entry-file index.ios.js --bundle-output iOS/main.jsbundle command.
  2. Reattach main.jsbundle file to Xcode.
    Remove reference of main.jsbundle from Xcode and add main.jsbundle to Xcode again

Hi,

I think I鈥檓 running into the same issue. With @kohei-takata fixes, my assets don鈥檛 load. What should I do in this case?

@kohei-takata 's answer worked for me. _I think_ CodePush requires you to ship a jsbundle with the app binary (in release mode). @JakeRawr you need to specify assets destination dir while bundling. Here is the complete script:

react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios/main.jsbundle  --assets-dest ios

I'm trying to bundle my main.jsbundle separately and I always end up with this error. It maps up in the xcodeproj properly though, any ideas?

The error was fixed.
Process is below.

  1. Create main.jsbundle file manually.
    I run react-native bundle --platform ios --dev false --entry-file index.ios.js --bundle-output iOS/main.jsbundle command.
  2. Reattach main.jsbundle file to Xcode.
    Remove reference of main.jsbundle from Xcode and add main.jsbundle to Xcode again

Worked for me, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chrisjrex picture chrisjrex  路  4Comments

panarasi picture panarasi  路  4Comments

vira-khdr picture vira-khdr  路  3Comments

Fuhrmann picture Fuhrmann  路  3Comments

ACCTFORGH picture ACCTFORGH  路  3Comments