Anyone been seeing recent reports of browserAction button not working?

244 views
Skip to first unread message

Jói Sigurdsson

unread,
Apr 15, 2022, 2:52:15 AM4/15/22
to Chromium Extensions
Hi folks,

My company's support channel has for the last 5 days or so had a lot of reports of clicks on our extension's browser action button not doing anything, and I just happened to experience this myself earlier today. I managed to dig in a bit and get some screen recordings, and weirdly the event handler for the browser action click simply isn't being called by the browser (but does get called if I explicitly invoke the chrome.browserAction.onClicked.dispatch() function). So it's starting to look a lot like a Chrome bug.

If you've been hearing reports of similar, I'd encourage you to star the issue that I registered, and maybe speak up on the bug with any additional details or even just anecdotes to support that this is happening.


Best regards,
Jói

Erek Speed

unread,
Apr 15, 2022, 3:13:32 AM4/15/22
to Jói Sigurdsson, Chromium Extensions
I haven't seen this recently but have there been any new releases on your side?

That behavior is the same as what happens when you register a pop up on your browser action. If there have been any code changes I would definitely ensure that no code snuck in calling `chrome.browserAction.setPopup`

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/a0b6b08e-22d6-4a3f-a81f-a6363ca20856n%40chromium.org.

Cuyler Stuwe

unread,
Apr 15, 2022, 10:11:15 AM4/15/22
to Chromium Extensions, Erek Speed, Chromium Extensions, Jói Sigurdsson
Haven't had issues with this callback in particular yet, but have had unreliability issues with Chrome API callbacks registered at the top level in MV3 in general. Wouldn't be surprised at all to discover that it's a Chrome bug.

Alexei

unread,
Apr 15, 2022, 11:35:31 AM4/15/22
to Cuyler Stuwe, Chromium Extensions, Erek Speed, Jói Sigurdsson
Is your extension using Manifest V3? Is https://github.com/GoogleChrome/developer.chrome.com/issues/2590 the same bug? You should report it via crbug.com.

Jói Sigurdsson

unread,
Apr 15, 2022, 3:29:51 PM4/15/22
to Chromium Extensions, Alexei, Chromium Extensions, Erek Speed, Jói Sigurdsson, salem...@gmail.com
Thanks folks for the insights. We haven't migrated to MV3 yet, this is an MV2 extension, but sounds like it might be related to issue 2590. I will add a note on that issue indicating that my issue might be related.

If you check the issue I linked to (https://bugs.chromium.org/p/chromium/issues/detail?id=1316588) you'll see in the videos that the event handler is definitely not being called when clicking the browser action button, yet it does get called if chrome.browserAction.onClicked.dispatch() is invoked.

There haven't been any functional changes to the extension since October (we update our site much more frequently but the extension that enables some of our functionality significantly less frequently). The issue started cropping up about 5-6 days ago.

Best regards,
Jói

hrg...@gmail.com

unread,
Apr 15, 2022, 3:56:13 PM4/15/22
to Chromium Extensions, Jói Sigurdsson, Alexei, Chromium Extensions, Erek Speed, salem...@gmail.com
Is your background page persistent?
Have you checked in Chrome's task manager that your background page process is running?

Jói Sigurdsson

unread,
Apr 16, 2022, 2:00:56 AM4/16/22
to hrg...@gmail.com, Chromium Extensions, Alexei, Erek Speed, salem...@gmail.com
Thanks for the suggestion. It's not persistent, but a background page doesn't need to be persistent to handle browserAction clicks - a click wakes it up.

Plus, even when I open the inspector on the background page (which ensures that the JavaScript code is active) a click on the browser action button does nothing, when the bug is manifesting.

This bug happens fairly infrequently, but still enough that by now we've heard from dozens of users complaining about it.

Cheers,
Jói



Jói Sigurdsson / Founder & CEO 
j...@crankwheel.com

CrankWheel 
+1 (877) 753-2945
Kringlan 1, 4th floor, Reykjavík 103, Iceland 
http://crankwheel.com/


hrg...@gmail.com

unread,
Apr 16, 2022, 3:15:53 AM4/16/22
to Chromium Extensions, Jói Sigurdsson, Chromium Extensions, Alexei, Erek Speed, salem...@gmail.com, hrg...@gmail.com
A few ideas:
The next time the bug occurs, open your background page's console and run this:
chrome.browserAction.onClicked.addListener(()=> console.log('Toolbar button clicked')) 
 
Do you see the console message when clicking the toolbar button? 

If not, then open this URL chrome-extension://<EXT_ID>/manifest.json , then open DevTools  and run the same code line from above.
Do you see a console message this time?

Also, make your background page persistent for a few days and see if the bug still occurs. 
 
These tests will give you better understanding of the issue so you can provide more feedback in your bug report.

Jói Sigurdsson

unread,
Apr 16, 2022, 6:44:32 AM4/16/22
to Chromium Extensions, hrg...@gmail.com, Jói Sigurdsson, Chromium Extensions, Alexei, Erek Speed, salem...@gmail.com
Thanks, those are helpful suggestions.

> A few ideas:
> The next time the bug occurs, open your background page's console and run this:
> chrome.browserAction.onClicked.addListener(()=> console.log('Toolbar button clicked')) 
 
I did that, and there is no console message. It does however fire when in the same console I invoke the dispatch method for onClicked (chrome.browserAction.onClicked.dispatch()) which to me indicates that it's not any issue in our extension's code or state management, but rather the problem is that the event is not dispatched by Chrome.

> If not, then open this URL chrome-extension://<EXT_ID>/manifest.json , then open DevTools  and run the same code line from above.
> Do you see a console message this time?

I didn't do that, but I'm curious what opening the manifest file would accomplish? The background page would already be "alive" because I have the inspector open on it. Maybe there is something different that opening the manifest file would do?

Unfortunately the issue is no longer reproducing for me, and I have no steps or even hints as to how to reproduce - it seems to simply happen for some users from one moment to the next - but if it does reproduce again, I can try that.

> Also, make your background page persistent for a few days and see if the bug still occurs. 

I could do that. However, that's a bit of an unnecessary resource drain for users; non-persistent background pages are specifically intended to wake up on events (and our background page has been waking up on this event for at least the last 2 years since we made it non-persistent). Might be a good way to narrow down on the bug in Chrome though - if it does not repro with a persistent background page, then that would be input to the Chrome team on which code paths might be triggering the bug.

Thanks again,

Cheers,
Jói

hrg...@gmail.com

unread,
Apr 16, 2022, 10:17:25 AM4/16/22
to Chromium Extensions, Jói Sigurdsson, hrg...@gmail.com, Chromium Extensions, Alexei, Erek Speed, salem...@gmail.com
> If not, then open this URL chrome-extension://<EXT_ID>/manifest.json , then open DevTools  and run the same code line from above.
> Do you see a console message this time?

I didn't do that, but I'm curious what opening the manifest file would accomplish? The background page would already be "alive" because I have the inspector open on it. Maybe there is something different that opening the manifest file would do?

The purpose of this is to check if the click event is dispatched successfully to any other extension page different from the background page.
If that turned out to be the case, it would mean the problem is related to the background page only and not a general problem about the click event.

 
> Also, make your background page persistent for a few days and see if the bug still occurs. 

I could do that. However, that's a bit of an unnecessary resource drain for users...
Might be a good way to narrow down on the bug in Chrome though

Exactly. It might use more memory but it will help you narrow down the source of the issue. Plus, given that the bug cannot be reproduced reliably, you don't have many other choices.

However, let's not forget that MV2 has one foot in the grave already. 9 months from now it'll be game over. So, if you can reproduce this bug in MV3, it would give it a much better chance at being prioritize.
I suspect that all MV2-only bugs are pretty much being ignored by the Extensions Team. The have their hands full with the MV3 transition.
 

Jói Sigurdsson

unread,
Apr 17, 2022, 3:29:06 AM4/17/22
to Chromium Extensions, hrg...@gmail.com, Jói Sigurdsson, Chromium Extensions, Alexei, Erek Speed, salem...@gmail.com
> However, let's not forget that MV2 has one foot in the grave already. 9 months from now it'll
> be game over. So, if you can reproduce this bug in MV3, it would give it a much better chance
> at being prioritize.
>
> I suspect that all MV2-only bugs are pretty much being ignored by the Extensions Team. The
> have their hands full with the MV3 transition.

That's a good point. I'm hoping to get a response soon from the extensions team, but if not then using this as a reason to prioritize MV3 work on our side makes sense.

Cheers,
Jói

Alexey Makhrov

unread,
Apr 19, 2022, 1:42:04 PM4/19/22
to Chromium Extensions, Jói Sigurdsson, hrg...@gmail.com, Chromium Extensions, Alexei, Erek Speed, salem...@gmail.com
We're observing this with MV3 as well.
It seems to happen after an extension gets an update. After that the action button clicks seems to have no effect. A workaround is to reinstall the extension. Sometimes un-pinning and pinning again the button works as well. Or maybe even disable/enable the extension.
It looks quite random, with no consistent way to reproduce so far.
However, once it happens in a particular browser, it doesn't self-resolve without manual intervention li the above (e.g reinstall, un-pin)

Jói Sigurdsson

unread,
Apr 20, 2022, 6:35:47 AM4/20/22
to Chromium Extensions, ale...@crunchbase.com, Jói Sigurdsson, hrg...@gmail.com, Chromium Extensions, Alexei, Erek Speed, salem...@gmail.com
Hi Alexey,

I'm glad (kind of) that we're not the only ones seeing this. Perhaps it might help push this issue forward if you chime in on it with your observations? https://bugs.chromium.org/p/chromium/issues/detail?id=1316588

Best regards,
Jói

Simeon Vincent

unread,
Apr 20, 2022, 11:15:54 AM4/20/22
to Jói Sigurdsson, Chromium Extensions, ale...@crunchbase.com, hrg...@gmail.com, Alexei, Erek Speed, salem...@gmail.com
Alexey, the problem you describe sounds like this bug related to a service worker registration perform:  https://crbug.com/1271154. Given what Joi has described, these feel like different bugs to me. 

Simeon - @dotproto
Chrome Extensions DevRel

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.

William A.

unread,
Apr 22, 2022, 10:05:57 AM4/22/22
to Chromium Extensions, Simeon Vincent

Sorry to message you directly, was a little desperate. Is there any way you can help me with this issue: https://groups.google.com/a/chromium.org/g/chromium-extensions/c/UvE53ZidM48


Any help will be deeply appreciated. 

Jói Sigurdsson

unread,
Jun 3, 2022, 5:54:06 AM6/3/22
to Chromium Extensions, wil...@leadhornet.com, Simeon Vincent
Hi all, small update on this thread. I'm hoping to hear from others experiencing the issue of their extension no longer receiving events like its browser action button being clicked, or other events.

Starting yesterday (and completely independent of any updates to our own extension or web service code) we have heard from a few users for whom even disabling and re-enabling the extension, or uninstalling and reinstalling it, or even uninstalling and reinstalling Chrome and rebooting their machine, does not resolve the issue. The extension remains dead in the water, it shows up as a button in the browser but clicking the button does nothing.

Since this is unrelated to any update on our end it seems like this must be due to some of the new changes in Chrome 102.

Our extension is still MV2 but we have an MV3 version ready to go and will be publishing it as a separate BETA extension (clearly marked as beta, and linking back to the production extension as per developer program policies), that we will ask users having these problems to try installing.

There was some action on the bug we filed (https://crbug.com/1316588) initially but nothing for a while despite further information provided. Similarly there was some action on the related MV3 bug (https://crbug.com/1271154) and at least a partial fix for that issue in Chrome 102, but there have still been repros of that issue for Chrome 102.

Simeon, if you can drum up any action on either of those bugs, that would be great.

And all, if anybody is experiencing similar issues, please chime in here. We stand a better chance of getting attention on these issues if there are more of us. At least click the links for the bugs, log in, and "star" them near the top-left corner :)

Cheers,
Jói

Jói Sigurdsson

unread,
Jun 4, 2022, 5:11:12 AM6/4/22
to Chromium Extensions, Jói Sigurdsson, wil...@leadhornet.com, Simeon Vincent
One more update - as per the latest comment (#32) on the bug https://crbug.com/1316588 there are at least a couple of other popular extensions where users are running into this Chrome bug.

I can't see the full email address of the comment submitter, but if it was somebody on this thread, thank you for chiming in!

Cheers,
Jói
Reply all
Reply to author
Forward
0 new messages