Calabash Android runtime error : Could not remove keyguard

353 views Asked by At

I am getting the below error when i start the test server. The steps I followed are:

1) calabash-android resign features\com.whatsapp-v2.12.114-450480-Android-2.1.apk

2) calabash-android build features\com.whatsapp-v2.12.114-450480-Android-2.1.apk

Done signing the test server. Moved it to test_servers/55a1d403d4a789d5d979742ac47bc35c_0.5.10.apk

3)adb devices

List of devices attached 192.168.231.101:5555 device

4) calabash-android console features\com.whatsapp-v2.12.114-450480-Android-2.1.apk

5) irb(main):001:0> start_test_server_in_background

Then i see the below error..Please help

Starting calabash-android console...
Loading C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.10/irbrc
Running irb...
*** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansicon/) to get coloured output on Windows
irb(main):001:0> start_test_server_in_background
Starting: Intent { act=android.intent.action.MAIN cmp=com.whatsapp.test/sh.calaba.instrumentationbackend.WakeUp }
Error type 3
Error: Activity class {com.whatsapp.test/sh.calaba.instrumentationbackend.WakeUp} does not exist.
RuntimeError: Could not remove the keyguard
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.10/lib/calabash-android/operations.rb:567:in `block in wake_up'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/retriable-1.4.1/lib/retriable/retry.rb:27:in `perform'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/retriable-1.4.1/lib/retriable.rb:9:in `retriable'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.10/lib/calabash-android/operations.rb:566:in `wake_up'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.10/lib/calabash-android/operations.rb:590:in `start_test_server_in_background'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.10/lib/calabash-android/operations.rb:133:in `start_test_server_in_background'
        from (irb):1
        from C:/Ruby193/bin/irb:12:in `<main>'
irb(main):002:0>
1

There are 1 answers

1
Doron On BEST ANSWER

the keyguard is basically the feature that allows locking your android phone (with or without PIN). calabash has builtin code to handle unlocking on your phone in this case as long as the phone is not locked by pin\password. check if your device is locked using pin\password and remove it