Open aaronpliu opened 1 year ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back.
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. If you believe the issue is still relevant, please test on the latest Detox and report back.
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
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
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 --restartSB
?
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:
/src/devices/common/drivers/ios/tools/AppleSimUtils.js
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 permissions: { notifications: 'YES' }
.
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 AppleSimUtils
, so any permissions that require AppleSimUtils
could have the same effect.
@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