android icon indicating copy to clipboard operation
android copied to clipboard

App crashing when using WebAuthn

Open LBreda opened this issue 1 year ago • 6 comments
trafficstars

⚠️ Before posting ⚠️

  • [X] This is a bug, not a question or an enhancement.
  • [X] I've searched for similar issues and didn't find a duplicate.
  • [X] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • [X] I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

  1. Open the app
  2. Write down my server address
  3. Log in
  4. Select the WebAuthn second factor option
  5. Confirm on the system intent my will to use a key

Expected behaviour

Initiation of the key authorization process

Actual behaviour

Application crash

Android version

11

Device brand and model

Xiaomi Mi 9T

Stock or custom OS?

Stock

Nextcloud android app version

3.27.0

Nextcloud server version

Hub 7 (28.0.2)

Using a reverse proxy?

Yes

Android logs

No response

Server error logs

No response

Additional information

No response

LBreda avatar Feb 13 '24 19:02 LBreda

Do you have the crash output/stack trace?

joshtrichards avatar Feb 15 '24 14:02 joshtrichards

Cause of error

Exception in thread "main" java.lang.RuntimeException: Error receiving broadcast Intent { act=de.cotech.hw.ACTION_USB flg=0x10 pkg=com.nextcloud.client } in de.cotech.hw.internal.transport.usb.UsbConnectionDispatcher$1@dfceb0d
    at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1572)
    at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run(Unknown Source:2)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:236)
    at android.app.ActivityThread.main(ActivityThread.java:7876)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
Caused by: Exception in thread "main" java.lang.NullPointerException: Attempt to invoke virtual method 'int android.hardware.usb.UsbDevice.getInterfaceCount()' on a null object reference
    at de.cotech.hw.internal.transport.usb.UsbDeviceManager.isRelevantDevice(UsbDeviceManager.java:163)
    at de.cotech.hw.internal.transport.usb.UsbConnectionDispatcher.handleConnectedUsbDevice(UsbConnectionDispatcher.java:93)
    at de.cotech.hw.internal.transport.usb.UsbConnectionDispatcher.access$100(UsbConnectionDispatcher.java:48)
    at de.cotech.hw.internal.transport.usb.UsbConnectionDispatcher$1.onReceive(UsbConnectionDispatcher.java:80)
    at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1562)
    at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run(Unknown Source:2)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:236)
    at android.app.ActivityThread.main(ActivityThread.java:7876)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)

App information

  • ID: com.nextcloud.client
  • Version: 30270090
  • Build flavor: gplay

Device information

  • Brand: Xiaomi
  • Device: davinci
  • Model: Mi 9T
  • Id: RKQ1.200826.002
  • Product: davinci

Firmware

  • SDK: 30
  • Release: 11
  • Incremental: V12.1.4.0.RFJMIXM

LBreda avatar Feb 15 '24 14:02 LBreda

What key do you use and how is it connected? NFC or real USB?

tobiasKaminsky avatar Feb 16 '24 10:02 tobiasKaminsky

It is a SoloKey version 2, connected via USB. No issue with the same key on other applications and websites, and no issue with the same key on the same NextCloud instance via browser (both the phone itself or a PC).

LBreda avatar Feb 16 '24 10:02 LBreda

I only have this one https://www.yubico.com/de/product/security-key-nfc-by-yubico/ I connected it via usb C -> Usb A connector. And it works for me.

Can you point me to your exact key and specs?

tobiasKaminsky avatar Feb 16 '24 10:02 tobiasKaminsky

https://solokeys.com/collections/all/products/solo-2a-nfc-security-key-built-with-trussed%C2%AE

It is a pretty normal FIDO key, I use it everywhere.

LBreda avatar Feb 16 '24 11:02 LBreda

Can you test NFC?

tobiasKaminsky avatar Feb 19 '24 09:02 tobiasKaminsky

Oh, I didn't try before. Tried now, and it works. Still it doesn't with USB.

LBreda avatar Feb 19 '24 10:02 LBreda