PWAsForFirefox icon indicating copy to clipboard operation
PWAsForFirefox copied to clipboard

Closing Firefox causes PWA to crash

Open LSeelig opened this issue 1 year ago • 4 comments

Description

Closing Firefox (the browser, not PWA) after a PWA is launched on URL from the browser causes said PWA to crash.

Steps to Reproduce

  1. Install GitHub as a PWA
  2. Enable Launch this web app on matching website
  3. Enable automatic web app launching
  4. Navigate to or click on a Github.com url
  5. Close firefox with ctrl q (or the close button)
  6. Wait maybe half a second
  7. See error

Additional Information

This has been occurring for quite a while, but it went unreported because I couldn't replicate (I only just realized it was caused by auto-launching).

While I disabled all GNOME extensions and theming to test replicating the bug, I did not test removing my Firefox CSS theme (firefox-gnome-theme), which is more difficult to toggle.

I am using wayland. The crash brings up the Mozilla Crash Reporter (under xwayland for some reason).

If you can't replicate it, I can spin up a VM to test, but I have limited storage, so I'd rather not.

This occurred on a Framework Laptop 13 with an Intel i5 (12th gen). Due to my display's awkward resolution, I use wayland fractional scaling.

I am using Fedora's Firefox rpm (Mozilla Firefox for Fedora).

Error Log:

AdapterDeviceID: 0x46a6
AdapterDriverVendor: mesa/iris
AdapterDriverVersion: 23.3.5.0
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:121.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.7,wikipedia%40search.mozilla.org:1.3,bing%40search.mozilla.org:1.6,ddg%40search.mozilla.org:1.4,ebay%40search.mozilla.org:1.4
AvailablePageFile: 0
AvailablePhysicalMemory: 2772455424
AvailableSwapMemory: 8090284032
AvailableVirtualMemory: 9646223360
BackgroundTaskMode: 0
BuildID: 20240205133611
ContentSandboxCapabilities: 119
ContentSandboxCapable: 1
ContentSandboxLevel: 4
CrashTime: 1707422945
DOMFissionEnabled: 1
DOMIPCEnabled: 1
DesktopEnvironment: gnome
EMCheckCompatibility: true
EventLoopNestingLevel: 1
GpuSandboxLevel: 0
GraphicsNumActiveRenderers: 1
GraphicsNumRenderers: 1
HeadlessMode: 0
InstallTime: 1707242322
IsWayland: 1
LastStartupWasCrash: 0
LinuxUnderMemoryPressure: 0
MozCrashReason: Error reading events from display: Broken pipe
Notes: Fedora Linux 39 (Workstation Edition)FP(D00-L1000-W0000000-T010) WR? WR+ EGL? EGL- GL Context? GL Context+ 
ProductID: {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
ProductName: Firefox
ReleaseChannel: release
SafeMode: 0
SecondsSinceLastCrash: 175
StartupCacheValid: 1
StartupCrash: 0
StartupTime: 1707422807
SubmittedFrom: Client
TelemetryEnvironment: {"build":{"applicationId":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","applicationName":"Firefox","architecture":"x86-64","buildId":"20240205133611","version":"122.0.1","vendor":"Mozilla","displayVersion":"122.0.1","platformVersion":"122.0.1","xpcomAbi":"x86_64-gcc3","updaterAvailable":true},"partner":{"distributionId":"firefoxpwa","distributionVersion":"2.10.1","partnerId":null,"distributor":null,"distributorChannel":null,"partnerNames":[]},"system":{"memoryMB":15698,"virtualMaxMB":null,"cpu":{"count":16,"cores":12,"vendor":"GenuineIntel","name":"12th Gen Intel(R) Core(TM) i5-1240P","family":6,"model":154,"stepping":3,"l2cacheKB":1280,"l3cacheKB":12288,"speedMHz":4400,"extensions":["hasMMX","hasSSE","hasSSE2","hasSSE3","hasSSSE3","hasSSE4_1","hasSSE4_2","hasAVX","hasAVX2","hasAES"]},"os":{"name":"Linux","version":"6.6.14-200.fc39.x86_64","locale":"en-US","distro":"Fedora","distroVersion":"39"},"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":"Mesa Intel(R) Graphics (ADL GT2)","vendorID":"0x8086","deviceID":"0x46a6","subsysID":null,"RAM":0,"driver":null,"driverVendor":"mesa/iris","driverVersion":"23.3.5.0","driverDate":null,"GPUActive":true}],"monitors":[{"screenWidth":3606,"screenHeight":2404}],"features":{"compositor":"webrender","hwCompositing":{"status":"available"},"gpuProcess":{"status":"unused"},"webrender":{"status":"available"},"wrCompositor":{"status":"blocked:FEATURE_FAILURE_DISABLE_RELEASE_OR_BETA"},"openglCompositing":{"status":"available"},"omtp":{"status":"unused"}}},"appleModelId":null,"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.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,"general.config.filename":"<set>","media.gmp-gmpopenh264.lastInstallStart":1701573594,"media.gmp-gmpopenh264.lastDownload":1692817730,"media.gmp-gmpopenh264.lastDownloadFailed":1701573594,"media.gmp-gmpopenh264.lastDownloadFailReason":"Error: Failed downloading via ServiceRequest, status: 0, channelStatus: 2152398878, errorCode: 2, reason: error","media.gmp-gmpopenh264.lastUpdate":1692817730,"media.gmp-manager.lastCheck":1707412105,"media.gmp-manager.lastEmptyCheck":1707412105,"network.trr.strict_native_fallback":false,"widget.content.gtk-high-contrast.enabled":true},"sandbox":{"effectiveContentProcessLevel":4,"contentWin32kLockdownState":3},"addonCompatibilityCheckEnabled":true,"isDefaultBrowser":true,"defaultSearchEngine":"google-b-1-d","defaultSearchEngineData":{"loadPath":"[addon][email protected]","name":"Google","origin":"default","submissionURL":"https://www.google.com/search?client=firefox-b-1-d&q="}},"profile":{"creationDate":19592,"firstUseDate":19592},"addons":{"activeAddons":{"[email protected]":{"version":"1.0.1","scope":1,"type":"extension","updateDay":19759,"isSystem":true,"isWebExtension":true,"multiprocessCompatible":true,"blocklisted":false,"description":null,"name":"Form Autofill","userDisabled":false,"appDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"installDay":19587,"quarantineIgnoredByApp":true,"quarantineIgnoredByUser":false},"[email protected]":{"version":"1.0.0","scope":1,"type":"extension","updateDay":19759,"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":19587,"quarantineIgnoredByApp":true,"quarantineIgnoredByUser":false},"[email protected]":{"version":"39.0.1","scope":1,"type":"extension","updateDay":19759,"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":19587,"quarantineIgnoredByApp":true,"quarantineIgnoredByUser":false},"[email protected]":{"version":"121.0.0","scope":1,"type":"extension","updateDay":19759,"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":19587,"quarantineIgnoredByApp":true,"quarantineIgnoredByUser":false}},"theme":{"id":"[email protected]","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":19592,"updateDay":19592},"activeGMPlugins":{"gmp-gmpopenh264":{"version":"2.3.2","userDisabled":false,"applyBackgroundUpdates":1}}}}
Throttleable: 1
TotalPageFile: 25050877952
TotalPhysicalMemory: 16460947456
URL: https://github.com/
UptimeTS: 138.6342154
UtilityProcessStatus: Running
Vendor: Mozilla
Version: 122.0.1
useragent_locale: en-US

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

Affected Websites

  • ... www.github.com
  • ... www.youtube.com
  • ... probably any other? Those were the ones I tested

Environment

  • Operating system: Fedora Workstation
  • System architecture: x86-64
  • Desktop environment: GNOME 45
  • Installation method: RPM
  • PWAsForFirefox extension version: 2.10.1
  • PWAsForFirefox native version: 2.10.1
  • PWAsForFirefox runtime version: 122.0.1
  • Firefox version: 122.0

LSeelig avatar Feb 08 '24 20:02 LSeelig

So, closing the main Firefox browser crashes the PWA?

Can you please also test this:

  1. Disable automatic web app launching.
  2. Launch PWA from the list in the extension.
  3. Close the main Firefox.

Does this also crash the PWA? Also, did you quit Firefox immediately after opening the GitHub URL or wait until the PWA has been loaded? If you quit it immediately, please also try quitting it a few seconds after PWA has been loaded.

This might be caused because Firefox kills processes started from Native Messaging API (docs). However, I couldn't reproduce it in my Fedora VM, so I don't know if this is really the case. I will try to test it a bit more later, but I don't have time at the moment.

filips123 avatar Feb 08 '24 21:02 filips123

Opening from the menu and then closing firefox did not crash the PWA, however it did crash the very github window in which I was composing the response, which I think answers your second question 😂.

LSeelig avatar Feb 09 '24 03:02 LSeelig

I had Fedora 38 in my VM. Now I updated it to 39, and I can also reproduce this issue... However, a bunch of other packages were also updated, including Firefox (from version 119 to 122 I think) and PWAsForFirefox, so I still don't know what exactly now causes the issue, and why it didn't happen on Fedora 38 and Ubuntu.

I will try to fix it, but I probably won't have time in the next few weeks.

filips123 avatar Feb 09 '24 15:02 filips123

I think this has been occuring for a little while, but I unfortunately do not have specifics.

LSeelig avatar Feb 18 '24 02:02 LSeelig

Do you still have this issue? I updated Firefox from 122 to 125 (still on Fedora 39), and the issue doesn't happen anymore.

filips123 avatar Apr 28 '24 11:04 filips123

Do you still have this issue? I updated Firefox from 122 to 125 (still on Fedora 39), and the issue doesn't happen anymore.

I do not know. I have had a few oddball crashes I haven't been able to record, but I can't connect them to closing Firefox.

LSeelig avatar Apr 30 '24 19:04 LSeelig

Maybe these other crashes are related to #488. So, I will close this issue as it seems to be fixed. Please let me know if you have any other problems.

filips123 avatar May 01 '24 14:05 filips123