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

Prefix ANDROID_LONG_TIMER_MESSAGE with "(ADVICE)" so it doesn't generate non-actionable support requests. #17081

Closed
mikelehen opened this issue Dec 5, 2017 · 3 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@mikelehen
Copy link

Can we please please please change the warning text here to be prefixed with "(ADVICE)" so it’s no longer as disruptive?

const ANDROID_LONG_TIMER_MESSAGE =

Context:
The Firebase JavaScript SDK uses setTimeout / setInterval for a variety of tasks that need to be scheduled. For example, refreshing auth tokens, making reconnect attempts after a backoff delay, etc. This is done in the standard JavaScript way by using setInterval() or setTimeout().

React Native supports timers of any length, but currently displays a non-actionable but disruptive yellow warning if you schedule a timer for > 60 seconds.

const MAX_TIMER_DURATION_MS = 60 * 1000;

The warning references #12981 which has received a very large amount of comments, upvotes, etc., but it does not actually provide any solution. As far as I can tell, the underlying issue is a React Native one (in how it implements setTimeout / setInterval on Android) and there's nothing developers can do.

Firebase has received multiple support requests and github issues (e.g. firebase/firebase-js-sdk#97, firebase/firebase-js-sdk#283) and the comments regarding Firebase on #12981 have gathered over 100 upvotes.

We (Firebase) have no way to fix this other than reduce our timeouts which if anything will make things worse (we would need to set multiple short timeouts to get to the desired longer timeout).

From my reading of the code, warnings prefixed with "(ADVICE)" do not result in the disruptive yellow box:

if (warning.startsWith('(ADVICE)')) {

So can we please please please change the warning text here to be prefixed with "(ADVICE)" so it’s no longer as disruptive?

const ANDROID_LONG_TIMER_MESSAGE =

@react-native-bot
Copy link
Collaborator

@facebook-github-bot no-template

@facebook-github-bot
Copy link
Contributor

Hey @mikelehen, thanks for posting this! It looks like your issue is missing some required information. Can you please add all the details specified in the Issue Template? This is necessary for people to be able to understand and reproduce your issue. I am going to close this, but please feel free to open a new issue with the additional information provided. Thanks!

How to ContributeWhat to Expect from Maintainers

@facebook-github-bot facebook-github-bot added the Ran Commands One of our bots successfully processed a command. label Dec 5, 2017
@mikelehen
Copy link
Author

Reopened as #17083

@facebook facebook locked as resolved and limited conversation to collaborators Dec 5, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Dec 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants