NoMethodError when attempting to resign apk

301 views
Skip to first unread message

Travis Stull

unread,
Feb 27, 2014, 12:54:06 PM2/27/14
to calabash...@googlegroups.com
I'm new to calabash-android and I'm trying to get off the ground by running a simple test to check that my "Hello World" app has launched. I initially ran into the problem:

No test server found for this combination of app and calabash version. Recreating test server.
C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.4.20/lib/calabash-android/helpers.rb:91:in `block (2 levels) in fingerprint_from_apk': No RSA file found in META-INF. Cannot proceed.

I then read through forums and was able to sign the application using  jarsigner -keystore debug.keystore -storepass android -keypass androidAndroidDemoProject.apk androiddebugkey. I copied the signed apk back to my project directory and I tried to run my test again and ran into the "No test server found..." error again. So I tried the calabash-android resign <MyApk>.apk and I get

C:\AndroidDemoProject>calabash-android resign AndroidDemoProject.apk --verbose
2014-02-27 09:51:01 - JDK found on PATH.
2014-02-27 09:51:01 - JDK found at: C:\Program Files\Java\jdk1.7.0_51
2014-02-27 09:51:01 - Android SDK found at: C:\Users\tstull\Development\Android\sdk
2014-02-27 09:51:01 - Resign apk
2014-02-27 09:51:01 - Trying to read keystore from: V:/.android/debug.keystore - no such file
2014-02-27 09:51:01 - Trying to read keystore from: C:/AndroidDemoProject/debug.keystore - no such file
2014-02-27 09:51:01 - Trying to read keystore from: V:/.local/share/Xamarin/Mono for Android/debug.keystore - no such file
2014-02-27 09:51:01 - Trying to read keystore from: V:/AppData/Local/Xamarin/Mono for Android/debug.keystore - no such file
C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.4.20/lib/calabash-android/helpers.rb:77:in `sign_apk': private method `sign_apk' called for nil:NilClass (NoMethodError)
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.4.20/lib/calabash-android/helpers.rb:57:in `block in resign_apk'
        from C:/Ruby193/lib/ruby/1.9.1/tmpdir.rb:83:in `mktmpdir'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.4.20/lib/calabash-android/helpers.rb:51:in `resign_apk'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.4.20/bin/calabash-android:95:in `<top (required)>'
        from C:/Ruby193/bin/calabash-android:23:in `load'
        from C:/Ruby193/bin/calabash-android:23:in `<main>'

I'm stuck at this point and can't seem to find an answer anywhere. Any help would be greatly appreciated.

I'm running Windows 7 with the latest Android SDK (the adt bundle) that I downloaded yesterday (2/26/2014). My JDK version is 1.7.0_51

Balazs Balazs

unread,
Feb 27, 2014, 1:15:12 PM2/27/14
to calabash...@googlegroups.com
Hi there,

calabash doesn't find your debug.keystore.

I guess the easiest way is to put the keystore in your test project and create a .calabash_settings file with the following content:
 
{"keystore_location":"debug.keystore","keystore_password":"android","keystore_alias":"androiddebugkey"}

Regards,
Balazs
--
You received this message because you are subscribed to the Google Groups "calabash-android" group.
To unsubscribe from this group and stop receiving emails from it, send an email to calabash-andro...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Travis Stull

unread,
Feb 27, 2014, 2:39:15 PM2/27/14
to calabash...@googlegroups.com
This was resolved. Thank you Balazs.

Abhinav Sharma

unread,
Apr 24, 2014, 7:37:23 AM4/24/14
to calabash...@googlegroups.com
Hi Guys,

I am trying my hands on calabash, and while resigning the apk, i am getting following errors:
C:\Ruby200-x64\bin>calabash-android resign D:\Users\abhsharm\Downloads\flipkart_android.apk
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/calabash-android-0.4.22.pre1/lib/calabash-android/helpers.rb:77:in `sign_apk': private method `sign_apk' calle
d for nil:NilClass (NoMethodError)
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/calabash-android-0.4.22.pre1/lib/calabash-android/helpers.rb:57:in `block in resign_apk'
        from C:/Ruby200-x64/lib/ruby/2.0.0/tmpdir.rb:88:in `mktmpdir'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/calabash-android-0.4.22.pre1/lib/calabash-android/helpers.rb:51:in `resign_apk'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/calabash-android-0.4.22.pre1/bin/calabash-android:95:in `<top (required)>'
        from C:/Ruby200-x64/bin/calabash-android:23:in `load'
        from C:/Ruby200-x64/bin/calabash-android:23:in `<main>'

how do i get past the errors?

Thanks,
Abhi

birdyo...@gmail.com

unread,
Jan 22, 2017, 9:48:36 PM1/22/17
to calabash-android
Hi, I have been same problem/
I already try to move debug.keystore in same path.

But I can't resolve this issue.

2017-01-23 03:45:52 - Fingerprint: DE:7B:E2:06:E8:77:0B:6B:38:1B:21:7A:E1:AC:C5:86
2017-01-23 03:45:52 - Signature algorithm name: SHA256withRSA
2017-01-23 03:45:52 - Unlocked keystore at .android/debug.keystore - fingerprint: DE:7B:E2:06:E8:77:0B:6B:38:1B:21:7A:E1:AC:C5:86
2017-01-23 03:45:52 - Trying to read keystore from: debug.keystore - no such file
2017-01-23 03:45:52 - Trying to read keystore from: .local/share/Xamarin/Mono\ for\ Android/debug.keystore - no such file
2017-01-23 03:45:52 - Trying to read keystore from: AppData/Local/Xamarin/Mono for Android/debug.keystore - no such file
app.apk is not signed with any of the available keystores.
Tried the following keystores:
.android/debug.keystore

You can resign the app with .android/debug.keystore by running:
    calabash-android resign app.apk

Notice that resigning an app might break some functionality.
Getting a copy of the certificate used when the app was built will in general be more reliable.
2017-01-23 11:47:02 +0900 Test Report:

How can I resolve this issue?
Please help me.

2014년 2월 28일 금요일 오전 3시 15분 12초 UTC+9, Balazs Balazs 님의 말:
Reply all
Reply to author
Forward
0 new messages