NoSuchMethodException: {makeCredential, getAssertion} in WebAuthnUtils

RESOLVED FIXED in Firefox 68

Status

()

defect
P1
major
RESOLVED FIXED
Last month
Last month

People

(Reporter: jcj, Assigned: jcj)

Tracking

(Regression)

68 Branch
mozilla68
Unspecified
Android
Points:
---

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

Last month

On Fennec builds from 17 May 2019 (and possibly earlier), we're getting an exception when trying to Make Credential from WebAuhthn:

05-17 14:58:11.342 29599 29731 W WebAuthnTokenManager: Couldn't run WebAuthnUtils
05-17 14:58:11.342 29599 29731 W WebAuthnTokenManager: java.lang.NoSuchMethodException: makeCredential [class java.lang.String, class org.mozilla.gecko.util.GeckoBundle, class [B, class [B, long, class java.lang.String, class [Lorg.mozilla.gecko.WebAuthnTokenManager$WebAuthnPublicCredential;, class org.mozilla.gecko.util.GeckoBundle, class org.mozilla.gecko.util.GeckoBundle, interface org.mozilla.gecko.WebAuthnTokenManager$WebAuthnMakeCredentialResponse]
05-17 14:58:11.342 29599 29731 W WebAuthnTokenManager:  at java.lang.Class.getMethod(Class.java:2068)
05-17 14:58:11.342 29599 29731 W WebAuthnTokenManager:  at java.lang.Class.getDeclaredMethod(Class.java:2047)
05-17 14:58:11.342 29599 29731 W WebAuthnTokenManager:  at org.mozilla.gecko.WebAuthnTokenManager.webAuthnMakeCredential(WebAuthnTokenManager.java:118)
05-17 14:58:11.342 29599 29731 W WebAuthnTokenManager:  at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native Method)
05-17 14:58:11.342 29599 29731 W WebAuthnTokenManager:  at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:476)

The NoSuchMethodException happens after resolving the WebAuthnUtils class, so the class exists.

The method signature from above is:
makeCredential [class java.lang.String, class org.mozilla.gecko.util.GeckoBundle, class [B, class [B, long, class java.lang.String, class [Lorg.mozilla.gecko.WebAuthnTokenManager$WebAuthnPublicCredential;, class org.mozilla.gecko.util.GeckoBundle, class org.mozilla.gecko.util.GeckoBundle, interface org.mozilla.gecko.WebAuthnTokenManager$WebAuthnMakeCredentialResponse]

The one from current m-c is:

    public static void makeCredential(final String rpId, final GeckoBundle identifiers,
                                      final byte[] userId, final byte[] challenge,
                                      final long timeoutMs, final String originStr,
                                      final WebAuthnTokenManager.WebAuthnPublicCredential[] excludeList,
                                      final GeckoBundle authenticatorSelection,
                                      final GeckoBundle extensions,
                                      WebAuthnTokenManager.WebAuthnMakeCredentialResponse handler)```

Careful inspection shows a match of function signatures.

The involved files are:
https://hg.mozilla.org/mozilla-central/log/tip/mobile/android/geckoview/src/main/java/org/mozilla/gecko/WebAuthnTokenManager.java
https://hg.mozilla.org/mozilla-central/log/tip/mobile/android/base/java/org/mozilla/gecko/util/WebAuthnUtils.java

There's nothing as of morning 17 May 2019 that should have impacted these two classes. (Note, there's a consolidation patch on inbound that affects the signatures). The only external non-primitive type in that signature is GeckoBundle, which similarly is without change:

https://hg.mozilla.org/mozilla-central/log/tip/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/GeckoBundle.java

This did work at the beginning of the week. It also works fine in local builds. So now the mystery is: Why all of a sudden is there a NoSuchMethodException?

Assignee

Comment 2

Last month

Found the culprit, a Proguard rule update. Will produce a patch.

Regressed by: 1550596
Assignee

Comment 3

Last month

A Proguard update in Bug 1550596 optimized away the WebAuthn methods, but
there's a convenient ReflectionTarget defined to say 'hey, don't do that.'

Assignee

Comment 4

Last month

[Tracking Requested - why for this release]:
WebAuthn on Fennec is totally disabled without this patch. If we can't land before merge, we'll have to uplift this into Fennec 68.

Comment 5

Last month
Pushed by jjones@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2c73613d29c2
Annotate WebAuthn reflection methods as @ReflectionTarget r=nalexander
Assignee

Comment 6

Last month

Woot, made it!

Comment 7

Last month
bugherder
Status: ASSIGNED → RESOLVED
Closed: Last month
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.