Open Bug 1850446 Opened 2 years ago Updated 1 year ago

navigator.requestMIDIAccess fails to work on file:// schema

Categories

(Core :: DOM: Device Interfaces, defect, P3)

Firefox 116
defect

Tracking

()

UNCONFIRMED

People

(Reporter: descartavel1, Assigned: gsvelto)

References

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0

Steps to reproduce:

webMIDI is not available when a file schema secure context.

related https://bugzilla.mozilla.org/show_bug.cgi?id=1757153

serving from file:///test.html:

Actual results:

window.isSecureContext; // returns TRUE
navigator.requestMIDIAccess; // is UNDEFINED

Expected results:

navigator.requestMIDIAccess; // should be a function

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Component: Widget: Gtk → DOM: Device Interfaces

The severity field is not set for this bug.
:cmartin, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(cmartin)

Assigning to Gabriele for now, since he works on the MIDI stuff.

Assignee: nobody → gsvelto
Severity: -- → S3
Flags: needinfo?(cmartin)
Priority: -- → P3

This was a deliberate choice when the API was gated in bug 1778959. I don't know the reasoning behind it though as I didn't work on the API access permissions.

@gsvelto, thank you for the context. Who do you think then should this be assigned to?

I'm not really sure, sorry. We've been busy with a lot of stuff and WebMIDI ended up in the back burner for a bit.

Worth noting that if trying to serve locally, "http://127.0.0.1:8080" and "http://[::1]:8080" work as expected but "http://[::]:8080" fails.

So, it's not just the "file://" schema but there's also other nuanced restrictions in even stranger places with little to no helpful errors explaining what's broken.

You need to log in before you can comment on or make changes to this bug.