Closed Bug 1748441 Opened 2 years ago Closed 2 years ago

[msix] "Take Screenshot" context menu does not start taking-screenshot mode

Categories

(WebExtensions :: General, defect)

x86_64
Windows 10
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: saschanaz, Unassigned)

References

(Blocks 1 open bug)

Details

Nothing happens if I right-click anywhere on any page and click "Take Screenshot".

Some things:

  • I'm on MSIX installation
  • It works on latest Nightly from mozregression
  • It works if I run the MSIX installation with a new profile
  • It does not work if I run it with my current profile in troubleshoot mode
  • Browser Console does not show any error message with "Show Content Messages" enabled.

So I guess some flag may be the culprit?

Application Basics
------------------

Name: Firefox
Version: 97.0a1
Build ID: 20220103092929
Distribution ID: mozilla-MSIX
Update Channel: nightly
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0
OS: Windows_NT 10.0 22000
Launcher Process: Enabled
Multiprocess Windows: 1/1
Fission Windows: 1/1 Enabled by default
Remote Processes: 21
Enterprise Policies: Inactive
Google Location Service Key: Found
Google Safebrowsing Key: Found
Mozilla Location Service Key: Found
Safe Mode: false

Experimental Features
---------------------

about:home startup cache (browser.startup.homepage.abouthome_cache.enabled): true
Cookies: SameSite=Lax by default (network.cookie.sameSite.laxByDefault): true
Cookies: SameSite=None requires secure attribute (network.cookie.sameSite.noneRequiresSecure): true
Cookies: Schemeful SameSite (network.cookie.sameSite.schemeful): true
CSS: Constructable Stylesheets (layout.css.constructable-stylesheets.enabled): false
CSS: Masonry Layout (layout.css.grid-template-masonry-value.enabled): true
Developer Tools: Compatibility Panel (devtools.inspector.compatibility.enabled): true
Developer Tools: Execution Context Selector (devtools.webconsole.input.context): true
Developer Tools: Service Worker debugging (devtools.debugger.features.windowless-service-workers): false
Media: JPEG XL (image.jxl.enabled): true
Address Bar: show results during IME composition (browser.urlbar.keepPanelOpenDuringImeComposition): true
Web API: WebGPU (dom.webgpu.enabled): false
WebRTC Global Mute Toggles (privacy.webrtc.globalMuteToggles): false
Win32k Lockdown (security.sandbox.content.win32k-disable): false

Remote Experiments
------------------

Firefox 100 User-Agent Nightly 97-99: version-100

Important Modified Preferences
------------------------------

accessibility.typeaheadfind.enablesound: false
accessibility.typeaheadfind.flashBar: 0
browser.contentblocking.category: strict
browser.search.region: DE
browser.sessionstore.upgradeBackup.latestBuildID: 20220103092929
browser.startup.homepage_override.buildID: 20220103092929
browser.startup.homepage_override.mstone: 97.0a1
browser.startup.page: 3
browser.urlbar.keepPanelOpenDuringImeComposition: true
browser.urlbar.maxRichResults: 12
browser.urlbar.placeholderName: DuckDuckGo
browser.urlbar.placeholderName.private: DuckDuckGo
browser.urlbar.quicksuggest.migrationVersion: 2
browser.urlbar.quicksuggest.scenario: history
browser.urlbar.tabToSearch.onboard.interactionsLeft: 0
browser.urlbar.tipShownCount.searchTip_onboard: 4
browser.urlbar.tipShownCount.searchTip_redirect: 4
doh-rollout.balrog-migration-done: true
doh-rollout.doneFirstRun: true
doh-rollout.home-region: DE
dom.security.https_only_mode: true
dom.security.https_only_mode_ever_enabled: true
extensions.lastAppVersion: 97.0a1
general.useragent.override: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0
gfx.crash-guard.status.wmfvpxvideo: 2
gfx.crash-guard.wmfvpxvideo.appVersion: 97.0a1
gfx.crash-guard.wmfvpxvideo.deviceID: 0x8a52
gfx.crash-guard.wmfvpxvideo.driverVersion: 27.20.100.9621
gfx.webrender.all: true
gfx.webrender.enabled: true
idle.lastDailyNotification: 1641227831
image.jxl.enabled: true
media.autoplay.default: 5
media.gmp-gmpopenh264.abi: x86_64-msvc-x64
media.gmp-gmpopenh264.lastUpdate: 1634833117
media.gmp-gmpopenh264.version: 1.8.1.1
media.gmp-manager.buildID: 20220103092929
media.gmp-manager.lastCheck: 1641300290
media.gmp-widevinecdm.abi: x86_64-msvc-x64
media.gmp-widevinecdm.lastUpdate: 1636401098
media.gmp-widevinecdm.version: 4.10.2391.0
media.gmp.storage.version.observed: 1
media.hardware-video-decoding.failed: false
media.videocontrols.picture-in-picture.video-toggle.has-used: true
network.trr.blocklist_cleanup_done: true
places.database.lastMaintenance: 1640782745
privacy.globalprivacycontrol.enabled: true
privacy.globalprivacycontrol.functionality.enabled: true
privacy.globalprivacycontrol.was_ever_enabled: true
privacy.purge_trackers.date_in_cookie_database: 0
privacy.purge_trackers.last_purge: 1641227837826
privacy.sanitize.pending: [{"id":"newtab-container","itemsToClear":[],"options":{}}]
privacy.trackingprotection.enabled: true
privacy.trackingprotection.socialtracking.enabled: true
privacy.userContext.extension: @contain-facebook
security.osreauthenticator.password_last_changed_hi: 763343
security.osreauthenticator.password_last_changed_lo: 944534296
security.remote_settings.crlite_filters.checked: 1641244145
security.remote_settings.intermediates.checked: 1641222139
security.sandbox.content.tempDirSuffix: {001184d7-ba35-412f-a9b4-e4c13de83b5f}
services.sync.declinedEngines:
services.sync.engine.bookmarks.validation.lastTime: 1641236638
services.sync.engine.creditcards: true
services.sync.engine.passwords.validation.lastTime: 1641236638
services.sync.engine.prefs.modified: false
services.sync.lastPing: 1641236633
services.sync.lastSync: Tue Jan 04 2022 15:07:52 GMT+0100 (Central European Standard Time)
signon.management.page.sort: last-used
signon.suggestImportCount: 2
storage.vacuum.last.index: 1
storage.vacuum.last.places.sqlite: 1641135217
ui.osk.debug.keyboardDisplayReason: IKPOS: Keyboard presence confirmed.

Important Locked Preferences
----------------------------

fission.autostart.session: true

Sam, any ideas what might be causing this / how to debug or get more details about what's broken?

Flags: needinfo?(sfoster)

(In reply to Kagami :saschanaz from comment #0)

Nothing happens if I right-click anywhere on any page and click "Take Screenshot".

Some things:

  • I'm on MSIX installation
  • It works on latest Nightly from mozregression
  • It works if I run the MSIX installation with a new profile
  • It does not work if I run it with my current profile in troubleshoot mode

These notes about the profile directory suggest that this is very likely to be a wrinkle with how the MSIX app bubble virtualizes paths. :bhearsum is the expert at this point, but tickets like Bug 1731759 and Bug 1731760 are symptoms of the same underlying cause. We (and :agashlin, no longer with MoCo -- sob) did a good deal of thinking about how to address this and conclude that some of our sandboxing choices are impacting this, but said choices may be able to be removed: see discussion in Bug 1695556.

So: I would like to see somebody familiar with the screenshotting code (:sfoster seems most natural) trace through this and say which paths are trying to be written. Then we (folks familiar with MSIX) can try to figure out why we're not getting paths that we can write, etc, etc. It may simply be that the specific paths chosen aren't writable from the MSIX app bubble, or they're being virtualized, or something equally easy to address.

At this point in the flow, we don't write anything to the profile directory so I'm confused about that part.
Screenshots is a system extension, and does use an experimental API to trigger the screenshot UI when the click on the context menu item is received. I wonder if we're seeing similar issues on other system extensions?

Flags: needinfo?(sfoster)

:saschanaz, can you also reproduce with the older profile and not using troubleshoot mode?

I'm not sure what is in the profile that might have any bearing on this behavior. And I don't really know enough about the addons machinery or what the significance of a MSIX install might be to all of this. As for next steps, I guess I'd start with setting a breakpoint in the observer callback for onScreenshotCommand to see if we ever reach it. I'll probably need a new VM to test this so I was holding off until we know more. But I can prioritize that if I'm the blocker here.

can you also reproduce with the older profile and not using troubleshoot mode?

Sorry, what do you mean by "the older profile"? If it means my current profile, it doesn't work when not using troubleshoot mode.

I tried putting a new profile in AppData/Roaming/Mozilla/Firefox/Profiles where the problematic one exists, and it works. So I'm not really sure the profile directory is an issue here. 🤔

(In reply to Kagami :saschanaz from comment #5)

Sorry, what do you mean by "the older profile"? If it means my current profile, it doesn't work when not using troubleshoot mode.

Ok thanks, I just wanted to confirm that troubleshoot mode wasn't a factor here. So the bug doesnt reproduce with new profile, but does with an existing profile from a previous release. I'm still at a loss to understand what the profile contains that would have a bearing on this, but that's at least useful to clarify.

Hmm, Report Site Issue is also broken. And weirdly if I copy-paste the whole profile to Documents/ and then both work. 🤷‍♀️

Ok, I believe Report Site Issue is also a system extension so this looks more like an addons/MSIX issue and less like a Screenshots issue. I'm going to move it to that component where the right people will see it. Please move it back or need-info me if there's something we can/should be doing in Screenshots to address this.

Component: Screenshots → General
Product: Firefox → WebExtensions

👍

BTW, I'm sure both worked weeks ago on MSIX, but there's no mozregression support for MSIX, so 🥲

I am unable to reproduce.

  1. I downloaded the "MSEdge on Win10 (x64) Stable 1809" VM from https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
  2. I imported the VM in VMWare Fusion 12.2.1
  3. I downloaded the latest MSIX (96.0) via https://download.mozilla.org/?product=firefox-msix-latest-ssl&os=win64&lang=en-US (linked from https://support.mozilla.org/en-US/kb/firefox-enterprise-94-release-notes).
  4. I enabled sideloading of apps in Windows, and started the installation of Firefox.
  5. After launching Firefox I opened a web page, right-clicked and chose "Take Screenshot"
  6. Screenshots functionality works as expected.

Are you able to see any more useful logs if you set extensions.logging.enabled to true?

Could you send me addonStartup.json.lz4 and extensions.json from your broken profile? And just for good measure also include prefs.js.

As I said on Slack, I can no longer reproduce this on my profile. I'll try the logging when I ever can do.

For now, I'll close this.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME

In the future, if you encounter the issue of add-ons not working, copy addonStartup.json.lz4 and extensions.json from the profile for future reference.

When a profile is copied, try to preserve the time stamps. The extension database may be rebuild when xpi files' timestamps are touched. The extension database contains paths that may be invalidated when the profile is moved (bug 1429838), so be careful to not draw conclusions too quickly based on a relocated profile.

Thanks, I'll make sure to do that in the future ❤️

Summary: "Take Screenshot" context menu does not start taking-screenshot mode → [msix] "Take Screenshot" context menu does not start taking-screenshot mode
You need to log in before you can comment on or make changes to this bug.