Open adilanchian opened 4 years ago
I feel as though this may be a dev environment thing and shouldn't be a problem in production. Either way we should test this.
May I claim this one? 🙂
@creativenull All yours my friend!
So, correct me if I'm wrong, are we checking if the app is freshly installed and make sure defaults are set in the local storage?
This is correct!
I was running into a weird issue where I would uninstall the app and things would stick around... Especially Firebase sign in info which was weird.
Really this task should be verifying if this is truly a bug or just a coding error :D
According to this issue within their repo it seems like this is an on-going issue. Some say it's just on debug mode but others have found the issue to persist on a physical device.
I'm still setting up my dev environment to see if I get the same issue on an android simulator and a physical device.
So after trying out on an android simulator and on a physical device (OnePlus 7T), I've not been able to reproduce the bug.
First, I manually added some key-value pair to the storage and used AsyncStorage.getAllKeys()
to get keys that were set before. I did get the set keys properly, so after uninstalling and then re-installing I was able to see that storage was empty on a re-install.
Next, I did the spotify auth flow - unfortunately I got an error of a URL handling (probably because spotify does not "work" in my country, the web player works and I was able to register the Spotify app with Gruvee). However, I was able to get one of the keys added @Deep_Link_In_Progress
. So I did the uninstall and re-install flow and got the exact same results as the first method.
But I am also suspecting another thing to be an issue, before I tried out the methods above. I was not able to run npm start
due to an issue being some invalid RegExp. I got through this issue by running npm audit
on the project to see if there are any high vulnerabilities, which came out negative but there were some low priority vulnerabilities. A quick npm audit fix
seemed to fix the issue and I was able to run npm start
. What it did was upgrade the react-native
version in package.json file and the lock file.
I'm not sure if this might be the issue that could solve the storage bug in the app but I could be wrong. But it would also seem like this is an iOS issue as stated from my previous comment and since I don't own any iOS device I'm afraid I won't be able to test it out 😕. But given the report, we may have to wait it out. Maybe someone with an iOS device can also help contribute on figuring out this bug. Sorry for the long comment 😁
So just for simplicity for others - TL;DR:
Few thoughts
One question I had was - Were you able to setup Firebase and go through the auth process? One of the bigger issues was that the Firebase account would stick around after uninstall as well.
Thanks again!
One question I had was - Were you able to setup Firebase and go through the auth process? One of the bigger issues was that the Firebase account would stick around after uninstall as well.
Unfortunately, I didn't get to the Firebase auth process since Spotify did not resolve after a successful auth from Spotify, but I will try this one again on the weekend once I have a VPN setup ready to go. Pretty sure I have Firebase setup properly, or I think I do since I got no errors from the app and I'm seeing some data being stored via the Firebase console. Neither did I get any errors on gruveebackend on runtime.
On another note, as I didn't see any Firebase settings being stored via async-storage, are you suggesting that Firebase stores data unique to the mobile device on cloud?
Using this library: https://github.com/react-native-community/async-storage
We are able to set local storage, but the issue is it persists even after app deletion. So we need to figure out a way to properly handle this. Here is the desired scenario: