-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android standalone freezes on splash-screen if getExpoPushTokenAsync() is called during startup #1388
Comments
Not sure what our intended behavior is in this case. Maybe we just need to fail quickly instead of letting the promise hang. |
@terribleben: do you have any idea what is causing this and why it happens in app shell, but not the Expo client? |
We're running into this as well. Could this happen if the client has trouble reaching the Expo push server, or if that request fails for some reason? |
I seem to be having a similar issue when I run in Genymotion. After logging in, that call never returns or fails. Edit: Works fine in iOS emulator and on my Android device. I added a network test and things seem fine there. |
I had this issue until I added |
Hey @andrioid, In an effort to clean up and gain more clarity over our issues, we're closing old issues that may no longer apply to our currently supported versions. If you are able to still repro this, please open a new issue with a repro case and we'll be happy to investigate. Cheers, |
Environment
Environment:
OS: macOS High Sierra 10.13.2
Node: 8.9.0
Yarn: 1.3.2
npm: 5.5.1
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 2.3 AI-162.4069837
Packages: (wanted => installed)
expo: ^25.0.0 => 25.0.0
react: 16.2.0 => 16.2.0
react-native: https://github.com/expo/react-native/archive/sdk-25.0.0.tar.gz => 0.52.0
Diagnostics report:
https://exp-xde-diagnostics.s3.amazonaws.com/parkpark-b4eca031-6a99-419f-b166-cc46d5144436.tar.gz
Fails: Standalone (Android)
Works: Standalone (iOS), Client
Tested SDK's: 24, 25
Steps to Reproduce
Call this during app-loading
const token = await Notifications.getExpoPushTokenAsync()
Expected Behavior
App finished loading, shows main screen.
Actual Behavior
Reproducible Demo
This isn't reproducable in the Expo client, so a snack would be useless.
I made a new app that demonstrates this bug. Funny enough, it went fine on the first run. So it's like something goes terribly wrong if it's called twice.
Code: https://github.com/andrioid/expo-android-splash-bug
APK: https://rink.hockeyapp.net/apps/16c5afff006e45b8ba23411102c76779
Forum post
https://forums.expo.io/t/frozen-splash-screen-on-sdk-25-android-stand-alone/7046
Workaround
Move fetching push notification token out of init, and ask when the splash screen isn't being shown.
The text was updated successfully, but these errors were encountered: