Closed Bug 1864243 Opened 2 years ago Closed 2 years ago

WebMIDI not working in snap package

Categories

(Firefox Build System :: Third Party Packaging, defect)

Firefox 119
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ebababi, Assigned: ebababi)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

49 bytes, text/x-github-pull-request
Details | Review

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

Steps to reproduce:

This issue concerns the Firefox snap package. Even though MIDI devices are successfully connected and used by other applications, visiting any site using the WebMIDI API fails to enumerate the available MIDI devices.

An example site is: https://webmidi-examples.glitch.me/

Actual results:

Calling navigator.requestMIDIAccess() immediately fails with the console message "Silently denying site request for MIDI access because no devices were detected. You may need to restart your browser after connecting a new device."

Expected results:

The MIDI devices should have been enumerated through the WebMIDI API.

Thanks, for the patch, you should probably submit the same for all branches, but usually we first merge them to nightly

Blocks: snap
Flags: needinfo?(ebababi)
Assignee: nobody → ebababi

(In reply to Nikolaos Anastopoulos from comment #1)

Here's a potential patch: https://github.com/canonical/firefox-snap/pull/36

Is it enough or other changes might be required ? I dont have a MIDI device to verify

Is it enough or other changes might be required ?

To be honest I'm not very familiar with snapcraft and I couldn't really test this. Based on this post, there might be one more step that we need to take in order for this to work. Happy to test any builds with real hardware.

I dont have a MIDI device to verify

Maybe try with ALSA virtual MIDI devices?

$ sudo modprobe snd-virmidi snd_index=1
$ amidi -l                             
Dir Device    Name
IO  hw:4,0    Virtual Raw MIDI (16 subdevices)
IO  hw:4,1    Virtual Raw MIDI (16 subdevices)
IO  hw:4,2    Virtual Raw MIDI (16 subdevices)
IO  hw:4,3    Virtual Raw MIDI (16 subdevices)
Flags: needinfo?(ebababi)

(In reply to :gerard-majax from comment #3)
(In reply to Nikolaos Anastopoulos from comment #4)

[...] Based on this post, there might be one more step that we need to take in order for this to work.

Sorry, I meant this post: https://forum.snapcraft.io/t/the-alsa-interface/7766/7

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

For more information, please visit BugBot documentation.

Flags: needinfo?(lissyx+mozillians)
Attached file GitHub Pull Request
Flags: needinfo?(lissyx+mozillians)

This is fixed on nightly already and it's going to be merged soon on other branches.

Thanks Nikolaos for the patch!

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

Attachment

General

Creator:
Created:
Updated:
Size: