React-native-code-push: App working in debug / release mode but white screen with archived TestFlight app

Created on 20 Jul 2018  路  14Comments  路  Source: microsoft/react-native-code-push

Steps to Reproduce

  1. Integrate react-native-code-push
  2. Archive app
  3. Upload it on iTunes Connect
  4. Download the app with TestFlight

Expected Behavior

Like the debug / release Xcode app, the TestFlight version should start correctly. No crashes appears in the App Center.

Actual Behavior

I have a white blank screen after the iOS splashscreen, the react-native root screen not loading.
The app doesn't close, it stay like this forever.

Reproducible Demo

Unable to install demo
node create-app.js appName [email protected] [email protected]
results in

{ AssertionError [ERR_ASSERTION]: No data from child with non-empty queue.
[wait] What is your CodePush deployment key for Android (hit <ENTER> to ignore)
[sendline] wzheSguujpv-X_a_hK0XeeOWxi2X117aca2e-6f73-4679-aa16-bcbce31fb395
[wait] What is your CodePush deployment key for iOS (hit <ENTER> to ignore)
[sendline] xSm9dW4k7lGk2TLlOAYFfFe4C46o117aca2e-6f73-4679-aa16-bcbce31fb395
    at new AssertionError (internal/errors.js:315:11)
    at createUnexpectedEndError (/Users/alchy/Downloads/react-native-code-push-master/Examples/nexpect.js:327:10)
    at flushQueue (/Users/alchy/Downloads/react-native-code-push-master/Examples/nexpect.js:221:19)
    at ChildProcess.<anonymous> (/Users/alchy/Downloads/react-native-code-push-master/Examples/nexpect.js:303:43)
    at ChildProcess.emit (events.js:180:13)
    at maybeClose (internal/child_process.js:936:16)
    at Socket.stream.socket.on (internal/child_process.js:353:11)
    at Socket.emit (events.js:180:13)
    at Pipe._handle.close [as _onclose] (net.js:541:12)
  generatedMessage: false,
  name: 'AssertionError [ERR_ASSERTION]',
  code: 'ERR_ASSERTION',
  actual: 
   [ '[wait] What is your CodePush deployment key for Android (hit <ENTER> to ignore)',
     '[sendline] wzheSguujpv-X_a_hK0XeeOWxi2X117aca2e-6f73-4679-aa16-bcbce31fb395',
     '[wait] What is your CodePush deployment key for iOS (hit <ENTER> to ignore)',
     '[sendline] xSm9dW4k7lGk2TLlOAYFfFe4C46o117aca2e-6f73-4679-aa16-bcbce31fb395' ],
  expected: [],
  operator: undefined }

Environment

  • react-native-code-push version: 5.4.0
  • react-native version: 0.53.3
  • iOS/Android/Windows version: iOS 10.2
  • Does this reproduce on a debug build or release build? Nop, it's working perfectly
  • Does this reproduce on a simulator, or only on a physical device? Works great on simulator

I didn't used Cocoapod before adding Code Push support so I don't trust the Podfile.

package.json

{
  "name": "MyApp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest",
    "clean": "rm -rf $TMPDIR/react-* && watchman watch-del-all && npm cache clean --force",
    "clean:android": "cd android/ && ./gradlew clean && cd .. && react-native run-android",
    "newclear": "rm -rf $TMPDIR/react-* && watchman watch-del-all && rm -rf ios/build && rm -rf node_modules/ && npm cache clean --force && npm i",
    "test:watch": "jest --watch",
    "updateSnapshot": "jest --updateSnapshot",
    "coverage": "jest --coverage && open coverage/lcov-report/index.html || xdg-open coverage/lcov-report/index.html",
    "android:build": "cd android && ./gradlew assembleRelease",
    "android:install": "cd android && ./gradlew assembleRelease && ./gradlew installRelease",
    "android:hockeyapp": "cd android && ./gradlew assembleRelease && puck -submit=auto app/build/outputs/apk/app-release.apk",
    "android:devices": "$ANDROID_HOME/platform-tools/adb devices",
    "android:logcat": "$ANDROID_HOME/platform-tools/adb logcat *:S ReactNative:V ReactNativeJS:V",
    "android:shake": "$ANDROID_HOME/platform-tools/adb devices | grep '\\t' | awk '{print $1}' | sed 's/\\s//g' | xargs -I {} $ANDROID_HOME/platform-tools/adb -s {} shell input keyevent 82",
    "storybook": "storybook start -p 7007",
    "lint": "standard --verbose | snazzy",
    "lintdiff": "git diff --name-only --cached --relative | grep '\\.js$' | xargs standard | snazzy",
    "fixcode": "standard --fix",
    "git-hook": "npm run lint -s && npm run test -s"
  },
  "dependencies": {
    "@ptomasroos/react-native-multi-slider": "^0.0.14",
    "apisauce": "~0.14.0",
    "appcenter": "^1.6.0",
    "appcenter-analytics": "^1.6.0",
    "appcenter-crashes": "^1.6.0",
    "format-json": "~1.0.3",
    "jwt-decode": "~2.2.0",
    "lodash": "~4.17.4",
    "moment": "~2.19.1",
    "native-base": "~2.3.8",
    "prop-types": "~15.5.10",
    "querystringify": "0.0.4",
    "ramda": "~0.24.1",
    "react": "~16.2.0",
    "react-native": "~0.53.3",
    "react-native-animatable": "~1.2.4",
    "react-native-button": "~2.1.0",
    "react-native-checkbox": "~2.0.0",
    "react-native-code-push": "^5.4.0",
    "react-native-code-push-saga": "^1.0.1",
    "react-native-config": "~0.6.0",
    "react-native-drawer": "~2.3.0",
    "react-native-i18n": "1.0.0",
    "react-native-keyboard-aware-scroll-view": "~0.4.1",
    "react-native-push-notification-ce": "^3.1.7",
    "react-native-side-menu": "~1.1.3",
    "react-native-slider": "~0.11.0",
    "react-native-vector-icons": "4.3.0",
    "react-native-walkthrough-tooltip": "^0.2.0",
    "react-navigation": "~1.0.0",
    "react-navigation-redux-helpers": "^1.0.1",
    "react-redux": "~5.0.2",
    "redux": "~3.6.0",
    "redux-persist": "~4.1.0",
    "redux-saga": "~0.15.6",
    "reduxsauce": "0.4.1",
    "seamless-immutable": "~7.0.1",
    "tcomb-form-native": "~0.6.11"
  },
  "devDependencies": {
    "@storybook/addon-storyshots": "~3.2.3",
    "@storybook/react-native": "~3.2.3",
    "babel-eslint": "7.1.1",
    "babel-jest": "21.2.0",
    "babel-plugin-ignite-ignore-reactotron": "~0.3.0",
    "babel-preset-es2015": "~6.18.0",
    "babel-preset-react-native": "3.0.2",
    "enzyme": "~2.6.0",
    "husky": "~0.13.1",
    "ignite-animatable": "~1.0.0",
    "ignite-i18n": "~1.1.1",
    "ignite-ir-boilerplate": "~2.2.2",
    "ignite-standard": "~1.0.0",
    "ignite-vector-icons": "~1.1.0",
    "jest": "21.2.1",
    "mockery": "~2.0.0",
    "react-addons-test-utils": "~15.4.1",
    "react-dom": "16.0.0-alpha.12",
    "react-test-renderer": "16.0.0-beta.5",
    "reactotron-react-native": "~1.12.0",
    "reactotron-redux": "~1.11.1",
    "reactotron-redux-saga": "~1.11.1",
    "snazzy": "~7.0.0",
    "standard": "10.0.2"
  },
  "jest": {
    "testMatch": [
      "**/Tests/**/*.js",
      "**/?(*.)(spec|test).js?(x)"
    ],
    "testPathIgnorePatterns": [
      "/node_modules/",
      "Tests/Setup.js"
    ],
    "setupFiles": [
      "./Tests/Setup",
      "./node_modules/appcenter/test/AppCenterMock.js",
      "./node_modules/appcenter-analytics/test/AppCenterAnalyticsMock.js",
      "./node_modules/appcenter-crashes/test/AppCenterCrashesMock.js"
    ],
    "preset": "react-native"
  },
  "config": {},
  "standard": {
    "parser": "babel-eslint",
    "globals": [
      "describe",
      "test",
      "jest",
      "expect",
      "fetch",
      "navigator",
      "__DEV__",
      "XMLHttpRequest",
      "FormData",
      "React$Element"
    ]
  }
}

Podfile

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'MyApp' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for MyApp
  pod 'yoga', path: '../node_modules/react-native/ReactCommon/yoga'
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
  pod 'GLog', :podspec => '../node_modules/react-native/third-party-podspecs/GLog.podspec'
  pod 'React', path: '../node_modules/react-native', subspecs: [
    'DevSupport',
  ]
  pod 'AppCenter/Crashes', '~> 1.7.1'
  pod 'AppCenter/Analytics', '~> 1.7.1'
  pod 'AppCenterReactNativeShared', '~> 1.6.0'
  pod 'CodePush', :path => '../node_modules/react-native-code-push'

  platform :ios, '9.0'
  target 'MyAppTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

target 'MyApp-tvOS' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for MyApp-tvOS

  target 'MyApp-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

end
iOS

All 14 comments

Hi @alchy58 ,
Thanks for reporting!

It is strange issue.
Could you please clarify this issue appears only after uploading in AppStore? Just for testing with Xcode no any issues?
Have you some integrated bug tracker for your app? Is there some logs about this issue?

If I understand correctly this screen is empty until user reload app? and does it works correct after reload app?

Thanks,
Alexander

I'm having the same issue--appears in production build from TestFlight. If I quit and relaunch the application it works, but it rolls back to the previously installed build.

edit: only appears in code push v5.4.0

Hi,
I'll try with the 5.3.0 version today.

Having the same issue with 5.4.0!

Well, I downgraded to react-native-code-push v5.3.0 and still have the issue.
Upgraded to RN 0.56 from 0.53, react-native-code-push v5.3.0 and v5.4.0 and still have the issue.

On Android, the app crashes one or two times after the installation but then, it runs correctly with the good Appcenter bundle.

Hi guys! It's strange issue. We have many users that test their apps with TestFlight without any issues. In general archiving process uses Release scheme so there shouldn't be any differences between app bundle from XCode and TestFlight except signature.
Please if you have any possibility to provide us with logs or may be a demo app that reproduce the issue it'll help us a lot to figure out the cause of the your problem as now it's difficult to say what is going wrong.

Hi,

I've managed to make the app working.
I suppose that I lost myself between many documentation, trying to add Cocoapods for the first time, then manually, etc.

It's difficult to say what was wrong. I've finally manage to get it work with RNPM, but I needed to install it, react-native link didn't do the job which is weird because, as I understood, RNPM was merged into react-native link.

@alchy58 glad to hear that issue was resolved!
I'll close the issue but feel free to reach us if you need any help with code-push.

Same here! I'd written the bug myself :-) sorry for not getting back earlier

I have the same issue (iOS, physical Device), with AppCenter building a react native app for me. After the splash screen, instantly a white screen appears and never goes away. I don't have this issue in the Simulator or in xCode when building on my physical Device. Only AppCenter builds downloaded have this issue.

I am facing the same issue.
Codepush - v6.2.0
RN - 0.61.5

Hello guys! I am experiencing the same issue here when using code push version 6.3.0, only for testflight / appstore downloads.

I think this only happens when there is no other binary uploaded on appcenter rather than the one that is transpiled when building locally into the APK / IPA file.

More info at:
https://github.com/facebook/react-native/issues/29688

EDIT:
Updated firebase version and it started working again

    "@react-native-firebase/analytics": "^7.4.2",
    "@react-native-firebase/app": "^8.3.1",
    "@react-native-firebase/messaging": "^7.7.1",
    "@react-native-firebase/remote-config": "^8.1.3",

Also I replaced on AppDelegate.m on didFinishLaunchingWithOptions.

if ([FIRApp defaultApp] == nil) { [FIRApp configure]; }

for

[FIRApp configure];

Hello guys! I am experiencing the same issue here when using code push version 6.3.0, only for testflight / appstore downloads.

I think this only happens when there is no other binary uploaded on appcenter rather than the one that is transpiled when building locally into the APK / IPA file.

More info at:
facebook/react-native#29688

EDIT:
Updated firebase version and it started working again

    "@react-native-firebase/analytics": "^7.4.2",
    "@react-native-firebase/app": "^8.3.1",
    "@react-native-firebase/messaging": "^7.7.1",
    "@react-native-firebase/remote-config": "^8.1.3",

Also I replaced on AppDelegate.m on didFinishLaunchingWithOptions.

if ([FIRApp defaultApp] == nil) {
  [FIRApp configure];
}

for

[FIRApp configure];

Hi @agusvazquez , I have seen both facebook/react-native#29688 and the solution you mentioned here.
May I know which one is the solution you have done to fix it, "Remove code push" or "Upgrade firebase packages"? Thanks.

Hey!! I just upgraded firebase packages and it worked.

Also, removing code push worked too, i think it was somehow a conflict between those packages. But we don't want to remove codepush, right? :P

Just upgrade firebase packages and you should be ok.

Cheers

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ninjz picture ninjz  路  4Comments

jaysig picture jaysig  路  3Comments

kevando picture kevando  路  4Comments

DeDuckProject picture DeDuckProject  路  3Comments

Fuhrmann picture Fuhrmann  路  3Comments