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

Update not functioning anymore #145

Closed
kinoegit opened this issue Feb 20, 2024 · 36 comments
Closed

Update not functioning anymore #145

kinoegit opened this issue Feb 20, 2024 · 36 comments

Comments

@kinoegit
Copy link

kinoegit commented Feb 20, 2024

I'm using latest version of ungoogled Chromium with firejail sandbox.
Updates are announced as usual, clicking on name of extension formerly started update.
Now clicking only opens a new tab (in background). Then nothing happens until the new tab is manually closed then update seems to be downloaded into download folder. Thats it! Nothing else happens.
I can manually update the downloded extension by drag 'n drop into chrome://extensions/.
The following is set:

If you are using ungoogled-chromium: You must change the flag chrome://flags/#extension-mime-request-handling to Always prompt for install.
The following is unset:
If you are NOT using ungoogled-chromium: Ensure the following option is checked: Extension Options (chrome://extensions/?options=ocaahdebbfolfmndjeplogmgcagdmblk) > Advanced > Always download CRX files

What I tried to no avail: disabled all non relevant extensions, started update by right click 'update all extensions'

noupdate

@ThisNekoGuy
Copy link

I get a similar issue with Ungoogled Chromium too; extensions are set to download to a folder instead rather than just updating like they normally should as per the directions in the readme lead users to normally experience.
Something is amiss.

@NeverDecaf
Copy link
Owner

Which version of UGC? I can't reproduce this on 122.0.6261.56

@ThisNekoGuy
Copy link

121.0.6167.184 - It's what's currently served by flathub for Linux distributions as a Linux agnostic package.

@sequilox
Copy link

I can reproduce this issue with the following version:
121.0.6167.184 (Official Build, ungoogled-chromium) Arch Linux (64-bit)

@kinoegit
Copy link
Author

Which version of UGC? I can't reproduce this on 122.0.6261.56

Version 121.0.6167.184 (Official Build, ungoogled-chromium) Arch Linux (64-Bit)

@kinoegit
Copy link
Author

kinoegit commented Feb 22, 2024

Sometimes update via rightclick does function!? Downloaded extensions remain in download folder anyway. Is this intended?

@NeverDecaf
Copy link
Owner

Can't test atm but might be an issue with chrome.tabs api, try changing lines 125-127 in util.js from msgHandler({ newTabUrl: crx_url, }); to window.open(crx_url, "_blank");

@vodkapmp
Copy link

Sometimes update via rightclick does function!? Downloaded extensions remain in download folder anyway. Is this intended?

I seem to be able to update the extensions by right clicking the icon for chromium-web-store, and clicking update all.
Though I have to click the "Add extension" button 20-30 times before anything happens.
Version 121.0.6167.184 (Official Build, ungoogled-chromium) Arch Linux (64-bit)

@pdf
Copy link

pdf commented Feb 22, 2024

Can't test atm but might be an issue with chrome.tabs api, try changing lines 125-127 in util.js from msgHandler({ newTabUrl: crx_url, }); to window.open(crx_url, "_blank");

This resolves the issue here.

@0x21D8
Copy link

0x21D8 commented Mar 5, 2024

@kinoegit Can you please test to see if you can update the extension when it's disabled? Your extension should update successfully if you disable the extension you are updating.

@kinoegit
Copy link
Author

kinoegit commented Mar 5, 2024

Sure, as soon the next update is due

@cnleo
Copy link

cnleo commented Mar 6, 2024

Same here (manjaro, ungoogled-chromium)

@kinoegit Can you please test to see if you can update the extension when it's disabled? Your extension should update successfully if you disable the extension you are updating.

Works!

@ThisNekoGuy
Copy link

Your extension should update successfully if you disable the extension you are updating.

Didn't work for me

@kinoegit
Copy link
Author

Didn't work for me either.

@blap
Copy link

blap commented Mar 12, 2024

I don't know how, but an update of my ungoogled Chromium reset my "chrome://flags/#extension-mime-request-handling" to "default". I changed the "flag chrome://flags/#extension-mime-request-handling" to "Always prompt for install" and works again.

@ThisNekoGuy
Copy link

I don't know how, but an update of my ungoogled Chromium reset my "chrome://flags/#extension-mime-request-handling" to "default". I changed the "flag chrome://flags/#extension-mime-request-handling" to "Always prompt for install" and works again.

I tried this and it doesn't work for me. (122.0.6261.111)

@dm17
Copy link

dm17 commented Mar 18, 2024

Is this the same issue that where it successfully detects and starts trying to add extensions but then they get stuck in downloads as "adding to chromium" - while the download spins forever? Also when clicking the x or right clicking the download and clicking cancel has no effect; it is stuck. It open happens with some extensions, however.
image

Using the latest UG on Flatpak

I've also noticed opening another profile and sometimes this not happening in it, while continuing in the current profile (previously opened window/profile in UG).

@wctrl
Copy link

wctrl commented May 21, 2024

Up, same here ^

@kinoegit
Copy link
Author

It's still the same here too: Version 125.0.6422.60

@dm17
Copy link

dm17 commented May 22, 2024

Update on my experience with this issue: basically some restarts and retries of extension updates eventually gets them installed. It still only happens sometimes and it isn't clear what can cause extension download to hang / never complete. If you're having this issue, then try restarting UG and clicking the chromium web store button again to trigger the updates.

@ThisNekoGuy
Copy link

In my experience, it's consistent enough (in normal usage, not brute force attempts - though I have tried that) that I've never once gotten it to go back to its normal behavior since this issue began.

@waldner
Copy link

waldner commented May 25, 2024

Very consistent for me too. Extensions remain stuck in "downloading". The right click + "update all extensions" trick does work for me though. Ungoogled chromium 125.0.6422.76.

@NeverDecaf
Copy link
Owner

try changing lines 125-127 in util.js from msgHandler({ newTabUrl: crx_url, }); to window.open(crx_url, "_blank");

Does this fix/workaround work for any of you? @ThisNekoGuy @waldner @kinoegit

@kinoegit
Copy link
Author

kinoegit commented May 26, 2024

I'd like to try it, but i'm a noob so please bear with me.. I'd need instructions even with that tiny bit of code, especially how to build after changing those line(s) in util.js

@waldner
Copy link

waldner commented May 26, 2024

@NeverDecaf can't test right now because I don't have any extension needing update, will test ASAP.

@kinoegit: decompress the .crx file into a folder (it's a zip file), make the suggested change to file scripts/util.js, then use "load unpacked" to load the extension from the folder where you decompressed it.

@NeverDecaf
Copy link
Owner

NeverDecaf commented May 26, 2024

Okay, don't worry about testing the above fix. Instead let me make sure I fully understand the issue first:

  1. The problem is: installing any extension from the popup menu or web store downloads the CRX instead of prompting to install the extension.
  2. The flag #extension-mime-request-handling has been set to Always prompt for install
  3. The Always download CRX files checkbox in chromium web store options is not checked.

If all of these are true, then I've prepared 2 slightly modified versions of the extension you can try and see if they fix the issue:
cws-test-A.zip
cws-test-B.zip
Please test A first and only try B if A doesn't work. (If you can't install crx files with drag&drop, you can use the "load unpacked" workaround described in the comment above this one.)

Notes for posterity:
Both versions only modify this line, A and B remove the tabs.update and B sets active: true I'll also mention that I have a vague memory of chromium disallowing CRX installs from most URLs (which would cause the behavior described by this issue), it's possible that the build I'm using has been compiled with a special patch to make this possible, though I'm fairly certain that patch would be the one that adds the #extension-mime-request-handling flag in the first place...

@waldner
Copy link

waldner commented May 26, 2024

My experience (without trying your new patches) is that a background tab is opened, the extension gets downloaded (because I see the file appears on disk), but then the download icon keeps spinning, the download never finishes, and it cannot even be interrupted by clicking on the X button.

@NeverDecaf
Copy link
Owner

That's really strange... it sounds like a browser issue that's independent of this extension. The only thing that happens when you update an extension by clicking in the popup is that your browser opens a url in a new tab. Here is the uBlock url that would open, for example: https://clients2.googleusercontent.com/crx/blobs/AcO95oh11uHb5009Xya0VZQmSlSj81IfJLi8Ai01-01SLLk5PKQnNmaKxflEjToRfXpzcGcUuUBDdER4P_SJ1DmeQURAwBPqfmHtnKScv2U2qGj9RQNEUcqhZ241tHg10Vf0AMZSmuWQVmmt0hbH8B_6jziS-MOD5cTcxg/CJPALHDLNBPAFIAMEJDNHCPHJBKEIAGM_1_58_0_0.crx
Can you try visiting this url in your browser to see if it prompts for install correctly?

@waldner
Copy link

waldner commented May 27, 2024

Yes that works and I'm prompted to install it. As soon as some extension need updating, I'll test your new version of the addon.

@waldner
Copy link

waldner commented May 27, 2024

As a matter of fact, one addon became updatable shortly after I wrote this, so I tested with the original cws extension and I got the buggy behavior; I then uninstalled and installed cws-test-A and that worked. Unfortunately I don't have another updateble addon now, so I couldn't test cws-test-B. But cws-test-A seemed to work fine.

@apprehensions
Copy link

apprehensions commented May 27, 2024

Had this issue, using the cws-test-A.zip variant of the extension fixed it.

I was able to install themes

@NeverDecaf
Copy link
Owner

Good to hear! This seems to be an issue with chrome.tabs.update but I'm not sure that method is needed in the first place. I'll wait for maybe one more person to confirm that test A works then I'll update chromium web store with the fix.

I believe I was using chrome.tabs.update to circumvent an issue with Update all extensions where only one of the pending updates would be downloaded. MV3 has changed a lot since then and "update all" was a hack to begin with so it wouldn't surprise me to find that this workaround doesn't do anything anymore.

@ljford7
Copy link

ljford7 commented May 28, 2024

Just chiming in that A fixed it for me as well (couldn't download any themes from the store).

@waldner
Copy link

waldner commented May 28, 2024

Just had a chance to test B, and it worked too.

However (don't know if it might be related, so let me know if you want a separate issue opened for this), sometimes I see that the number in the the red badge with the updateble addons count does not decrease even after an addon has been updated. Happens with A and B as well.

@vodkapmp
Copy link

Also just chiming in, A fixed the issue for me.

@NeverDecaf
Copy link
Owner

sometimes I see that the number in the the red badge with the updateble addons count does not decrease even after an addon has been updated.

Just a quirk of how updates are handled, see #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.