Skip to main content

Troubleshooting

This guide helps you diagnose common Source Push integration and release issues in bare React Native apps.

Installation issues

CLI installation fails

If you hit permission or environment problems while installing the CLI, review the CLI Installation guide.

SDK installation fails

Verify that @srcpush/react-native-code-push is installed in the app and that your native changes match the setup guides:

Authentication issues

Login fails

srcpush login

Check:

  1. your network connection
  2. the active account with srcpush whoami
  3. whether the CI or local shell is using the intended access key

Access key issues

srcpush login --accessKey <key>

If authentication fails, rotate the key and retry:

srcpush access-key add "New Key"
srcpush access-key ls

Release issues

Release command fails

srcpush release-react MyApp-iOS ios

Check:

  1. the React Native environment is healthy
  2. the entry file exists
  3. the package script points to the right app name, platform, signing key, and Info.plist path

If needed, try a manual bundle build to isolate React Native packaging failures:

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

Update does not appear in the app

Verify:

  1. the correct deployment received the release
  2. the app binary version matches the targeted release
  3. the deployment key in Info.plist or strings.xml is the expected one
  4. the app runtime is actually using SrcPush

Expected config placeholders:

<!-- iOS: Info.plist -->
<key>CodePushDeploymentKey</key>
<string>YOUR_IOS_DEPLOYMENT_KEY</string>
<!-- Android: strings.xml -->
<string name="CodePushDeploymentKey">YOUR_ANDROID_DEPLOYMENT_KEY</string>

Integration issues

iOS build fails

If pod install or the iOS build fails:

  1. confirm Podfile contains the CodePush pod
  2. run pod deintegrate && pod install
  3. verify AppDelegate imports CodePush/CodePush.h
  4. verify sourceURLForBridge returns [CodePush bundleURL] in release builds

Expected pod entry:

pod 'CodePush', :path => '../node_modules/@srcpush/react-native-code-push'

Android build fails

If the Android build fails or the app never loads OTA bundles, check:

  1. android/app/build.gradle includes the SrcPush Gradle helper
  2. MainApplication overrides getJSBundleFile()
  3. CodePushDeploymentKey is not being managed in conflicting places

Expected Gradle helper:

apply from: "../../node_modules/@srcpush/react-native-code-push/android/codepush.gradle"

Expected host override:

import com.microsoft.codepush.react.CodePush

override fun getJSBundleFile(): String {
return CodePush.getJSBundleFile()
}

Config injection issues

If CI writes deployment values into tracked placeholders, verify the script arguments:

node scripts/inject-srcpush-config.js \
--android-strings android/app/src/main/res/values/strings.xml \
--ios-plist ios/MyApp/Info.plist \
--deployment-key-android "$SRCPUSH_DEPLOYMENT_KEY_ANDROID" \
--deployment-key-ios "$SRCPUSH_DEPLOYMENT_KEY_IOS"

Required arguments:

  • --android-strings
  • --ios-plist
  • --deployment-key-android
  • --deployment-key-ios

Optional:

  • --server-url
  • --public-key
  • --public-key-file

Rollback issues

Automatic rollback

If updates automatically rollback:

  1. check release compatibility with the current native binary
  2. inspect deployment history
  3. confirm the runtime update flow is not forcing an invalid install mode combination

Helpful command:

srcpush deployment history MyApp-iOS Production

Manual rollback fails

srcpush rollback MyApp-iOS Production

If no rollback target is found, inspect history first:

srcpush deployment history MyApp-iOS Production
srcpush rollback MyApp-iOS Production --targetRelease v5

Best practices

  • release to staging before production
  • keep secrets and real deployment values out of git
  • use explicit per-platform release scripts
  • target the correct native build line when publishing after a binary release

Next steps