-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Detox tests hang with pending items on dispatch queue #3358
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! For more information on bots in this reporsitory, read this discussion. |
Deep-inspecting the content of the queue is tricky. My advice is to try to eliminate parts of the app until things work and with that pin-point the source. |
This issue appears to be a general usage or support question. |
I am having the exact same issue. On our side, the interaction happening relates to:
I have inspected the RNFB/Auth implementation and it is rather simple. The blocking call ends up being:
which eventually makes it here:
which calls into the problematic function:
I haven't fully dissected the above function but refactoring @DerrickAfrifa could you tell me what versions of RNFirebase/Expo you are running? Another mystery here is why is this bug related to updating expo to SDK 45... |
A PR is in progress (see above ^) for this to be fixed upstream, but in the meantime you can refer to this stack overflow answer for a fix. |
@glesperance did the change you made above to
I've inspected the package source code in my |
Same here @dooleyb1, were you able to fix it? |
some here, help! |
Same here! |
The fix / pr worked for our use case. However, please keep in mind that any component incorrectly using the dispatch queue will cause the behaviour you are observing. Our issue was with firebase-auth however each case can be different. If you're not relying on firebase-auth or running the latest version this would indicate that your problem is elsewhere. If that is the case your best course of action is to "try to eliminate parts of the app until things work and with that pinpoint the source." as @d4vidi pointed out. Hope this helps. |
Description
I am writing e2e tests on Detox to test a Firebase app. It looks like the call to
firebase.auth().signInWithPhoneNumber(number)
dispatches some items on the dispatch queue but these items don't ever seem to be dequeued and therefore the tests cannot proceed. My hunch is that there is a network request being made by the sign in call that never resolves. Here is the log:Here is the log:
I have read through this troubleshooting guide and it looks like the operation is on the Main thread (native) and the issue is a waiting too much issue.
Is there a way to inspect the items on the dispatch queue to further understand what they are? I have tried running the
/usr/bin/xcrun simctl spawn <device> log stream --level debug --style compact --predicate 'process == "myapp"'
but I don't understand the output. If it is useful I can upload the logs.I'm hoping I can post some logs of some sort and someone can help me to find the reason for the items on the dispatch queue.
I have no experience with native development so device system logs and Objective C/Swift code mean nothing to me.
Thanks
Your environment
Detox version:
19.4.2
React Native version:
0.67.4
Node version:
v12.22.6
Device model:
iPhone 11 Simulator
OS:
iOS
Test-runner (select one):
jest-circus
The text was updated successfully, but these errors were encountered: