-
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
iOS lock screen when App launch or reload #3967
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 repository, read this discussion. |
I'm also seeing this issue, any update on it? |
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 repository, read this discussion. |
seems caused by accessibility inspector. locked screen phenomenon appeared only if inspector open or running. close inspector and restart your Mac it will be resumed. using devtool or xcode to inspect element instead |
@aaronpliu Interesting. Thanks for sharing. Please close the issue if that has resolved things for you. |
closed as an alternative way to bypass it. it's still worthing investigating. |
Please report back with further insights. |
up |
1 similar comment
up |
I see this problem as well. It seems to happen randomly. |
I'm also facing this weird issue..., is there any more suggestions? @d4vidi |
experiencing this and its causing flakiness |
@asafkorem may I ask you to look here once again? |
I'm also experiencing this |
It is happening in my project as well. When I run tests in GitHub CI, with 3 workers, 2 are fine but the third simulator is locked. |
I sporadically see this on my nightly CI builds. Not super frequent. Once in a blue moon thing that I haven't been able to find any pattern to. The machine it is run off of is restarted once per week. It seems irrelevant if it has recently been rebooted (litrally logged in and started a run) or a run midweek, we see might see this happen. |
it appears to lock screen from time to time in my current test scripts with Detox v20.16.0 as well |
I am seeing this too on Detox v20.18.1, xCode 15.3, running scripts locally on iOS simulator |
Adding to this, could the culprit possibly be Noticed detox instructs applesimutils to respring iOS when setting permissions (not the case for simctl based permissions), and in my case, this seems to be causing the lockscreen to pop-up. Removing the respring by patching detox seems to have worked to remediate this so far, but there's probably a reason why we are respringing, haven't found any differences in functionality so far however. For reference: async setPermissionWithAppleSimUtils(udid, bundleId, service, value) {
const options = {
- args: `--byId ${udid} --bundle ${bundleId} --restartSB --setPermissions ${service}=${value}`,
+ args: `--byId ${udid} --bundle ${bundleId} --setPermissions ${service}=${value}`,
statusLogs: {
trying: `Trying to set permissions with AppleSimUtils: ${service}=${value}...`,
successful: `${service} permissions are set` |
the same issue, @avitretiak's patch doesn't help |
up |
We managed to avoid this by removing Worth noting that because of the way Detox injects notifications, this permission isn't required to send notifications to the app from Detox. |
My guess is that this is related to setting permissions with |
@ball-hayden If that's the situation (with notification permissions via applesimutils), you can work around it (for now) by using our system APIs. Just tap the "Allow" button on the permissions dialog to enable push notifications if necessary. If anyone encounters this issue with the latest Xcode and Detox, please let me know, best if you'll provide a minimal reproduction—I'd be happy to look into it together. |
Thanks @asafkorem. We're not seeing issues at all, now, having removed the permissions request - we don't need it since Detox is bypassing that anyway. If someone else is seeing this with other permissions, perhaps they can try out @asafkorem's suggestion? |
Description
The app build with RN bundle. When launch app or reload, the iPhone simulator will be locked.
From below log, it run to "Launching com.jumptech.autodev..." then stuck due to screen locked.
Your environment
Detox version: 20.1.3
React Native version: 0.64.2
Node version: 16.13
Device model: iPhone 14 Pro
OS: 16.2
Test-runner (select one): jest / other
The text was updated successfully, but these errors were encountered: