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

[0.9.8c] Firefox Portable 93.0 addons stop working until the browser is closed/restarted #1345

Open
plofhaan opened this issue Oct 30, 2021 · 13 comments
Labels
Browser: Firefox Issues with Firefox-based browsers Status: Stalled Work Progress stopped due to uncertainty ToDo To be done

Comments

@plofhaan
Copy link

plofhaan commented Oct 30, 2021

Using SbieCtrl.exe for the manager, if I use the Forced Folders option to force "C:\FirefoxPortable - sandboxed" and inside this folder is a junction named FirefoxPortable (that points to C:\FirefoxPortable), then if I run a batchfile that contains the following command:
start "" "C:\FirefoxPortable - sandboxed\FirefoxPortable\FirefoxPortable.exe"
the browser is run sandboxed as expected, but the browser addons do not load. If I close the browser and run the batchfile again after, then the addons work like normal. Next, if I empty the sandbox, the same problem returns, so each time after I have emptied the sandbox l have to close the browser again and run the batchfile again. Another thing I noticed is that running the batchfile and closing the browser or emptying the sandbox also causes this problem to occur with _un_sandboxed Firefox Portable ( C:\FirefoxPortable\FirefoxPortable.exe ).

I am on Windows 11 build 22000.282 official, but this problem existed also before I upgraded from Windows 10 Home x64 21H1 and using earlier versions of Sandboxie-Plus (0.9.8b/0.9.8). To be able to run multiple instances of Firefox Portable, in C:\FirefoxPortable I have put a file FirefoxPortable.ini with AllowMultipleInstances=true and I have deleted the Mozilla folder from %APPDATA%, %LOCALAPPDATA% and %ALLUSERSPROFILE%. If I create a shurtcut to run this:
"C:\Program Files\Sandboxie-Plus\Start.exe" default_browser
or this:
"C:\Program Files\Sandboxie-Plus\Start.exe" C:\FirefoxPortable\FirefoxPortable.exe
then Firefox Portable multiple instances won't work, it just gives a dialog with "Another instance of Firefox is already running" message.

@plofhaan
Copy link
Author

plofhaan commented Nov 3, 2021

Now running Firefox Portable 94 in concert with Sandboxie-Plus 0.9.8d, the issue persists.

@NewKidOnTheBlock
Copy link
Contributor

Hmm. Sounds complicated.
I got a regular Firefox install. And if I run that in sandbox, the add-ons work alright.

If you want to run your Firefox always in a sandbox, why not just create a shortcut and be done with it?
Like this:
C:\Sandboxie\Start.exe /box:Default C:\Portables\Firefox\Firefox.exe

@plofhaan
Copy link
Author

plofhaan commented Nov 4, 2021

Hmm. Sounds complicated. I got a regular Firefox install. And if I run that in sandbox, the add-ons work alright.

If you want to run your Firefox always in a sandbox, why not just create a shortcut and be done with it? Like this: C:\Sandboxie\Start.exe /box:Default C:\Portables\Firefox\Firefox.exe

Thank you for your reply. Sorry, but no, this isn't about regular Firefox, and, no, I do not want my Firefox to always run in a sandbox even though, yes, my default browser (in the Windows registry settings) is to run Firefox Portable sandboxed. The whole idea of using the Portable Edition of Firefox (or at least an important part of that idea) is to be able to run multiple instances of it, and to be able to run them concurrently and in parallel. It means that each separate instance of Firefox Portable can have its own unique browser configuration, which includes having different addons and different settings on each. It also means that multiple of these separate instances can be running, simultaneously, that is, at the same time. Installing regular Firefox into multiple sandboxes requires more work that is more complicated in comparison to this, and the performance tends to be slower, also in addition to this.

That being said, making 'snaphots' of the contents of multiple sandboxes with Sandboxie-Plus (in its current form) in order to be able to restore these contents at a later point in time is tedious, it can be too time consuming, and especially the copying of the files required in order to achieve this type of goal can become a significant bottleneck at times when it comes to the total performance level that results from choosing this specific strategy-approach or workflow. Sandboxie-Plus (again, in its current form) does not have a feature that will allow incremental snaphot capability and selectively duplexing of sandbox contents (across multiple physical storage devices where/when it could potentially be feasible) that will enable the advanced user to optimize these performance factors, to flexibly organize optimization schemes and to make such optimized strategies manageable. Hopefully you can now see why choosing to use the Forced Folders option of Sandboxie can still sometimes be a better choice anyway after all, depending on what exactly it is that you are hoping to accomplish with it.

@NewKidOnTheBlock
Copy link
Contributor

NewKidOnTheBlock commented Nov 4, 2021

Okay. Have you considered this?

You make folders with copies of Firefox Portable, like this:

C:\Software\FirefoxPortable1
C:\Software\FirefoxPortable2
C:\Software\FirefoxPortable3

Then you put shortcuts on your desktop like this:

C:\Sandboxie\Start.exe /box:FoxBox1 C:\Software\FirefoxPortable1\FirefoxPortable.exe
C:\Sandboxie\Start.exe /box:FoxBox2 C:\Software\FirefoxPortable2\FirefoxPortable.exe
C:\Sandboxie\Start.exe /box:FoxBox3 C:\Software\FirefoxPortable3\FirefoxPortable.exe

Voilà. You now got 3 completely independent Firefox Portable sandboxes that each got their own add-ons and persistant settings.

@plofhaan
Copy link
Author

plofhaan commented Nov 5, 2021

@NewKidOnTheBlock
AFAIK the correct way to run Firefox Portable is to run the file FirefoxPortable.exe, not Firefox.exe (both of these two different .exe files exist in the FirefoxPortable folder by default BTW). But if I run C:\FirefoxPortable\FirefoxPortable.exe via right-click on the file and choose Run Sandboxed from the context menu or via "C:\Program Files\Sandboxie-Plus\Start.exe" C:\FirefoxPortable\FirefoxPortable.exe, then I get the exact same problem of addons not loading until I close the browser and restart Firefox Portable sandboxed. So, it does not make any difference whatsoever whether I run it sandboxed via the context menu of the FirefoxPortable.exe file in File Explorer, via a shortcut on the Desktop, via running a batchfile, via pasting the command in a command prompt or the 'Run' menu that can be opened from the Windows Start Menu, via a forced folder that contains a junction or via any other available method, the addons simply refuse to load on the first attempt in a sandbox.

What truly worries me, though, each time after this happens, if I empty the sandbox or just close the sandboxed Firefox Portable in question, then if I run this same Firefox Portable unsandboxed, the same problem also happens in this Firefox Portable unsandboxed. Aside from adding the forced folder, the only changes I made in Sandboxie settings are to disable instant recovery and to set the file migration filesize to the maximum number so this should be very easy to reproduce. The addons that I use are uBlock Origin, Dark Reader and Tabliss. The problem still occurs even after only one of these three addons has been installed. I also already tried deleting Firefox Portable and downloading it fresh. All to no avail.

As for using different shortcuts like how you describe, there are multiple reasons why I prefer to use forced folders that have junctions in them. For one, it's easier to set Firefox Portable sandboxed as the Default Browser that way. And besides, I have a whole bunch of scripts the purpose of which is to automate all sorts of stuff, and they all heavily depend on these junctions, as junctions can tend to be very convenient to use in scripting.

@hg421
Copy link
Contributor

hg421 commented Nov 5, 2021

The whole idea of using the Portable Edition of Firefox (or at least an important part of that idea) is to be able to run multiple instances of it, and to be able to run them concurrently and in parallel. It means that each separate instance of Firefox Portable can have its own unique browser configuration, which includes having different addons and different settings on each. It also means that multiple of these separate instances can be running, simultaneously, that is, at the same time.

Did you know that you can do that with a single regular Firefox installation, too? (Without involving Sandboxie.) The feature is unfortunately a bit hidden, but you can create multiple profiles (in about:profiles) which have completely independent settings, history and extensions.
Then you can launch them from there or via the command line firefox.exe -P profile_name (or firefox -P for a selection dialog). It is also no problem at all to run several profiles at the same time.

Installing regular Firefox into multiple sandboxes requires more work that is more complicated in comparison to this, and the performance tends to be slower, also in addition to this.

If you use profiles that won't be neccessary and you can freely choose to run some of your profiles sandboxed and some unsandboxed.

So, if your main reason to use Firefox Portable is running multiple instances with different configurations, have a look at this! That's what I'm doing for this purpose and it had worked perfectly fine for me, never had any problems with extensions not loading or such.

@NewKidOnTheBlock
Copy link
Contributor

NewKidOnTheBlock commented Nov 5, 2021

You shouldn't run them in the same sandbox.
In my example I use 3 different sandboxes named FoxBox1, FoxBox2 and FoxBox3.
And of course you shouldn't delete the sandbox's contents if you want persistency.

Works fine:
I just downloaded Firefox Portable, put it in 2 different folders.
And created 2 different sandboxes for each one.
foxboxes
In one portable Firefox I got µBlock installed
In the other one I got Ghostery installed

They both continue right where I leave them.

@plofhaan
Copy link
Author

plofhaan commented Nov 5, 2021

@NewKidOnTheBlock
You don't even need multiple sandboxes to be able to reproduce the bug. Just a single FirefoxPortable folder will do. Empty your DefaultBox first. Now double-click on your shortcut and voilà. No addons are loaded, even though they are still showing enabled under "Add-ons and themes". Next, either close Firefox Portable sandboxed or empty your sandbox. Finally, open your FirefoxPortable folder and double-click on the file FirefoxPortable.exe to run it unsandboxed. See what I mean? Sandboxie-Plus has a weird bug that affects Firefox Portable OUTSIDE the sandbox. To me, this has all the similarities of a security bug in Sandboxie-Plus.

Again, running each instance in a different sandbox is not a part of the problem that I have described. My only goal right now is to get the addons working on the first try when running just a single instance in just a single sandox. If I can't get it working as expected with just a single one, then I see no reason to go on about this whole subject of using multiple ones. I already knew how to use multiple ones. Sorry if I didn't make this all clear from the start.

@hg421
Yeah, I already knew all that. I just don't want to keep Firefox always installed on my computer. I also know that it's possible to just install it into a sandbox instead. It works, but I also need the option to run it unsandboxed, and, under a few odd circumstances, at least for some of my sandboxes, I also like to point the FileRootPath variable to a folder that's on my Ramdisk. Running Firefox Portable sandboxed in an empty sandbox causes the contents of the sandbox to be only 44MB in size, so I don't sacrifice much RAM space doing this. (Especially not when the type of Ramdisk that I like to use is Dynamic Memory Management capable.) BTW, installing regular Firefox into an empty sandbox uses up over a dozen times more space in comparison to this.

@isaak654 isaak654 added the Browser: Firefox Issues with Firefox-based browsers label Jan 16, 2022
@DavidXanatos
Copy link
Member

So I have a firefox portable in:
C:\Temp\FirefoxPortable
and
C:\Temp\FirefoxPortable - sandboxed
with a /J junction to C:\Temp\FirefoxPortable
the FirefoxPortable when started unboxed has ublock installed
when i start it from "C:\Temp\FirefoxPortable - sandboxed\FirefoxPortable" which is forced ublock origin is still there.
what am i doing wrong?

@plofhaan
Copy link
Author

plofhaan commented Feb 1, 2022

( ... )
"C:\Temp\FirefoxPortable - sandboxed\FirefoxPortable" which is forced
( ... )
what am i doing wrong?

  1. Remove "C:\Temp\FirefoxPortable - sandboxed\FirefoxPortable" from your Forced Folders list
  2. Add "C:\Temp\FirefoxPortable - sandboxed" to your Forced Folders list
  3. Run the file "C:\Temp\FirefoxPortable - sandboxed\FirefoxPortable\FirefoxPortable.exe"

@DavidXanatos
Copy link
Member

same result no change :(

@plofhaan
Copy link
Author

plofhaan commented Feb 1, 2022

same result no change :(

Did you empty the sandbox? (After the sandbox has been emptied, the problem only occurs the first time when I run the file "C:\FirefoxPortable - sandboxed\FirefoxPortable\FirefoxPortable.exe", not when I run it again next.)

Also, if I add the folderspec "C:\FirefoxPortable - sandboxed\FirefoxPortable" (instead of "C:\FirefoxPortable - sandboxed") to the Forced Folders, then if I run the file "C:\FirefoxPortable\FirefoxPortable.exe", it runs sandboxed. That is, in spite of the fact that I have NOT added the "C:\FirefoxPortable" folderspec to the Forced Folders.... I don't know why this happens for me. I have not done anything that could potentially interfere, at least that I am aware of. Everything else works normally, and this problem has always been consistent, since the first time when it happened, which happened many months ago.

@plofhaan
Copy link
Author

plofhaan commented Feb 1, 2022

Junction

@isaak654 isaak654 added Status: Stalled Work Progress stopped due to uncertainty and removed under investigation labels Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Browser: Firefox Issues with Firefox-based browsers Status: Stalled Work Progress stopped due to uncertainty ToDo To be done
Projects
None yet
Development

No branches or pull requests

5 participants