persepolisdm / Persepolis-WebExtension

WebExtension integration for Persepolis download manager
http://persepolisdm.github.io
GNU General Public License v3.0
73 stars 9 forks source link

cannot use it together with a custom firefox user.js file (hardned for security) #20

Closed m040601 closed 5 years ago

m040601 commented 5 years ago

Hi, thank you for your work in this extension. I know this might not be the right place to ask this question. I have no problems using this extension on a standard non customized Firefox profile. It even works perfectly fine together with other aggressive javascript/adblockers extensions. etc.

I'm also trying to use a custom user.js file on my firefox profile. As you may know this is done to customize your firefox in a more "aggressive" and "permanent" way than just using the user interface. It changes a lot of other hidden preferences.

I' using this one, https://github.com/pyllyukko/user.js. There is some change being done to the firefox preferences, that makes it impossible to use persepolis the extension.

I've already tried searching and toggling through these various changed options, to pinpoint exactly what could it be. Described the issue here, https://github.com/pyllyukko/user.js/issues/453.

Would you have any tips or idea for which changed firefox preference could be impacting Persepolis ? Thanks in advance

m040601 commented 5 years ago

I think I'm making some progress here:

Hunting for Error message

To find more about problem: Go to about:debugging Mark Add-on debugging Click on Debug button of "Persepolis Download Manager Integration" Then try to use addon and download something, if anything went wrong an error should appear in console tab of debug area

I did that. And then I caught this error message on the "Console" tab of the main window of developer tools.

Error: First-Party Isolation is enabled, but the required 'firstPartyDomain'
attribute was not set. ExtensionUtils.jsm

(On the "Debbuger" tab of the developer tools, there is no error message. There's just the "sources" tab of persepolis listed d76d4bfe-4e5c-4d34-9819-f61ea0427bf0 )

Back to user.js

So I went back to my custom user.js file. I had there: user_pref("privacy.firstparty.isolate", true); That is not mozillas default. So I changed it to user_pref("privacy.firstparty.isolate", false);

and the extension seem to be working again.

Persopolis user interface problem

So now when i want use Persepolis (with or without "interrup downloads"). It does work partially. That is:

  1. A window pops up.
  2. I select 'OK' and the window closes.
  3. Another window pops up. That's the progress window with the progress bar, resume/pause/stop buttons:
    • the progress bar doesnt, move. It stays at zero
    • the download does happen, but it stays in the temporary folder, doesnt move to the final folder.
    • the window progress doesnt close by itself.
    • Persopolis "help" > "show log file" windo does show this info, 2019-03-24 00:40:43,543 - Persepolis Download Manager - INFO - 6965f2609e7f6347 Starts
    • There is no recording of downloading activity on the persepolis main window. (Neither unde "single" or "all downloads"
JafarAkhondali commented 5 years ago

What is the error?!

m040601 commented 5 years ago

updated my previous comment

m040601 commented 5 years ago

Update on the "Persopolis user interface problem" part Please ignore that previous part of my comment. I restarted Persepolis, and everything seems to be working fine again. Apollogies for the confusion.

(I'm on ArchLinux with a simple window manager DWM, and I'm still thoroughly testing Persepolis.There's no panels nor system tray on dwm. Although everything seems to be working, sometimes I have to restart Persepolis. Still a bit clunky, otherwise a great tool)

m040601 commented 5 years ago

Did some quick research on this "first party isolation" thing of Firefox.

  1. 2018, https://www.ctrl.blog/entry/firefox-fpi

First-Party Isolation is a fundamental change....breaks many assumptions made by web developers. If you want to enable the feature and gain better privacy than you also have to pay the price of breaking those assumptions.

  1. 2018, https://www.maketecheasier.com/first-party-isolation-firefox/

... seems like it’ll be a permanent feature in Firefox, but few people are aware of it....

Again, I'm not a developer, and apologies if I'm missing something here not obvious.

But could you clarify (?docs) what is it about the persepolis extension that makes it incompatible with setting this privacy preference in Firefox ?

I have a bunch of other extensions installed (blockers, interceptors, aggressive customization by tridactyl, bookmarklets etc. you name it) and none of them ever had an issue with this preference.

JafarAkhondali commented 5 years ago

It's my first time hearing about 'first-party-isolation'. Some actions like download need authentication to server. Cookies are pieces of text that can handle authentication in browsers. So when Persepolis wants to download something, it needs cookies too. Persepolis extension sends cookies along download links and that might cause a problem with 'first-party-isolation' because cookies are really important.

Thanks for your feedback, please close the issue when your problem is solved :+1:

m040601 commented 5 years ago

yeah, these kind of "experimental" and "aggressive" browser settings, keep changing fast and being created by Mozzila at an incredibe and difficult to keep up pace with.

So conclusion, dont set user_pref("privacy.firstparty.isolate", true); if you want to use Persepolis.

Thanks for your attention to this issue.