common-fate / granted

The easiest way to access your cloud.
https://granted.dev
MIT License
1.06k stars 93 forks source link

Unable to use the Windows Store version of Firefox #497

Open ghost opened 1 year ago

ghost commented 1 year ago

Cannot user the MS Store version of Firefox, unable to set the path properly.

❯ granted browser set -b firefox -p "C:\Users\macharro\AppData\Local\Microsoft\WindowsApps\firefox.exe"
[✘] provided path is invalid: CreateFile C:\Users\macharro\AppData\Local\Microsoft\WindowsApps\firefox.exe: The file cannot be accessed by the system.
❯ (get-command firefox).source
C:\Users\macharro\AppData\Local\Microsoft\WindowsApps\firefox.exe

Using file from git-bash, we find that firefox.exe is a symlink to the the actual install location:

$ file AppData/Local/Microsoft/WindowsApps/firefox.exe
AppData/Local/Microsoft/WindowsApps/firefox.exe: symbolic link to /c/Program Files/WindowsApps/Mozilla.Firefox_117.0.1.0_x64__n80bbvh6b1yt2/VFS/ProgramFiles/Firefox Package Root/firefox.exe

I can use the program files location of firefox.exe, but since it includes a version number, it likely stop working after each update.

❯ granted browser set -b firefox -p "C:\Program Files\WindowsApps\Mozilla.Firefox_117.0.1.0_x64__n80bbvh6b1yt2\VFS\ProgramFiles\Firefox Package Root\firefox.exe"
[i] In order to use Granted with Firefox you need to download the Granted Firefox addon: https://addons.mozilla.org/en-GB/firefox/addon/granted
[i] This addon has minimal permissions and does not access any web page content

? Open Firefox to download the extension? Already installed
[✔] Granted will default to using Firefox

This is on Windows 10 22H2 using granted 0.16.0

ghost commented 1 year ago

Just re-tested with granted 0.17.1 (didn't notice there was a new version), same behavior.