I am using Firebase with React Native. Firebase shows me a timer warning as shown in the screenshot.
I read the following note in the React Native troubleshooting guide.
React Native implements a polyfill for WebSockets. These polyfills are initialized as part of the react-native module that you include in your application through import React from 'react'. If you load another module that requires WebSockets, such as Firebase, be sure to load/require it after react-native:
import React from 'react';
import Firebase from 'firebase';
I tried import React before Firebase. But, I still keep getting these timer warnings. The application does work fine. I keep getting multiple warnings at regular intervals. Any help would be well appreciated.
I am using the latest React Native and the warning comes in the Android emulator.
To sort this out all need to do is increase the value of the variable MAX_TIMER_DURATION_MS. Here are the steps:
Go to node_modules/react-native/Libraries/Core/Timer/JSTimers.js
Look for the variable MAX_TIMER_DURATION_MS
Change 60 * 1000 to 10000 * 1000 , needed for firebase
Save the changes and re-build your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With