filips123 / PWAsForFirefox

A tool to install, manage and use Progressive Web Apps (PWAs) in Mozilla Firefox
https://pwasforfirefox.filips.si
Mozilla Public License 2.0
2.18k stars 51 forks source link

MacOS 13.6: Camera and Microphone permissions still cause crash #404

Open aiyagari opened 11 months ago

aiyagari commented 11 months ago
          @filips123 

I would like to reopen this as it is occurring again on Google Meet. I am a new user of this extension on Mac OS 13.6. Installing Google Meet into a new profile and trying to turn on Microphone and Camera causes it to crash.

AdapterDeviceID: 0x3e9b
AdapterVendorID: 0x8086
Add-ons: formautofill%40mozilla.org:1.0.1,pictureinpicture%40mozilla.org:1.0.0,screenshots%40mozilla.org:39.0.1,webcompat%40mozilla.org:118.0.0,default-theme%40mozilla.org:1.3,addons-search-detection%40mozilla.com:2.0.0,google%40search.mozilla.org:1.4,amazondotcom%40search.mozilla.org:1.6,wikipedia%40search.mozilla.org:1.3,bing%40search.mozilla.org:1.6,ddg%40search.mozilla.org:1.4,ebay%40search.mozilla.org:1.4
AvailablePhysicalMemory: 37773312
AvailableSwapMemory: 1110704128
BackgroundTaskMode: 0
BuildID: 20230927232528
ContentSandboxCapable: 1
ContentSandboxLevel: 3
CrashTime: 1696412391
DOMFissionEnabled: 1
DOMIPCEnabled: 1
EMCheckCompatibility: true
ExperimentalFeatures: devtools.inspector.compatibility.enabled
GpuSandboxLevel: 0
GraphicsNumRenderers: 1
HeadlessMode: 0
InstallTime: 1696379109
LastStartupWasCrash: 0
MacAvailableMemorySysctl: 75
MacMemoryPressure: Normal
MacMemoryPressureCriticalTime: Unset
MacMemoryPressureNormalTime: 1696412349
MacMemoryPressureSysctl: 1
MacMemoryPressureWarningTime: Unset
Notes: FP(D00-L1000-W0000000-T010) WR? WR+ GL Context? GL Context+ WebGL? WebGL+ 
ProductID: {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
ProductName: Firefox
PurgeablePhysicalMemory: 104812544
RDDProcessStatus: Running
ReleaseChannel: release
SafeMode: 0
SecondsSinceLastCrash: 837
StartupCacheValid: 1
StartupCrash: 0
StartupTime: 1696412349
SubmittedFrom: Client
TelemetryEnvironment: {"build":{"applicationId":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","applicationName":"Firefox","architecture":"x86-64","buildId":"20230927232528","version":"118.0.1","vendor":"Mozilla","displayVersion":"118.0.1","platformVersion":"118.0.1","xpcomAbi":"x86_64-gcc3","updaterAvailable":true},"partner":{"distributionId":"firefoxpwa","distributionVersion":"2.8.0","partnerId":null,"distributor":null,"distributorChannel":null,"partnerNames":[]},"system":{"memoryMB":32768,"virtualMaxMB":null,"cpu":{"extensions":["hasMMX","hasSSE","hasSSE2","hasSSE3","hasSSSE3","hasSSE4_1","hasSSE4_2","hasAVX","hasAVX2","hasAES"]},"os":{"name":"Darwin","version":"22.6.0","locale":"en-US"},"hdd":{"profile":{"model":null,"revision":null,"type":null},"binary":{"model":null,"revision":null,"type":null},"system":{"model":null,"revision":null,"type":null}},"gfx":{"D2DEnabled":null,"DWriteEnabled":null,"ContentBackend":"Skia","Headless":false,"EmbeddedInFirefoxReality":null,"TargetFrameRate":60,"adapters":[{"description":null,"vendorID":"0x8086","deviceID":"0x3e9b","subsysID":null,"RAM":0,"driver":null,"driverVendor":null,"driverVersion":null,"driverDate":null,"GPUActive":true},{"description":null,"vendorID":"0x1002","deviceID":"0x7340","subsysID":null,"RAM":0,"driver":null,"driverVendor":null,"driverVersion":null,"driverDate":null,"GPUActive":null}],"monitors":[{"screenWidth":3840,"screenHeight":2160,"scale":1},{"screenWidth":4096,"screenHeight":2560,"scale":2}],"features":{"compositor":"webrender","hwCompositing":{"status":"available"},"gpuProcess":{"status":"unused"},"webrender":{"status":"available"},"wrCompositor":{"status":"available"},"openglCompositing":{"status":"available"},"omtp":{"status":"unused"}}},"appleModelId":"MacBookPro16,1","hasWinPackageId":null},"settings":{"blocklistEnabled":true,"e10sEnabled":true,"e10sMultiProcesses":8,"fissionEnabled":true,"telemetryEnabled":false,"locale":"en-US","intl":{"requestedLocales":["en-US"],"availableLocales":["en-US"],"appLocales":["en-US"],"systemLocales":["en-US"],"regionalPrefsLocales":["en-US"],"acceptLanguages":["en-US","en"]},"update":{"channel":"release","enabled":true,"autoDownload":true,"background":true},"userPrefs":{"app.shield.optoutstudies.enabled":false,"browser.fixup.alternate.enabled":false,"browser.search.region":"US","browser.search.widget.inNavBar":false,"browser.urlbar.autoFill":true,"browser.urlbar.autoFill.adaptiveHistory.enabled":false,"browser.urlbar.dnsResolveSingleWordsAfterSearch":0,"browser.urlbar.quicksuggest.dataCollection.enabled":false,"browser.urlbar.suggest.quicksuggest.nonsponsored":true,"browser.urlbar.suggest.quicksuggest.sponsored":true,"browser.urlbar.suggest.bestmatch":true,"general.config.filename":"<set>","media.gmp-gmpopenh264.lastInstallStart":1696411481,"media.gmp-gmpopenh264.lastDownload":1696411481,"media.gmp-gmpopenh264.lastUpdate":1696411481,"media.gmp-widevinecdm.lastInstallStart":1696411481,"media.gmp-widevinecdm.lastDownload":1696411483,"media.gmp-widevinecdm.lastUpdate":1696411483,"network.trr.strict_native_fallback":false,"widget.content.gtk-high-contrast.enabled":true},"sandbox":{"effectiveContentProcessLevel":3,"contentWin32kLockdownState":3},"addonCompatibilityCheckEnabled":true,"isDefaultBrowser":false,"defaultSearchEngine":"google-b-1-d","defaultSearchEngineData":{"loadPath":"[addon]google@search.mozilla.org","name":"Google","origin":"default","submissionURL":"https://www.google.com/search?client=firefox-b-1-d&q="}},"profile":{"creationDate":19634,"firstUseDate":19634},"addons":{"activeAddons":{"formautofill@mozilla.org":{"version":"1.0.1","scope":1,"type":"extension","updateDay":19628,"isSystem":true,"isWebExtension":true,"multiprocessCompatible":true,"blocklisted":false,"description":null,"name":"Form Autofill","userDisabled":false,"appDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"installDay":19628,"quarantineIgnoredByApp":true,"quarantineIgnoredByUser":false},"pictureinpicture@mozilla.org":{"version":"1.0.0","scope":1,"type":"extension","updateDay":19628,"isSystem":true,"isWebExtension":true,"multiprocessCompatible":true,"blocklisted":false,"description":"Fixes for web compatibility with Picture-in-Picture","name":"Picture-In-Picture","userDisabled":false,"appDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"installDay":19628,"quarantineIgnoredByApp":true,"quarantineIgnoredByUser":false},"screenshots@mozilla.org":{"version":"39.0.1","scope":1,"type":"extension","updateDay":19628,"isSystem":true,"isWebExtension":true,"multiprocessCompatible":true,"blocklisted":false,"description":"Take clips and screenshots from the Web and save them temporarily or permanently.","name":"Firefox Screenshots","userDisabled":false,"appDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"installDay":19628,"quarantineIgnoredByApp":true,"quarantineIgnoredByUser":false},"webcompat@mozilla.org":{"version":"118.0.0","scope":1,"type":"extension","updateDay":19628,"isSystem":true,"isWebExtension":true,"multiprocessCompatible":true,"blocklisted":false,"description":"Urgent post-release fixes for web compatibility.","name":"Web Compatibility Interventions","userDisabled":false,"appDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"installDay":19628,"quarantineIgnoredByApp":true,"quarantineIgnoredByUser":false}},"theme":{"id":"default-theme@mozilla.org","blocklisted":false,"description":"Follow the operating system setting for buttons, menus, and windows.","name":"System theme — auto","userDisabled":false,"appDisabled":false,"version":"1.3","scope":4,"foreignInstall":false,"hasBinaryComponents":false,"installDay":19634,"updateDay":19634},"activeGMPlugins":{"gmp-gmpopenh264":{"version":"2.3.2","userDisabled":false,"applyBackgroundUpdates":1},"gmp-widevinecdm":{"version":"4.10.2557.0","userDisabled":false,"applyBackgroundUpdates":1}}}}
Throttleable: 1
TotalPhysicalMemory: 34359738368
URL: https://meet.google.com/egx-ftiu-eqj?ijlm=1696412387677&adhoc=1&hs=187
UptimeTS: 42.6487911
UtilityProcessStatus: Running
Vendor: Mozilla
Version: 118.0.1
useragent_locale: en-US

This report also contains technical information about the state of the application when it crashed.

Originally posted by @aiyagari in https://github.com/filips123/PWAsForFirefox/issues/207#issuecomment-1746513596

filips123 commented 11 months ago

I don't know why this happens. I didn't change anything related to permissions recently, so it might be a change in new Firefox or macOS version. Can you test if this also happens with other websites that use camera and microphone. Also, can you submit the crash report to Mozilla and link the URL here (you can probably find it in about:crashes), as that report contains more useful data.

aiyagari commented 11 months ago

Same problem occurs on https://meet.jit.si

I am not sure how to report this to Mozilla. If I open either site with the standard Firefox build, it works.

The problem seems to be in the trigger over permission management. In fact, if we can find a way to directly enable microphone/camera in the profile without going through the UI, I think that would be a workaround.

aiyagari commented 11 months ago

I found a workaround - only needs to be done once at installation of the Google Meet profile, so maybe it can go in the FAQ and we can call it a day.

  1. Create the PWA via the normal process
  2. Use Cmd-I to manually open the permissions window and select the Permissions tab
  3. Set Microphone and Camera to Always Allow
  4. Start an Instant Meeting. It will crash. Don't bother sending crash information. But important state information has been left in the profile, as we will see.
  5. Launch the PWA again. Don't start a meeting yet. Instead, go to Settings. MacOS will pop up its own dialog - "Do you want to allow Google Meet to access the Microphone?" - Answer Yes. Then it will ask "Do you want to allow Google Meet to access the Camera?" - Answer Yes. These were the missing workflow items that didn't happen before.
  6. In Settings, select the proper Camera and Microphone (I have multiple of each, so I tested and this works). If you have multiple speakers, you need to select "MacBook Pro Speakers" and it will use whatever the "System speaker" is from your main toolbar (so even though it says MBP Speakers it uses my headphones, which is what I want anyway).
  7. Now start an instant meeting, and go to settings, and set up send/receive resolutions, virtual backgrounds etc (these are not available until you are inside a meeting). I am OK with closing this with a FAQ item as it's a one-time configuration item for people - once the Google Meet (or whatever video platform you are on) profile is set up, you never have to do this again, as the same profile is reused when you launch the web app again.
filips123 commented 10 months ago

I tested it on https://meet.jit.si/ on my macOS VM and it doesn't crash, and I get a permissions prompt from macOS. I don't get any sound though, but this is probably caused by VM or my old macOS version. Can you also test on a different computer?

I'm still not sure why this happens. Those permission entries in Info.plist should still be there, and I didn't change anything related... I would like to properly fix this, but I don't know how. So, I'll probably add it to FAQ for now and keep this issue open.

I now added this to the FAQ.