-
Notifications
You must be signed in to change notification settings - Fork 391
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
chore: Handle app startup errors as session creation exceptions #855
Conversation
@KazuCocoa @Dan-Maor |
i tried to get this situation, but the My tested case was to launch a safari while showing a location permission alert.
Do you have any idea what app/alert could cause this case? @mykola-mokhnach |
when i forcefully removed |
Like I described you could try it with any app signed with enterprise signature, whose enterprise profile has not been accepted on the device yet. Another possible test case: make springboard to show any alert, for example ios update one and try to install an app without accepting the alert manually. WDA must be already running on the device while doing this |
let me find possible alerts. Permission dialogs by springboard did not block |
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.
lg, i have checked a couple of possible error cases with alert I could occur, but still no blocking behavior by alert for launch
API call yet, so I only saw The application '%@' cannot be launched because of an unexpected error: %@
error case without code modification to forcefully reach the blocking code.
the terminate
method was better than crashing WDA for me
I've ran some tests this morning by triggering an untrusted enterprise certificate popup and it didn't block session creation for other applications (tested on a real device running iOS 17.4), so I think this functionality may not be necessary, at least for real devices. Given that it generates additional payload via accessibility operations, I think this mechanism - if the issue can be reproduced on simulators - should be limited for simulators only. What do you think? |
it is reasonable for me, or I wonder if this Pr can be just one time alert existence check in https://github.com/appium/WebDriverAgent/pull/855/files#diff-468cd0130bf820fda63ed058220b6b951c0a59ad6e6ad009b1d67daa8b037ca7R97-R99 and add the alert existence in the error response. Then users can notice something alert could remain on the device since such trusted popup could remain on the device, and next time should be "cancel"ed |
Thanks for the feedback @Dan-Maor |
I have removed the alert presence check. Looks like it was probably a bug in earlier iOS versions. |
## [7.0.6](v7.0.5...v7.0.6) (2024-03-03) ### Miscellaneous Chores * Handle app startup errors as session creation exceptions ([#855](#855)) ([0ec5398](0ec5398))
🎉 This PR is included in version 7.0.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
.