Skip to content
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 componentDidMount repeatedly called and fetch not return any promise #15567

Closed
pongponglau opened this issue Aug 20, 2017 · 8 comments
Closed
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@pongponglau
Copy link

pongponglau commented Aug 20, 2017

I am using the latest release version of RN 0.47.1. It works perfectly in iOS.

However, there are 2 strange problems with Android (both simulator and real device)

  1. componentDidMount of my component is called repeatedly every 1 to 2 seconds
  2. fetch did not return any promise, neither resolve nor reject

Do you have any ideas?

Thanks a lot

@Amwam
Copy link

Amwam commented Aug 20, 2017

@pongponglau This is a question better suited to stack overflow. I'd suggest you close this issue, and post there, along with some code examples of you problem

@pongponglau
Copy link
Author

@Amwam, thank you for your much.

In fact, i have one more finding. Fetch can return a promise and componentDidMount is called once after i have just installed the app.

However, after i reload (or force kill the app and restart again), fetch would not return any promise and componentDidMount is called repeatedly. Do you have any idea?

Thanks

@Amwam
Copy link

Amwam commented Aug 20, 2017

@pongponglau Without seeing some example code, I am unable to say more.
If you have a reproducible demo, I would create a more detailed bug report as an new issue on GH (following the template), else you should post to stack overflow.

@pongponglau
Copy link
Author

I eventually found out what causes these strange issues on Android. It is related to redux-persist.

Thank you for your help,

@chirag04
Copy link
Contributor

seems like you figured out the problem. going to close this. regardless, stack overflow is a better place for this imo.

@chirag04
Copy link
Contributor

@facebook-github-bot stack-overflow

@facebook-github-bot
Copy link
Contributor

Hey @pongponglau, thanks for posting this! @chirag04 tells me this issue looks like a question that would be best asked on Stack Overflow. Stack Overflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only. See "What to Expect from Maintainers".

@facebook-github-bot
Copy link
Contributor

Something went wrong executing that command, @mkonicek could you take a look?

@facebook facebook locked as resolved and limited conversation to collaborators Aug 21, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Aug 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants