Giter Club home page Giter Club logo

Comments (7)

filips123 avatar filips123 commented on May 21, 2024

I've installed the extension on macOS and runtime, attempting to install any site using CLI:

This is normal (or at least "not unexpected") because you need to provide a direct URL to the website manifest if you want to install it from CLI (for example, firefoxpwa site install twitter.com/manifest.json). However, https://www.notion.so does not have a PWA manifest so you will have to install it from extension.

When I try installing site with extension, it result in another error:

And here is the real problem and I'm not completely sure why exactly it happens. Can you please check troubleshooting steps and provide full log file? Maybe it provides more details why it failed.

@TitanNano Can you please try to debug and fix this?

It seems the error happens here. Perhaps it could be related to change in Homebrew formula where I changed all paths to use unversioned paths (to fix #55), but I'm not sure why it would cause permission denied error.

from pwasforfirefox.

yangchuansheng avatar yangchuansheng commented on May 21, 2024

I've installed the extension on macOS and runtime, attempting to install any site using CLI:

This is normal (or at least "not unexpected") because you need to provide a direct URL to the website manifest if you want to install it from CLI (for example, firefoxpwa site install twitter.com/manifest.json). However, notion.so does not have a PWA manifest so you will have to install it from extension.

When I try installing site with extension, it result in another error:

And here is the real problem and I'm not completely sure why exactly it happens. Can you please check troubleshooting steps and provide full log file? Maybe it provides more details why it failed.

@TitanNano Can you please try to debug and fix this?

It seems the error happens here. Perhaps it could be related to change in Homebrew formula where I changed all paths to use unversioned paths (to fix #55), but I'm not sure why it would cause permission denied error.

new error:

$ firefoxpwa site install https://twitter.com/manifest.json  
16:15:00 [INFO] Installing the site
16:15:00 [INFO] Downloading the PWA manifest
16:15:01 [INFO] Parsing the PWA manifest
16:15:01 [INFO] Installing system integration
16:15:01 [ERROR] Failed to install system integration

Caused by:
    0: Failed to create application entry
    1: Failed to create application directory
    2: Permission denied (os error 13)

How to debug?

from pwasforfirefox.

filips123 avatar filips123 commented on May 21, 2024

Unfortunately, I don't know as I don't have much experience with macOS. It seems FirefoxPWA cannot create directory in ~/Applications/Site Name.app because it doesn't have permission to do that. But I think ~/Applications is a user-writable directory, so FirefoxPWA should have that permission...

You can check which permissions does ~/Applications have. I think you can write ls -al ~/Applications in Terminal, and check in the first line who is the owner (it should be something like drwxr-x--- 24 user user 4096 sep 13 18:57 . where user is your username).

If all permissions are correct, maybe the problem is that Homebrew executes programs as its own user, so directories::BaseDirs::new()?.home_dir() returns the wrong directory? I don't know how to check this (without editing and recompiling the program), and it still doesn't explain why writing failed.

Please also try to run sudo dtruss firefoxpwa site install https://twitter.com/manifest.json (or some other strace-like macOS program) to check all system calls that FirefoxPWA does. Note that this will probably output quite a lot of things, you you should probably save them to file using sudo dtruss firefoxpwa site install https://twitter.com/manifest.json > firefoxpwa-dtruss.log 2>&1 and upload that file.

from pwasforfirefox.

TitanNano avatar TitanNano commented on May 21, 2024

@filips123 yes looks like there is no permission for writing to ~/Applications which is really odd. By default, Homebrew always uses the current user, no superuser or dedicated Homebrew user.

from pwasforfirefox.

yangchuansheng avatar yangchuansheng commented on May 21, 2024

@TitanNano @filips123 The owner of ~/Applications is root:

$ ls -al ~|grep Applications
drwxr-xr-x     6 root  staff      192 Sep 14 09:55 Applications

I didn't know why,but I solved the problem by giving write permission to ~/Applications:

$ sudo chmod -R a+w ~/Applications

from pwasforfirefox.

TitanNano avatar TitanNano commented on May 21, 2024

@yangchuansheng this is very odd on macOS... ~/Applications should be owned by your user as it is inside your home directory.

from pwasforfirefox.

filips123 avatar filips123 commented on May 21, 2024

I'll close this issue as there's not much I can do with it. I don't know why this happened, but if someone has the same problem, try to set write permissions to ~/Applications directory:

$ sudo chmod -R a+w ~/Applications

If someone knows why this happens, please leave a comment and I'll try to fix it.

from pwasforfirefox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.