Closed Bug 1581238 Opened 5 years ago Closed 5 years ago

webauthn / navigator.credentials.create throws DOMError when inspector/debugger is open

Categories

(DevTools :: Debugger, defect)

69 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: sean, Unassigned)

Details

(Whiteboard: needs-review)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:69.0) Gecko/20100101 Firefox/69.0

Steps to reproduce:

Called navigator.credentials.create with the inspector open to the debug tab and some breakpoints set.

Note that this works correctly with the inspector closed.

This can be easily duplicated by going to https://u2f.bin.coffee/ and opening the inspector and then clicking U2F register. The window will turn red and indicate an error. If the inspector is closed and the page reloaded, it works correctly.

Firefox 69.0, MacosX 10.14.6, yubikey 4

Actual results:

navigator.credentials.create threw an error:

NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.

Expected results:

Firefox prompts for a user interaction with the physical key.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Debugger
Product: Firefox → DevTools
Whiteboard: needs-review
Attached image image.png

@Mollet, I can see red window even without the DevTools toolbox being open

I just clicked the U2F Register button twice

Can you see that too?

Honza

Flags: needinfo?(sean)

If you don't have a U2F key or don't use a U2F emulator, then it will show red and an error, that's an expected behavior. The bug is that even with a key, if the debugger is open, it fails.

Here's an emulator that you can use on Linux:

https://github.com/danstiner/rust-u2f

Testing this on another computer with 69.0.1, it appears to have been fixed. I updated the laptop where I originally found and reported this buy to 69.0.1 and it's fixed there as well.

Flags: needinfo?(sean)

(In reply to Mollet from comment #3)

Testing this on another computer with 69.0.1, it appears to have been fixed. I updated the laptop where I originally found and reported this buy to 69.0.1 and it's fixed there as well.

Thanks for the update!

I am closing the report for now, but feel free to reopen if you see the problem again.

Honza

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: