React-Native app shows white screen on signed APK
See original GitHub issueEnvironment
[skip envinfo] System: OS: macOS High Sierra 10.13.6 CPU: x64 Intel® Core™ i5-4258U CPU @ 2.40GHz Memory: 543.56 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 11.1.0 - /usr/local/bin/node Yarn: 1.3.2 - /usr/local/bin/yarn npm: 6.4.1 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1 IDEs: Android Studio: 3.2 AI-181.5540.7.32.5056338 Xcode: 10.1/10B61 - /usr/bin/xcodebuild npmPackages: react: 16.6.0-alpha.8af6728 => 16.6.0-alpha.8af6728 react-native: 0.57.4 => 0.57.4 npmGlobalPackages: create-react-native-app: 1.0.0 react-native-cli: 2.0.1 react-native-git-upgrade: 0.2.7
Description
I have a React-Native app that runs fine in debug mode on emulator and device.
I now want to build a signed APK for Play Store deployment, but the APK only shows a white screen.
I added logging to my MacBook via WebSockets, so I could see that my render()
and componentDidMount()
methods are reached, which works.
It seems like my whole app is running behind that white screen.
I added android:debuggable="true"
to my manifest file and debuggable true
to my build gradle, so when I shake the device, the React-Native dev menu pops up. When I toggled the inspector nothing happened, when I tried to press on the white screen also nothing happens.
I’m using React-Native version 0.57.4
My logcat output (grepped for mycompany) looks like this:
11-17 13:17:25.614 2859 2859 I Timeline: Timeline: Activity_launch_request time:27233523 intent:Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.mycompany/.MainActivity bnds=[74,600][242,768] (has extras) } 11-17 13:17:25.737 22995 22995 D SoLoader: adding application source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.mycompany-1/lib/arm flags = 0] 11-17 13:17:25.738 22995 22995 D SoLoader: adding backup source: com.facebook.soloader.ApkSoSource[root = /data/data/com.mycompany/lib-main flags = 1] 11-17 13:17:25.738 22995 22995 D SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.mycompany-1/lib/arm flags = 0] 11-17 13:17:25.738 22995 22995 D SoLoader: Preparing SO source: com.facebook.soloader.ApkSoSource[root = /data/data/com.mycompany/lib-main flags = 1] 11-17 13:17:25.739 22995 22995 V fb-UnpackingSoSource: locked dso store /data/user/0/com.mycompany/lib-main 11-17 13:17:25.741 22995 22995 I fb-UnpackingSoSource: dso store is up-to-date: /data/user/0/com.mycompany/lib-main 11-17 13:17:25.741 22995 22995 V fb-UnpackingSoSource: releasing dso store lock for /data/user/0/com.mycompany/lib-main 11-17 13:17:25.872 22995 22995 D AccessibilityManager: current package=com.mycompany, accessibility manager mIsFinalEnabled=false, mOptimizeEnabled=true, mIsUiAutomationEnabled=false, mIsInterestedPackage=false 11-17 13:17:25.914 22995 23027 W unknown:ReconnectingWebSocket: Couldn't connect to "ws://localhost:8081/message?device=MI%20MAX%202%20-%207.1.1%20-%20API%2025&app=com.mycompany&clientid=DevSupportManagerImpl", will silently retry 11-17 13:17:25.941 22995 23034 D SoLoader: libreactnativejni.so not found on /data/data/com.mycompany/lib-main 11-17 13:17:25.941 22995 23034 D SoLoader: libreactnativejni.so found on /data/app/com.mycompany-1/lib/arm 11-17 13:17:25.962 22995 23034 D SoLoader: libfb.so not found on /data/data/com.mycompany/lib-main 11-17 13:17:25.962 22995 23034 D SoLoader: libfb.so found on /data/app/com.mycompany-1/lib/arm 11-17 13:17:25.963 22995 23034 D SoLoader: libfb.so not found on /data/data/com.mycompany/lib-main 11-17 13:17:25.963 22995 23034 D SoLoader: libfb.so found on /data/app/com.mycompany-1/lib/arm 11-17 13:17:25.963 22995 23034 I art : Thread[26,tid=23034,Native,Thread*=0xd6945100,peer=0x130119d0,"Thread-3"] recursive attempt to load library "/data/app/com.mycompany-1/lib/arm/libfb.so" 11-17 13:17:25.990 1549 1571 I ActivityManager: Displayed com.mycompany/.MainActivity: +353ms 11-17 13:17:25.999 1549 1571 I Timeline: Timeline: Activity_windows_visible id: ActivityRecord{f1eb1f9 u0 com.mycompany/.MainActivity t21113} time:27233909 11-17 13:17:26.169 464 469 E Vold : Failed to find mounted volume for /dev/null/Android/data/com.mycompany/cache/ 11-17 13:17:26.170 22995 23018 W ContextImpl: Failed to ensure /dev/null/Android/data/com.mycompany/cache: 400 11-17 13:17:26.203 22995 23042 D SoLoader: libyoga.so not found on /data/data/com.mycompany/lib-main 11-17 13:17:26.203 22995 23042 D SoLoader: libyoga.so found on /data/app/com.mycompany-1/lib/arm 11-17 13:17:27.342 464 469 E Vold : Failed to find mounted volume for /dev/null/Android/data/com.mycompany/files/ 11-17 13:17:27.344 22995 23041 W ContextImpl: Failed to ensure /dev/null/Android/data/com.mycompany/files: 400 11-17 13:17:27.389 22995 23041 I ReactNativeJS: Running application "mycompany" with appParams: {"rootTag":1}. __DEV__ === false, development-level warningare OFF, performance optimizations are ON
My depdencies look like this:
"dependencies": { "base-64": "^0.1.0", "buffer": "5.0.7", "glamorous-native": "1.1.2", "md5": "2.2.1", "moment": "2.18.1", "password-validator": "4.0.0", "prop-types": "15.6.2", "react": "16.6.0-alpha.8af6728", "react-native": "0.57.4", "react-native-audio": "4.1.3", "react-native-datepicker": "1.6.0", "react-native-fbsdk": "^0.8.0", "react-native-fetch-blob": "0.10.8", "react-native-image-picker": "0.26.4", "react-native-keep-awake": "2.0.5", "react-native-keyboard-aware-scroll-view": "0.3.0", "react-native-keyboard-aware-view": "0.0.14", "react-native-linear-gradient": "2.4.2", "react-native-orientation": "3.0.0", "react-native-sentry": "^0.39.1", "react-native-sha256": "1.1.1", "react-native-sound": "0.10.4", "react-native-store-review": "0.1.5", "react-native-svg": "6.5.2", "react-native-swipe-a-lot": "kay-is/react-native-swipe-a-lot", "react-native-video": "3.2.1", "redux": "3.7.2", "validator": "8.1.0" }, "devDependencies": { "babel-jest": "23.6.0", "jest": "23.6.0", "metro-react-native-babel-preset": "0.49.0", "react-test-renderer": "16.6.0-alpha.8af6728", "ws": "^6.1.0" },
I also tried different FB-SDK version, which didn’t change anything.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top GitHub Comments
Can you run
react-native info
and edit your issue to include these results under the Environment section?If you believe this information is irrelevant to the reported issue, you may write
[skip envinfo]
under Environment to let us know.I went through all of my deps today. Updating glamorous-native to version 1.4.0 fixed the problem.