[eas][android] expo-branch cause app crash
See original GitHub issueSummary
Look like double-linking causes a crash on Android. How I can exclude expo-branch
on android?
E AndroidRuntime: FATAL EXCEPTION: create_react_context
E AndroidRuntime: Process: XXXXX PID: 10110
E AndroidRuntime: java.lang.IllegalStateException: Native module RNBranch tried to override RNBranchModule. Check the getPackages() method in MainApplication.java, it might be that module is being created twice. If this was your intention, set canOverrideExistingModule=true. This error may also be present if the package is present only once in getPackages() but is also automatically added later during build time by autolinking. Try removing the existing entry and rebuild.
E AndroidRuntime: at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:55)
E AndroidRuntime: at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1347)
E AndroidRuntime: at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1318)
E AndroidRuntime: at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1225)
E AndroidRuntime: at com.facebook.react.ReactInstanceManager.access$1100(ReactInstanceManager.java:131)
E AndroidRuntime: at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1016)
E AndroidRuntime: at java.lang.Thread.run(Thread.java:919)
Can I use this config to exclude? https://github.com/expo/expo/blob/422beec748adabbf0f6be3922e9a7ea6170fb8a2/apps/bare-expo/package.json#L36-L53
Or this config? https://github.com/expo/expo/blob/1e001f80d902303a40e370c7b996b01c3b088119/apps/bare-expo/package.json#L36-L66
Managed or bare workflow? If you have ios/
or android/
directories in your project, the answer is bare!
managed
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
41.0.0
Environment
EAS build
Reproducible demo or steps to reproduce from a blank project
none,
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:27 (11 by maintainers)
Top Results From Across the Web
Expo Branch crash on Android - Expo SDK - Forums
In my managed app, Android production builds crash on launch. It seems to have something to do with expo-branch, but I'm not sure...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, the presence of android/ios directories means you have a “bare” app, rather than a managed app.
See here: https://forums.expo.dev/t/should-i-exclude-ios/63094/4?u=wodin
I’m coming to the conclusion that ios/ and android/ folders are only needed on the local box to be able to run the apps on Simulator directly (opposed to Expo go) – there is no need to version control these folders, they will be re-generated on the eas build server (or on local) as needed.
It all finally works! Thank you for your help.