React Native app crashes when login - firebase

I'm having troble with my app, this app is react native and everything is works well, but in production it's crashes on login. On Dev mode, on my phone it's okay, only on production crashes.
I tried some solutions that I found here in stackOverflow but none of them helped in fixing the bug.
The first error is a normal firebase connection and get uid for user. I can't fix this and it's a simple connection... help please!!
This is the error:
com.facebook.react.common.JavascriptException: null is not an object (evaluating 'l.currentUser.uid'), stack:
value#306:2672
onPress#306:6430
touchableHandlePress#174:1566
_performSideEffectsForTransition#167:8505
_receiveSignal#167:7292
touchableHandleResponderRelease#167:4757
g#41:296
invokeGuardedCallback#41:496
invokeGuardedCallbackAndCatchFirstError#41:611
A#41:2410
D#41:3172
U#41:2969
<unknown>#41:15497
batchedUpdates#41:72147
Ie#41:14848
ze#41:15343
receiveTouches#41:16180
value#18:3582
<unknown>#18:1067
value#18:3009
value#18:1039
at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:54)
at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:38)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:207)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:818)
Thanks
Anderson - LógikaWeb

old version problem!
First the problem it's a empty variable. I changed a route and fix the code error in props.
I update my ambient and all works fine with 0.61 version.

Related

Connection to firestore timing out , happening suddenly since today after working well

I have been connecting to Google Firestore NoSQL database from my javascript project.
It worked well since yesterday.
Suddenly the connection to firestore is throwing time out error.
Here is the error in console .
https://firestore.googleapis.com/google.firestore.v1.Firestore/Write/channel?database=projects%2F......................... net::ERR_CONNECTION_TIMED_OUT
[2020-11-14T18:31:33.525Z] #firebase/firestore: Firestore (8.0.1): Connection WebChannel transport errored: dr {type: "c", target: lr, a: lr, defaultPrevented: false, status: 1}
Why is this happening , I am totally clueless on this.
I just stumbled on the same problem, after re-reading the docs and checking my code i noticed no differences.
After that i realised there was a chrome plug-in installed called "CORS: Access-Control-Allow-Origin". This is causing the issue
Haven't been successful yet with whitelisting the correct domain.
Hope this steers you into the right direction

Why do I get "Client is not yet ready to issue requests" - Firestore get() fails when called by Schedule function

In my Firebase project I have a functions.pubsub.schedule().onRun() that runs every 5 minutes to perform some calendar related tasks. It needs to look up in my Firestore collections and does so with a .get() query.
This has been working fine until sometime 2020-03-13 in the morning where the function started to throw
2020-03-13 09:36:02.326 CET scheduledHooks 1042277797598294
Error: INTERNAL ERROR: Client is not yet ready to issue requests.
at Firestore.get projectId [as projectId] (/srv/functions/node_modules/#google-cloud/firestore/build/src/index.js:401:19)
at Query.toProto (/srv/functions/node_modules/#google-cloud/firestore/build/src/reference.js:1556:42) at Query._get (/srv/functions/node_modules/#google-cloud/firestore/build/src/reference.js:1466:30)
at Query.get (/srv/functions/node_modules/#google-cloud/firestore/build/src/reference.js:1457:21)
at FirebaseActivitiesCollection.<anonymous> (/srv/functions/lib/collections/activities/FirebaseActivitiesCollection.js:32:40)
at Generator.next (<anonymous>) at /srv/functions/lib/collections/activities/FirebaseActivitiesCollection.js:8:71
at new Promise (<anonymous>) at __awaiter (/srv/functions/lib/collections/activities/FirebaseActivitiesCollection.js:4:12)
at FirebaseActivitiesCollection.getActivitiesByInterval (/srv/functions/lib/collections/activities/FirebaseActivitiesCollection.js:27:16)
I can't track that I have changed anything, could it be that Firebase made some changes that I should be aware of or am I missing an obvious clue in this error message?
My other Cloud Functions and the Firebase JavaScript SDK still work fine.
Extra info: The same code works on my other environment where I have not deployed. This of course led me to search for changes in the deployed code, but I can't find any!?
It seems by the error, that the project was not connected and initialized correctly. As per the official API here, this error occurs when:
Returns the Project ID for this Firestore instance. Validates that
initializeIfNeeded() was called before.
I would recommend you to check that. In case you are still facing, I would say for you to contact the Firebase Free Support. Since you mentioned that it was working until yesterday morning, it might be some change on their side.
Hope this helps!
This turned out to be a very simple matter of initialization of Firebase:
Before I had:
// Initialize firebase
admin.initializeApp(functions.config().firebase)
..And it worked fine until it didn't anymore.
Now I have:
// Initialize firebase
admin.initializeApp()
... And it works again
Got the same error while running some jest tests involving firebase. Problem was that I didn't have GOOGLE_APPLICATION_CREDENTIALS environment variable set.
Since I was running them locally on my machine, exporting this variable in terminal before running the tests was sufficient for my case:
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/credentials/file.json

Firebase login react native >0.60 "auth/network-request-failed" DEBUG only IOS

I recently converted all my code from react native 0.59 to 0.60.5 by simply creating a new repo and copying and pasting the new files in. I am getting this error when I try to login with facebook or google, but the weird thing is it's only with "Debug" mode enabled. I can't tell much behind the generic error.
code: "auth/network-request-failed"
message: "A network error (such as timeout, interrupted connection or unreachable host) has occurred."
I need to use debug mode for development, so just not using debug isn't an option. Is there some setting on the simulator that I need to change. I have tried resetting the device multiple times.

UWP - Create push notification channel error

I have a strange issue for creating a push notification channel uri.
When I try to execute the following code:
receivedChannel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
I catch an exception with the following message:
A notification channel request for the provided application identifier is in progress. (Exception from HRESULT: 0x803E0103)
(nothing special in the call stack)
The problem appeared suddenly while it worked fine.
I tried to restart my phone without success.
Note: I have this issue only on my development mobile. It works fine on others mobiles.
It's properbly not relevant any more, but I had a support call earlier this year with Microsoft. This kind of error message is actually due to an error in the whole push notification framework. The problem has been resolved in the Fall Creator's update released on October 17th, 2017. As a matter of fact I have not encountered the error since then on any of the ~500 devices in my domain.
So, error resolution: Update your device. Hope that helps.

Windows workflow suspends intermittently with error in DurableInstancing.InstancesTable

I am facing this error since some time, it is very intermittent in nature so, unable to understand why this error and what needs t be done t fix this.
Issue:
We have a workflow 4.5 WCF service. Everything goes well, but intermittently we see suddenly that a workflow instance gets suspended with an error in the table "DurableInstancing.InstancesTable"
The error is "Keyword Not supported: 'DB Name,1433';Initial Catalog'.
Since most times this ust workd fine without any error, I do not think this problem is related to web.config entry for connectionstring. Most times the workflow completes without any error. We have verified multiple times that the connection string is proper and there is no issue with parsing the connection string.
I suspect this issue is happening while Workflow instance is being recreated from persistence storage, and because some reason it is unable to recreate , the workflow is getting suspended with this error in DB.
I really appreciate any help in getting us through this error.
Thanks,
GD
What we found was it was an issue with permission in Database. We gave "dbo" user permission to the workflow database, and after that we have not seen this problem occur again. Has the error or exception that gets logged in the table is mre informative then it would have been better.
Thanks,
GD

Resources