Unlocking an Android screen when "Screen lock type" is None does not work
See original GitHub issueUnlock screen does not work when “Screen lock type” is None
When using Appium 1.7.1 and starting Android settings, the Appium thinks that it is not able to unlock the screen. I have this code:
from appium import webdriver
settings_caps = {"appPackage": "com.android.settings",
"appActivity": ".Settings",
"platformName": "android",
"platformVersion": "7.0",
"deviceName": "Galaxy J5 (2017)"}
driver = webdriver.Remote('http://localhost:4723/wd/hub', settings_caps)
driver.quit()
Then I see this in the logs: https://gist.github.com/aaltat/15db505eb62bc5e1096de264a8648156
Environment
- Appium@1.7.1 and 1.7.0
- The problem does not occur in Appium@1.6.5:
- Running on Windows 7:
- Running NodeJs: v6.9.2
- Android 7.0
- Running reals device: Samsung J5 (2017)
Details
When running the code above, I see that screen unlock but for some reason the Appium server thinks that it can not unlock the screen.
Link to Appium logs
Log from the Appium server are here: https://gist.github.com/aaltat/15db505eb62bc5e1096de264a8648156
Issue Analytics
- State:
- Created 6 years ago
- Comments:19 (2 by maintainers)
Top Results From Across the Web
Screen Lock - 'None' Option Not Available
I have solution for this problem for Samsung s3 users. Go to settings> more> security> device administrators and enable android device. Now you ......
Read more >The option to select "none" is not available for me to remove ...
You will have to enter the password you already have set up to be able to remove the screen lock. I would try...
Read more >How to fix lock screen pin lock issues for Android? - YouTube
Having issues on with your lockscreen on your Android lollipop device? This video has got you covered, if this didn't fix your problem...
Read more >Unable to Unlock Your Android Smartphone? Here's What ...
For most phones, you can boot into safe mode by bringing up the power menu from the lock screen, then long-pressing the “Power...
Read more >Can't unlock your Android device - Google Support
If you can't unlock your phone, you'll need to erase it. Then you can set it up again and set a new screen...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have tried using the below code to unlock the device: cap.setCapability(“deviceName”, “Redmi”); cap.setCapability(“platformName”, “Andorid”); cap.setCapability(“platformVersion”, “6.0.1”); cap.setCapability(“unlockType”, “pin”); cap.setCapability(“unlockKey”, “1111”); cap.setCapability(“appPackage”, “com.miui.player”); cap.setCapability(“appActivity”, “com.miui.player.ui.MusicBrowserActivity”);
still I am getting the following error in appium logs: Encountered internal error running command: Error: Error finding unlock pin buttons!
Please help to resolve this issue.
@mykola-mokhnach already working on a solution. https://github.com/appium/appium-android-driver/compare/master...vrunoa:add-swipe-to-unlock We just need to swipe to unlock or use dismiss keyguard, already working on 5.1 and above, but something seems to be happing with 4.4 and touch actions. I’ll try to have this fixed for the end of the week. Let me know if you guys would like a first ship on this solution for 5.1 and above, and in a next stage we add 4.4.