Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox Load temporary addon not working #538

Open
stzdzyhs opened this issue Aug 24, 2023 · 12 comments
Open

Firefox Load temporary addon not working #538

stzdzyhs opened this issue Aug 24, 2023 · 12 comments
Labels
idle Issues and pull requests with no activity for three months.

Comments

@stzdzyhs
Copy link

Firefox version: 116.0.3 Ubuntu 22.04
the standard borderify addon is not working.

Reproduce steps:

  1. git clone borderify code
  2. in Firefox, select menu "Add-ons and Themes" >> "Debug Add-ons" >>
    "Load Temporary Add-on...",
    then select the borderify manifest.json,
  3. after install the addon, no any mozilla.org page is borderified.
    e.g: a page with url: https://www.mozilla.org/en-US/
  4. further more, when refresh the tab https://www.mozilla.org/en-US/,
    in debug console, it will show a log "undefined: undefined",
    I am certain that if no install the borderify addon, this log will not be printed.
    however, no sure if this should be reported to Firefox or not. Thanks!
@github-actions
Copy link

It looks like this is your first issue. Welcome! 👋 One of the project maintainers will be with you as soon as possible. We appreciate your patience. To safeguard the health of the project, please take a moment to read our code of conduct.

@Rob--W
Copy link
Member

Rob--W commented Aug 25, 2023

I cannot reproduce your problem (I haven't tried it on Ubuntu though).

The borderify extension works, as described at https://github.com/mdn/webextensions-examples/tree/main/borderify

Can you show the output of the global Browser Console (https://firefox-source-docs.mozilla.org/devtools-user/browser_console/index.html)?

@stzdzyhs
Copy link
Author

Thanks! I started Firefox by command: "firefox -jsconsole", and noticed some existing error log printed as
the attached screen shot.
(Please note that at this time, the add-on borderify is not installed.
After install the add-on borderify by clicking "Load Temporary add-on", no any other log printed,
(I cleared the log before installation, after add-on installation, the output was still empty)
s1

@Rob--W
Copy link
Member

Rob--W commented Aug 31, 2023

For context, his "bug report" was cross-posted to https://bugzilla.mozilla.org/show_bug.cgi?id=1850464

@stzdzyhs
Copy link
Author

stzdzyhs commented Sep 1, 2023

Sorry cross-posted because I suspect this is also related to Firefox.
I tried the Firefox version 117, same problem.
and follow your suggestion, I tried to run borderify in "Private Window".
steps:

  1. install the borderify addon
  2. on Firefox about:addons page, select the "Manage" menu item for borderify addon.
  3. on the manage page, enable "Run in Private Windows" in the Details tab (there are 2 tabs, one is Details, the other is "Permissions" tab.
    Testing Result: the existing mozilla.org tab is not borderifed.
  4. I also tried enable "Access your data for sites in the *://mozilla.org domain" in the Permissions tab.
    same result.

the issue is : when the add-on installing, there is not option to allow it run in the Private Window or not, and
may be some issue on Reload, this add-on doesn'tt work when enable those options after it has installed.

@Rob--W
Copy link
Member

Rob--W commented Sep 1, 2023

  1. Did you make any changes to the Borderify source code?
  2. If you try another sample, e.g. Beastify, does that work?

@stzdzyhs
Copy link
Author

stzdzyhs commented Sep 1, 2023

Beastify is also not work.
and, I did not change code of Borderify or Beastify,
I noticed a msg when I clicking the "Extension" tool bar on the top right of Firefox,
it showed: Can not read or change data on this site"
Please see the screen shot.
222

@stzdzyhs
Copy link
Author

stzdzyhs commented Sep 1, 2023

To exclude influence of customized settings, tomorrow, I will test this in a clean VM.

@stzdzyhs
Copy link
Author

stzdzyhs commented Sep 2, 2023

At last, I found the cause of this issue is Snap (A tool to manage app installation on Ubuntu)
On Ubuntu 22.04, Firefox is installed by Snap, However, if app is installed by Snap, app will have some read/write problem to mounted NTFS partition. I also encountered read problem , maybe Inkscape (If I remember right) that can not read mounted NTFS partition, only the native EXT4 partition.

If I moved the borderify code to $HOME dir(that's a directory in EXT4 partition), it works fine ! in previous testing, the borderify code was stored in a NTFS parition.
I must clarify that this is not a problem of disk, I can display bordefify code without any error (linux cmd: cat), I also checked
that the NTFS parition is good.

@stzdzyhs
Copy link
Author

stzdzyhs commented Sep 2, 2023

and this can be reproduced in a clean VM.
steps:

  1. download ubuntu-22.04.3-desktop-amd64.iso from ubuntu.com
  2. when installing Ubuntu in VirtualBox, create 2 partitions, one is Ubuntu root partition(partition1, EXT4 format), the other is reserved for NTFS. (partition2, NTFS format)
  3. install Ubuntu on the partition1.
  4. login into Ubuntu and in Terminal, run:
    sudo apt update; sudo apt upgrade;
  5. use gparted to format partition2 to NTFS. (if gparted is not installed, run: sudo apt install gparted )
    sudo gparted /dev/sda
  6. mount the partition2 on mount-point: /windows/c/ , in Terminal, run:
    sudo mkdir -p /windows/c; sudo mount /dev/sda4 /windows/c/ -o uid=1000;
    the -o option is to allow the current user can full control the partition2. (the device name: /dev/sda4 can be different).
  7. git clone code into partition2. run:
    cd /windows/c/; git clone https://github.com/mdn/webextensions-examples.git
  8. In Firefox, try to install the debug add-on borderify, then, the add-on is NOT work. same problem as my first post.
  9. copy the borderify code to $HOME, run:
    cp -R webextensions-examples ~
  10. In Firefox, try to install the debug add-on borderify from $HOME/webextensions-examples/borderify/manifest.json,
    this time, it works fine !

@github-actions github-actions bot added the idle Issues and pull requests with no activity for three months. label Oct 3, 2023
@achangofpace
Copy link

At last, I found the cause of this issue is Snap (A tool to manage app installation on Ubuntu) On Ubuntu 22.04, Firefox is installed by Snap, However, if app is installed by Snap, app will have some read/write problem to mounted NTFS partition. I also encountered read problem , maybe Inkscape (If I remember right) that can not read mounted NTFS partition, only the native EXT4 partition.

If I moved the borderify code to $HOME dir(that's a directory in EXT4 partition), it works fine ! in previous testing, the borderify code was stored in a NTFS parition. I must clarify that this is not a problem of disk, I can display bordefify code without any error (linux cmd: cat), I also checked that the NTFS parition is good.

does this mean that there's no issue in this repo but rather in Snap?

@github-actions github-actions bot removed the idle Issues and pull requests with no activity for three months. label Oct 23, 2023
@github-actions github-actions bot added the idle Issues and pull requests with no activity for three months. label Nov 23, 2023
@aug-dev
Copy link
Contributor

aug-dev commented Mar 29, 2024

Hey there!

Just coming here to say that I had the same problem with the official Firefox Flatpak (another technology used to distribute Linux applications in a containerized environment).

Changing the app's permission through Flatseal (an app to manage Flatpak permissions) and restarting the browser solved the issue:

image

Now borderify works properly.

This is clearly something to do with sandboxing of these technologies. If I had to guess, it is probably because the "Open file" dialog opens one specific file (the manifest.json), and does not give the application permission to look through the other files in the directory.

@github-actions github-actions bot removed the idle Issues and pull requests with no activity for three months. label Mar 29, 2024
@github-actions github-actions bot added the idle Issues and pull requests with no activity for three months. label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle Issues and pull requests with no activity for three months.
Projects
None yet
Development

No branches or pull requests

4 participants