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:
- your network connection
- the active account with
srcpush whoami - 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:
- the React Native environment is healthy
- the entry file exists
- the package script points to the right app name, platform, signing key, and
Info.plistpath
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:
- the correct deployment received the release
- the app binary version matches the targeted release
- the deployment key in
Info.plistorstrings.xmlis the expected one - 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:
- confirm
Podfilecontains the CodePush pod - run
pod deintegrate && pod install - verify
AppDelegateimportsCodePush/CodePush.h - verify
sourceURLForBridgereturns[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:
android/app/build.gradleincludes the SrcPush Gradle helperMainApplicationoverridesgetJSBundleFile()CodePushDeploymentKeyis 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:
- check release compatibility with the current native binary
- inspect deployment history
- 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