-
Notifications
You must be signed in to change notification settings - Fork 50
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
Fix detox issue #618
Fix detox issue #618
Conversation
…eact-native into fix-detox-issue merge code
setTimeout(() => { | ||
handlePermissions(); | ||
}, 1000); // delay of 1 second |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not new for this PR so no need to block on it but why do we need this in the app layer? Won't the native SDK request and prompt for the permissions when needed? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The native Android SDK doesn't prompt for permissions itself, it requires the integration to do so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, TIL! thanks 👍
Summary
CI has been blocked for a bit due to failing e2e Android tests. We upgraded Detox to ensure our dependencies are officially supported, and discovered an issue with the Permissions API being called too early:
Error: Tried to use permissions API while not attached to an Activity.
Not the prettiest option but adding a 1 second delay before calling the permission checker fixes the issue, and since this is for the example application running on the emulator that seemed good enough to unblock new PRs
Motivation
Unblock CI
Testing
CI
Documentation
Select one: