Android promises

#1

So i have created an app that works fine on iOS and (most of the times) on Android.

The app is basically a login screen that lets you log in. It saves the login in asyncstorage (infinite login), and when the user is logged in, they are able to see some data from an external API.

This seems to work well in iOS, however when running on android (tested on Marshmallow and nougat) and i try to reload the app, the values from asyncstorage and never seem to run or getting resolved.

The only way for me to reload the app is by closing it completely and closing expo, and then reopen expo, and finally selecting my app. If i do that then i am logged in again and i receive the data from my external api.

Why would this happen?
Here is a siple example:
The following code will not log when reloading the app, but it will load if i exit expo and reopen the app. AsyncStorage.getItem('myID').then((val) => console.log(val))

#2

I just tried building the APK, and seems to be a problem with Expo maybe?

#3

Hi! We’ll need some more information to help debug this. Where are you making that AsyncStorage call? Can you create a Snack with your code?

#4

To be honest i am not able to reproduce the error. So if i can i’ll just close this thread. :slight_smile:

closed #5