xiaoxiaoflood / firefox-scripts

userChromeJS / autoconfig.js and extensions
Mozilla Public License 2.0
989 stars 85 forks source link

Firefox rejects TMP extension #96

Closed VLM-TechEd closed 2 years ago

VLM-TechEd commented 2 years ago

Greetings, and thank you for sharing this fine work!

I am running regular (not dev) Firefox, version 92.0.

  1. As instructed, I downloaded fx-folder.zip and extracted its contents to c:\Program Files\Mozilla Firefox.

  2. I downloaded utils.zip for both scripts and extensions and extracted the files to %AppData%\Roaming\Mozilla\Firefox\Profiles\\chrome.The folder utils appears there with all its contents intact.

I also downloaded the scripts rebuild_userChrome.uc.js and extensionOptionsMenu.uc.js into the chrome folder.

  1. I opened about:support, cleared the startup cache, and restarted Firefox.

  2. I dragged the new TabMixPlus extension onto the Extensions window. Firefox responded with "This add-on could not be installed because it appears to be corrupt." In addition, the button to manage extensions does not appear.

Obviously, I've done something incorrectly, but I don't see what the error may be. Can anyone help spot my error?

Thanks!

VLM-TechEd commented 2 years ago

One more detail: I am running both Pale Moon and Firefox. Windows thinks that by default, .xpi files should be opened by Pale Moon. But I dragged the TMP .xpi file directly onto the Firefox extensions window/tab multiple times, so I don't believe this is a problem. Still, I share it, "just in case".

117649 commented 2 years ago

One more detail: I am running both Pale Moon and Firefox. Windows thinks that by default, .xpi files should be opened by Pale Moon. But I dragged the TMP .xpi file directly onto the Firefox extensions window/tab multiple times, so I don't believe this is a problem. Still, I share it, "just in case".

If the extensionOptionsMenu is not showing something is wrong with your userCustomJS installation.

Have you have file overwritten when place file of fx-folder.zip?

xiaoxiaoflood commented 2 years ago

Just today I uploaded a video showing the process of installing userChromeJS and legacy extensions in regular Fx 92, you can find the link in the main read-me. In the video I used rebuild_userChrome.uc.js to test userChromeJS and DownThemAll! to test legacy extensions, but extensionOptionsMenu.uc.js and TMP also works*.

*: I can assure that TMP installs just fine, but other than that it's responsibility of its dev.

I didn't see any issue in what you said you did, but if it's not working I guess you made a mistake at some point, but only you can inspect that, since what you said seems correct and that the provided instructions worked for many people.

VLM-TechEd commented 2 years ago

Thank you for responding so quickly. I appreciate it.

More information: I already had a chrome folder, in which I already had:

userChrome.css (contains some code related to multirow tabs) userContent.css (empty at the moment)

as well as the three new items:

utils (folder) extensionOptionsMenu.uc.js.html rebuild_userChrome.uc.js.txt

In Program Files\Mozilla Firefox, I now have fx-folder, which contains defaults (folder) and config.js .

Do these elements seem correct and complete to you?

xiaoxiaoflood commented 2 years ago

extensionOptionsMenu.uc.js.html

That's the error. You probably downloaded the display page of the script, not the script itself. You probably downloaded this link: https://github.com/xiaoxiaoflood/firefox-scripts/blob/master/chrome/extensionOptionsMenu.uc.js

But you should instead click the link "Raw" inside that page, which points to the true script: https://raw.githubusercontent.com/xiaoxiaoflood/firefox-scripts/master/chrome/extensionOptionsMenu.uc.js

rebuild_userChrome.uc.js.txt

This is also wrong. The file extension must end with .uc.js.

If in doubt, you should download the scripts using links provided in readme.

VLM-TechEd commented 2 years ago

MORE: I closed Firefox, removed the two .css files, and relaunched Firefox. No change.

xiaoxiaoflood commented 2 years ago

removed the two .css files

.css files are not related, you can keep them. Please read my previous comment.

VLM-TechEd commented 2 years ago

Okay, I re-downloaded everything. I now have the following.

In Program Files\Mozilla Firefox: the folder fx-folder, which contains the folder "defaults" and the file config.js. "defaults" contains the subfolder "pref", which contains the file config-prefs.js .

In chrome:

extensionOptionsMenu.uc.js extensionOptionsMenu.uc.js.html (is this needed?) rebuild_userChrome.uc.js rebuild_userChrome.uc.js.txt (which I believe I can delete, correct?)

I created the two .js files manually by copying all the code into blank files using NPP.

Still, nothing seems to work. One thing I don't see anywhere is an item called userChromeJS.extension .

VLM-TechEd commented 2 years ago

I just saw your last response, thank you. Our messages have overlapped. I did read your prior response, and per my last response, I have attempted to follow it perfectly. But apparently I have not succeeded.

xiaoxiaoflood commented 2 years ago

the folder fx-folder

Nowhere it was said to create a folder fx-folder.

Just do exactly as it was done in the video I uploaded. And download the scripts using the links in readme instead of browsing the page here and there.

VLM-TechEd commented 2 years ago

Thank you for writing to me privately.

I must begin by saying that the video is almost completely useless to me. The combination of poor video quality and poor eyesight makes this so. This is why I relied entirely on the written instructions until now. Nevertheless, at your suggestion, I am trying to watch and follow the video.

When I click on that first link in “Download this zip file https://raw.githubusercontent.com/xiaoxiaoflood/firefox-scripts/master/fx-folder.zip and extract its content to Firefox installation folder (usually C:\Program Files\Mozilla Firefox)”, I get fx-folder.zip. When I then use 7zip to extract the files, I put them into c:\Program Files\Mozilla Firefox\fx-folder. 7Zip breaks the destination into two parts, the path and the final folder. May I assume that the “fx-folder” portion is incorrect?

Also, when I watch the video it appears to me that you extract the files not to the Program Files location, but to a place somewhere in %appdata%. I cannot read the full path.

I suspect that clarifying this may clean up the entire situation here. Would you be willing to clarify where this extracted content is supposed to go, perhaps by providing the path on your system?

Thank you kindly.

From: xiaoxiaoflood @.> Sent: Friday, September 17, 2021 1:57 PM To: xiaoxiaoflood/firefox-scripts @.> Cc: VLMin @.>; Author @.> Subject: Re: [xiaoxiaoflood/firefox-scripts] Firefox rejects TMP extension (#96)

the folder fx-folder

Nowhere it was said to create a folder fx-folder.

Just do exactly as it was done in the video I uploaded. And download the scripts using the links in readme https://github.com/xiaoxiaoflood/firefox-scripts#readme instead of browsing the page here and there.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/xiaoxiaoflood/firefox-scripts/issues/96#issuecomment-922076763 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6YURSPU4EAKITQERDE2OLUCOTRDANCNFSM5EH66VPQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . https://github.com/notifications/beacon/AB6YURULDZZWHK3Z2DKFCL3UCOTRDA5CNFSM5EH66VP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOG324MWY.gif

VLM-TechEd commented 2 years ago

I must begin by saying that the video is almost completely useless to me. The combination of poor video quality and poor eyesight makes this so. This is why I relied entirely on the written instructions until now. Nevertheless, at your suggestion, I am trying to watch and follow the video.

When I click on that first link in “Download this zip file and extract its content to Firefox installation folder (usually C:\Program Files\Mozilla Firefox)”, I get fx-folder.zip. When I then use 7zip to extract the files, I put them into c:\Program Files\Mozilla Firefox\fx-folder. 7Zip breaks the destination into two parts, the path and the final folder. May I assume that the “fx-folder” portion is incorrect?

Also, when I watch the video it appears to me that you extract the files not to the Program Files location, but to a place somewhere in %appdata%. I cannot read the full path.

I suspect that clarifying this may clean up the entire situation here. Would you be willing to clarify where this extracted content is supposed to go, perhaps by providing the path on your system?

etjim commented 2 years ago

Open fx-folder,copy all file and folder to the Firefox's install folder.

xiaoxiaoflood commented 2 years ago

poor video quality

The video was recorded in real resolution, so good quality, but unfortunately YouTube reduced it to 720p. 🤷‍♂️ I didn't recorded in fullscreen exactly by thinking of improving readability, because my screen resolution is 2560×1080, so things would be small and hard to see in YouTube player.

When I then use 7zip to extract the files, I put them into c:\Program Files\Mozilla Firefox\fx-folder. 7Zip breaks the destination into two parts, the path and the final folder. May I assume that the “fx-folder” portion is incorrect?

Yes. I don't know if you changed anything in 7-zip, but the Extract button doesn't create a subfolder with the name of the compressed file (as shown in the video).

Also, when I watch the video it appears to me that you extract the files not to the Program Files location, but to a place somewhere in %appdata%. I cannot read the full path.

As said in instructions, files in fx-folder must be extracted in... Firefox folder (where firefox.exe is). In Windows, the path usually is C:\Program Files\Mozilla Firefox, but it can be anything. In the video I was using a fresh new profile in a fresh new Firefox installation, all temporary, so everything was in Temp folder.

In the video I pointed the cursor to show that, after extraction, the file config.js will be between application.ini and crashreporter.exe (suposing the default sorting - alphabetically).

VLM-TechEd commented 2 years ago

Thank you for staying with this conversation. I apologize for disappearing briefly; I was called away.

The config.js file is where you say it should be, between application.ini and crashreporter.exe (using default alpha sorting).

The utils folder is inside the chrome folder. Inside the utils folder, I see another utils folder, and inside that, I see 7 items beginning with boot.jsm and ending with xPref.jsm, again using default alpha sort order.

Finally, in the chrome folder I have placed

extensionOptionsMenu.uc.js rebuild_userChrome.uc.js userChrome.css (for multirow tabs, not related to your code) userContent.css (presently empty, not related to your code)

Can you identify anything here that seems incorrect or is missing? Thank you.

xiaoxiaoflood commented 2 years ago

Inside the utils folder, I see another utils folder

This is wrong. There's only one utils folder. For instance, the path of xPref.jsm must be something like ...\chrome\utils\xPref.jsm. No double utils, only one.

VLM-TechEd commented 2 years ago

I fixed the utils folder and restarted Firefox. Still, I don't see Extension Options in the Tools menu, and TMP's xpi (re-downloaded) is rejected. As far as I can determine, I have now followed all instructions exactly. Is there some about:config setting that I should check?

xiaoxiaoflood commented 2 years ago

I don't see Extension Options in the Tools menu

Extensions Options Menu is activated by a button that is added to navigation bar, next to buttons of other extensions, back, next, reload buttons, address bar... "Tools menu" is something different, not related to EOM. This is Tools menu: image

Is there some about:config setting that I should check?

I don't think so.

VLM-TechEd commented 2 years ago

Thank you. I was looking for it on the Tools menu, because that's where I remember it from XUL times. I am happy to report that I deleted, then re-downloaded and reinstalled everything, and now everything is working perfectly.

One "famous last question": on your scripts page (https://github.com/xiaoxiaoflood/firefox-scripts/tree/master/chrome), I notice that clicking on any script takes one to the actual script, not to a downloadable copy. Thus, I have copied the scripts desired and made each of them into a file named as listed on the scripts page. Is this what is intended? (I'm new at this, so I apologize for such a newbie question.

xiaoxiaoflood commented 2 years ago

Is this what is intended?

No. As already said in https://github.com/xiaoxiaoflood/firefox-scripts/issues/96#issuecomment-922046111 and https://github.com/xiaoxiaoflood/firefox-scripts/issues/96#issuecomment-922076763, you should use links from readme and not to navigate between pages unless you're sure what you are doing.

I guess every problem we had here were by not properly reading and following readme. Extension Options Menu has a screenshot showing that it's a button in navbar, nothing related to Tools menu. From readme: image

117649 commented 2 years ago

clicking on any script takes one to the actual script, not to a downloadable copy. Thus, I have copied the scripts desired and made each of them into a file named as listed on the scripts page. Is this what is intended?

Yes, this how Github works.

You can click Raw to get the file in plain text and save it use Save Page as function of the browser.

VLM-TechEd commented 2 years ago

Raw, then Save Page as. It takes a bit of time to learn how to use GitHub most effectively.

Thanks for all your most patient help. Case closed.