filips123 / pwasforfirefox Goto Github PK
View Code? Open in Web Editor NEWA tool to install, manage and use Progressive Web Apps (PWAs) in Mozilla Firefox
Home Page: https://pwasforfirefox.filips.si
License: Mozilla Public License 2.0
A tool to install, manage and use Progressive Web Apps (PWAs) in Mozilla Firefox
Home Page: https://pwasforfirefox.filips.si
License: Mozilla Public License 2.0
When the option for opening links in default browser is checked, the behavior is to close the PWA window when the default browser is invoked. This can be quite annoying for apps such as instant messengers and social networks. However, when linksTarget
is set to 2, forcing links to open in a new window, only the new window is closed and the original PWA window is kept. This might be a better default than opening the links in the current window (when openOutOfScopeInDefaultBrowser
is set, that is).
Spotify web player (open.spotify.com) in Firefox with FirefoxPWA does not offer any option to add as PWA. Visiting the same website in chromium browsers (tested with Brave and Edge) it's possible to add as PWA normally.
I also tried adding with command line, but still couldn't create PWA.
From #31 (review):
System integration (basically the things that are already in Windows and Linux integrations; I will probably need some help here)
- When installing PWA site
- It needs to create an application shortcut/entry with a required icon, name, description, keywords and categories (if macOS doesn't support some of those properties, it's fine, but it needs at least an icon and name) that launches the site.
- It should also add shortcuts/links to the entry with actions from the manifest. I don't know if this is supported on macOS or how is it called, but on Windows these are jump list tasks and on Linux desktop actions. This functionality is not needed as much as others, so it can be added later.
- That entry needs to be added to the user-specific app menu/list. I think this could be done by creating a custom .app bundle with all those properties that is installed to ~/Applications.
- If macOS has some way to list/manage/uninstall apps (such as Add or Remove Programs page in Windows), the site should be registered there, so the user can uninstall it directly from the system.
- When uninstalling PWA site
- All system integration entries should be removed.
- When launching PWA site
- The window should have a correct site icon. Maybe this can be done in app entry, maybe it also needs some configuration at run-time.
- The window should not merge/group with other Firefox and PWA windows. On Windows, this is done using Application User Model ID, and on Linux it uses --class command argument when launching Firefox to set WM_CLASS.
- Maybe I also forgot something that is done for Windows and Linux and should also be done here.
The icons of each PWA are very different and may not be consistent with other icons and platform guidelines.
Support for icon masks implemented in #43 could be extended to other platforms. See my original comment below, and some additional ideas/guidelines here.
site install
and site update
commands, and option in install/edit screens in the extension) to disable/enable icon mask for a specific PWA and maybe also globally.My original comment (from #43 (review)):
Support for user-supplied icon masks (without manually swapping them before compiling) could probably complicate things, but maybe we could make additional masks designed to fit with a specific platform/DE or re-use macOS one (but it probably wouldn't fit on Windows). But not everyone might want masked icons (it could ruin the effect of native apps which can just use any icon they want). So I think it will also be useful to have an option (probably additional argument to
site install
andsite update
commands, and option in install/edit screens in the extension) to disable mask for a specific site (or let user to chose a mask if that won't complicate things too much).I will create a new issue with more details so we can track this. I probably won't have much time in the following weeks to implement it, but I will be accepting PRs :)
I also have another idea. Considering some platforms have icon guidelines that are more than just overall shape (such as colors, shades, details...), it could be interesting to allow PWAs to use the different icon on each platform. For example, one PWA might have a generic icon, as well as icons designed specifically in macOS, GNOME or KDE style. I'm not sure if this is something that PWAs would use or would be useful, but it's just an idea. I will think about this a bit more, and will maybe later create a suggestion on W3C manifest repo (if nothing similar already exists).
Matching the UI to Chromium-based browsers' UI would result in an more minimalistic tab/title bar and also give at least Windows 10 users an easy way to navigate to the previous page with an back button. Additionally there would be a familiar interface for users coming from other browsers as a bonus.
Copying Chromium-based browsers' UI for PWA's. For example Edge. (I personally like the menu a lot.)
When using firefoxpwa
on Apple Silicon, you get the Intel runtime instead of the native one.
Switch case for the right runtime, and support the ARM one
N/A
Checking "Open out of scope URLs in a default browser (can break some websites)" option in installed PWA that requires login redirects are unusable.
You can also reproduce this with any site that has a login flow that redirects to an external URL, (e.g. Google Calendar account via your organization's SSO)
I realize checking "Open out of scope URLs in a default browser (can break some websites)" means that all external URLs clicked will open in default browser. But I expect this not to be the case for login redirects.
Hi,
Please add a feature to install PWA apps for all users (per-machine)
Currently FirefoxPWA downloads a Firefox runtime during the first-time setup process. It is possible to update it by using the cli program to uninstall and re-download the runtime, but it would be nice if there's an option in the extension's UI to do this in one click.
Add an option to the extension to facilitate upgrade of the runtime.
You can install the Teams PWA in both Edge and Chrome, but the option to install isn't available for FirefoxPWA
Hello there,
Recently i stumbled across your extension,
Everything seemed find till it was time to make a PWA.
When doing that i get a error code
Failed to install system integration: Failed to process and store site icons: Failed to create icon directory: Permission denied (os error 13)
I'm using fedora 34
And the latest version of Firefox( 92.0.1 64 bit)
I've already tried to install the 32bit version of firefoxpwa-1.1.0-1 but without any success.
If there is more information you need regarding about my setup please let me know
When trying to create a new site, I get the following error:
'Failed to install system integration: Failed to process and store site icon: Failed to load icon: The image format could not be determined'
Please help find a solution :)
It works on other websites.
I've installed the extension and runtime v0.3.0, attempting to install site outlook.office.com result in an error:
Failed to parse PWA manifest: expected value at line 1 column 1
What am I doing wrong?
It would be nice if a world-writable /usr/share/firefoxpwa/runtime
is not a hard requirement for using this extension. It may (for example) fall back onto downloading and installing the runtime into the user-accessible directory ~/.local/share
instead.
When loading up a web app, you can not use any of your extensions. I need this mostly for Ublock Origin and Bitwarden.
It would be good if you could implement support for Firefox extensions to the PWA's like seen in ones made on Chromium based browsers.
I've installed the extension on macOS and runtime, attempting to install any site using CLI:
$ firefoxpwa site install https://www.notion.so
result in an error:
02:31:00 [INFO] Installing the site
02:31:00 [INFO] Downloading the PWA manifest
02:31:01 [INFO] Parsing the PWA manifest
02:31:01 [ERROR] Failed to parse PWA manifest
Caused by:
expected value at line 1 column 1
When I try installing site with extension, it result in another error:
What am I doing wrong?
When installing FirefoxPWA, it doesn't install vcredist... That is a bit of a headache for most end users, when you follow all the instructions on the extension's quick-start guide, and the PWA doesn't work.
You can add VCredist.
Some window managers on Linux benefit from no client-side decorations
It would be nice to provide an option that would let us disable the title bar if we need
On Linux (w/ Xorg), Firefox seems to still default to server-side decorations (titlebar), which looks not great with PWA. It's trivial to make it use client-side decorations just like on Windows and macOS by unchecking "Titlebar" in Settings Menu -> More Tools -> Customize Toolbar, but this is not obvious for new users. I'm not sure if it's a good idea or if it's easy to implement, but unsetting this option by default seems to improve the out-of-the-box visuals quite a bit, and it seems to work just fine with Firefox stable at least on my latest KDE installation.
Apple's human interface guidelines provide a clear description of what the shape and structure of an application icon should be like. Unfortunately, the icons of each PWA are very different and mostly do not fit in with the macOS guidelines at all.
https://developer.apple.com/design/human-interface-guidelines/macos/icons-and-images/app-icon/
Apple provides an icon template for the correct shape and drop shadow for an icon. While we can not influence the overall structure of an icon, with this we can at least make the icon shapes fit in with the other application icons on the platform.
https://developer.apple.com/design/resources/#macos-apps
Here a few examples of what this would look like:
Opening URLs, e.g https://twitter.com/WindowsLatest/status/1418707203834269698 from firefox to Twitter PWA
should be open the same url
idk i don't know how to code sorry
Attempting to use the microphone on a website causes it to freeze and need to be force killed. Just the web app freezes but not FIrefox as a whole.
Is it possible to change the install location? My understanding is that /usr/
really should be for system-installed packages, not packages manually installed by the user. Proper install location should be in /usr/local/*
or in a directory owned by the user.
This is similar to how chromium does it, except here it would still allow multiple profiles while having one synced with the normal one (to keep cookies and extensions)
It's understandable if this isn't possible, so please close this if it isn't. There is no need to explain it to me.
I have packaged the native component for Arch Linux as an AUR package for ease of installation on Arch Linux. I understand that linking to an unofficial package in the official instructions may be inappropriate, but it would be nice if something like an "unofficial packages" section in the setup wizard can be added for third-party packages like this one.
Here are the necessary adjustments / considerations to get the project to run on macOS:
/usr/local/bin/firefoxpwa
/usr/local/libexec/firefoxpwa-connector
/usr/local/share/firefoxpwa
Firefox.app/Contents/MacOS/firefox
Firefox.app/Contents/Resources/application.ini
Firefox.app/Contents/Resources
/Library/Application\ Support/Mozilla/NativeMessagingHosts/firefoxpwa.json
I just added a PWA but I am looking for a way to access about:config through it. Since there is no URL bar how can I access it? I know that you can access settings through the hamburger menu at the top but what about about:config?
Specifically I wanted to import my Firefox profile with all the custom modifications.
If the add-on link is always included in the release notes, users will not have to wander around looking for the link.
Other projects to refer: https://webcatalog.app/ (sourcecode)
The UI/UX is quite good, and there is a store.
This project looks pretty good.
I introduced your project here:
Thank you for doing what mozilla has to do instead.
Error: Native application tried to send a message of 758581773 bytes, which exceeds the limit of 1048576 bytes.
Any way to debug it? Thanks
I use extension method
Create an empty directory /usr/share/firefoxpwa/runtime/ and make it writable by normal users. This is needed for FirefoxPWA runtime installation and Firefox auto-updates to work. If you do not plan to use Firefox auto-updates, you can restore the permissions after the runtime is installed.
This doesn't tell the user how to make it writable. I'd assume chmod 744
, but not everyone knows that.
Install target: https://www.tumblr.com/
Error Message
Failed to parse PWA manifest: Provided URLs (https://assets.tumblr.com/dashboard?installed=true, https://www.tumblr.com/) are not in the same origin
Are there any future plans to support LibreWolf (the private Firefox) instead of the native Firefox app? LibreWolf is basically just Firefox but without telemetry. I think it could be made to work with LibreWolf too since LibreWolf basically only changes the settings using the built in Enterprise out of the box experience for Firefox.
Hi,
I filed a bug on bugzilla about "merging" this project into firefox. Unfortunately, I do not have the necessary skills to participate as developer. Maybe, I can help with testing.
Thank you
Would be useful allowing to parse URLs on the command to open a PWA, starting that PWA in a different page. So a Facebook PWA could be opened in the Messenger page directly, and you can create an action in the desktop files on Linux, for example.
My main concern is security. Some users will not choose to update the FirefoxPWA.deb file with every new release. They might either forget or just not care.
Add a post install script that adds the packagecloud.io repository to /etc/apt/sources.list.d and the key. This would make updating much easier for the end user. Major programs like Google Chrome and Opera include a post install script that adds their key and repository to /etc/apt/sources.list.d.
I could probably figure out how to make a PR, but it wouldn't be very good code.
Currently links open in the modified window making it pretty awkward to use as an app, probably can be done with ContentScript injecting into website and Native APP using kind of system call with the URL alone to use default browser
Whenever a new FirefoxPWA window is opened, all contents in the profile folder under chrome/pwa/... are being overwritten by the default files. I have not checked if any other files are also being overwritten. I thought I would report this as it is a bit of an odd behaviour in my opinion.
At least on Linux, Firefox defaults to a non-transparent color for active tabs (by default this is extracted from the system theme). This may look okay with some apps but terrible with others. If possible, maybe we should override the color in userChrome with something semi-transparent or at least make it match the app theme color.
A common example of this issue is YouTube as a PWA.
On KDE Wayland, all PWAs are collapsed on the task bar with the main Firefox icon, even when none of them use the same profile. This does not happen on KDE Xorg.
I am not sure if this is a bug of KDE, Firefox, or just Wayland in general. I'm posting it here for more information, e.g. does it happen on other Wayland-based Linux desktops?
Using PWAs like usual browser but restricted to only PWAs website without address bar
A new window of the PWA is opened.
A new window with the Firefox new tab / home page is opened. There is also no way to get into the PWA anymore and the app has to be closed and restarted.
Operating system: macOS
System architecture: x64
Installation method: from source
Firefox version: 90.0.2
FirefoxPWA extension version: 0.5.0
FirefoxPWA native version: 0.5.0
Launching installed PWAs after upgrading fails and returns an error.
Finder returns the following error:
The application “YouTube.app” can’t be opened.
The problem seems to be that PWA loader files have the version hardcoded into the path of the firefoxpwa
binary.
Loader file:
$HOME/Applications/YouTube.app/Contents/MacOS/loader
Binary path:
/usr/local/Cellar/firefoxpwa/1.0.0/bin/firefoxpwa
Modifying the binary path to use the symlink fixes the issue:
/usr/local/bin/firefoxpwa
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.