Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Exception in Samsung Galaxy S5 #6

Closed
hatpick opened this issue Apr 2, 2016 · 18 comments
Closed

Exception in Samsung Galaxy S5 #6

hatpick opened this issue Apr 2, 2016 · 18 comments

Comments

@hatpick
Copy link

hatpick commented Apr 2, 2016

Hi again,

I'm getting this error when I try a not-registered finger:

java.lang.NoSuchMethodError: com.samsung.android.fingerprint.FingerprintEvent.getImageQualityFeedback
      at com.samsung.android.sdk.pass.c.run(Unknown Source)
      at android.os.Handler.handleCallback(Handler.java:733)
      at android.os.Handler.dispatchMessage(Handler.java:95)
      at android.os.Looper.loop(Looper.java:136)
      at android.app.ActivityThread.main(ActivityThread.java:5579)
      at java.lang.reflect.Method.invokeNative(Native Method)
      at java.lang.reflect.Method.invoke(Method.java:515)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
      at dalvik.system.NativeStart.main(Native Method)
@ajalt
Copy link
Owner

ajalt commented Apr 2, 2016

Man, Samsung's SDK is just the worst.Thanks for reporting this. Samsung only distributes obfuscated versions of their SDKs, and it looks like they've incorrectly configured their proguard configuration or something similar. The FingerprintEvent just isn't present in the SDK.

Which version of reprint are you using when you get this error? If you're using the latest version, try downgrading to 2.5.5, which uses an older version of the Samsung SDK and let me know if the bug is still present.

@hatpick
Copy link
Author

hatpick commented Apr 4, 2016

I'm using the latest. I switched back to 2.5.5 and I still get the same exception.

@ajalt
Copy link
Owner

ajalt commented Apr 5, 2016

That's really strange. What version of Android are you running? Did you install a system update recently?

I've got an S5 on order, so I'll be able to test once it gets here.

@hatpick
Copy link
Author

hatpick commented Apr 5, 2016

It's api 19 (4.4.2) and haven't installed any new updates recently. It doesn't happen all the time, but sometimes I get the error.

@ajalt
Copy link
Owner

ajalt commented Apr 6, 2016

Well, I got the S5 in to test with. I can't replicate the crash. Everything I can think of to try works fine. Does the reprint sample app crash, or just your app that uses reprint? If it's the latter, can you show me how you're using reprint?

@hatpick
Copy link
Author

hatpick commented Apr 6, 2016

It crashes my app, and here's how I'm using reprint:

Reprint.initialize(this); inside application onCreate

and then I have a lock activity that starts if user has been inactive for a certain amount of time.

if(Reprint.isHardwarePresent() && Reprint.hasFingerprintRegistered()) {
   Reprint.authenticate(this);
}
public class LockActivity extends SecureActivity implements AuthenticationListener {
   @Override
    public void onSuccess(int moduleTag) {
        LogUtil.i(TAG, "Used: " + moduleTag);
        showSuccess();
    }

    @Override
    public void onFailure(AuthenticationFailureReason failureReason, boolean fatal,
                          CharSequence errorMessage, int moduleTag, int errorCode) {
        showError(failureReason, fatal, errorMessage, errorCode);
    }
}

@ajalt
Copy link
Owner

ajalt commented Apr 7, 2016

Are you able to build the reprint sample app? Does that also crash?

@hatpick
Copy link
Author

hatpick commented Apr 8, 2016

Is there an apk I can try, I can't build from source.

@ajalt
Copy link
Owner

ajalt commented Apr 8, 2016

I added a debug sample apk to the latest release page

https://github.com/ajalt/reprint/releases/download/2.5.6/sample-debug.apk

What error were you getting when you tried to build it?

@hatpick
Copy link
Author

hatpick commented Apr 8, 2016

I still get the same exception on any unregistered finger swipe.

@hatpick hatpick closed this as completed Apr 8, 2016
@hatpick hatpick reopened this Apr 8, 2016
@hatpick
Copy link
Author

hatpick commented Apr 11, 2016

I occasionally get this following message during build:

warning: Ignoring InnerClasses attribute for an anonymous inner class
(com.samsung.android.sdk.pass.a) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(com.samsung.android.sdk.pass.b) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(com.samsung.android.sdk.pass.c) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(com.samsung.android.sdk.pass.d) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(com.samsung.android.sdk.pass.e) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.

@ajalt
Copy link
Owner

ajalt commented Apr 11, 2016

I'm pretty sure that's just a result of the way the Samsung SDK is compiled. Samsung doesn't distribute sources, so we're stuck with what they give us. As far as I've been able to tell, there's nothing that can be done about those warnings.

Thanks for posting this though. It's tough to figure out what to do about your original crash, since even the S5 that I ordered for testing doesn't exhibit the issue. So if you get any more information, please post it.

@hatpick
Copy link
Author

hatpick commented Apr 13, 2016

I'll keep you posted.

@mattinger
Copy link

I've seen this issue using the spass SDK directly. It's definitely an issue with the SDK, and going back to version 1.1.4 of the SDK resolves the issue. Granted, that's not a viable approach going forward, but it's a temporary fix.

@ajalt
Copy link
Owner

ajalt commented May 26, 2016

Good to know! Would you rather have Reprint revert the spass version for now, or leave it and hope that Samsung releases an update some day?

@mattinger
Copy link

I'm not using Reprint at the moment. But when searching for the error i was facing i came across this. I'm definitely considering replacing my homegrown solution with this.

@hatpick
Copy link
Author

hatpick commented May 27, 2016

If that fixes the issue I'd appreciate it if you revet the spass version for now.

ajalt added a commit that referenced this issue May 29, 2016
This is due to bugs in versions 1.2.x, as reported in #6
ajalt added a commit that referenced this issue May 29, 2016
This is due to bugs in versions 1.2.x, as reported in #6
@ajalt
Copy link
Owner

ajalt commented May 29, 2016

I reverted spass to 1.1.4. Hopefully Samsung will fix the bug soon, but I'm not going to hold my breath. Thanks for the reports.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants