A potential showstopper bug jeopardizing MV3 extensions

252 views
Skip to first unread message

Artem Harutyunyan

unread,
Nov 17, 2022, 4:36:19 AM11/17/22
to Chromium Extensions
Hey folks,

I apologize for a rather dramatic subject, but I don't know how to say it more mildly :). 

We would really appreciate some upvotes and attention on Issue 1371432: Extension service worker goes into dead mode, no way to Active. We have submitted it a while ago with clear and reliable repro steps, but haven't gotten a meaningful response yet. 

When this happens the extension goes into full dead mode. It can not be activated neither by clicking nor by hitting the keyboard shortcut. Clicking on the `Service worker (inactive)` in `chrome:extensions` also yields no results. So there's no other way than a hard reset, which is to say that users are just going to rage-uninstall the extension and give it a 1 star review (rightfully so, I must say :)).

I would appreciate some help on escalating this issue 🙏 or advice on how to work around it.

Artem.

--
Co-Founder and CTO bardeen.ai

Jackie Han

unread,
Nov 17, 2022, 7:30:05 AM11/17/22
to Artem Harutyunyan, Chromium Extensions
Your issue looks the same as issue 1271154. It is a well known issue. Someone in that issue also said that using puppeteer can reproduce this problem.

--
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/CAJ6ApNfJKn7pupAzYALJu_YyLH9q6wXzzzSaDwx3vPNqG%3D3Mag%40mail.gmail.com.

Manvel Saroyan

unread,
Nov 17, 2022, 2:07:14 PM11/17/22
to Chromium Extensions, Jackie Han, Chromium Extensions, Artem
> Your issue looks the same as issue 1271154

Not sure if they are related(maybe I am missing smth):
- Tested with latest Puppeteer(Chromium `108.0.5351.0`): it's still there.
- Service worker is not getting unregistered, it's still listed in chrome://serviceworker-internals, but never starts again, unless actual extension page is open(i.e. options page) or hard reload.
- Sounds more similar to https://crbug.com/1316588, but we use RPC connection within content script.

Here is a loom recording, with more details and demo: https://www.loom.com/share/0f270e570e0a44e5aafbd81395151390 

You think they are still related? If so, on which Chromium build version I can verify it?

Jackie Han

unread,
Nov 17, 2022, 3:45:20 PM11/17/22
to Manvel Saroyan, Chromium Extensions, Artem
Issue 1271154 and Issue 1316588 are very similar, I don't strictly distinguish between them. Because they all behave that the service worker is unresponsive. From this point of view, I don't think 1271154 has been fixed, because there are still developers reporting this problem.

From comment 68, Simeon said:
  • If you can find the extension's ID on chrome://serviceworker-internals, comment on issue 1316588
  • If the extension ID does not appear on chrome://serviceworker-internals, comment on issue 1271154

Manvel Saroyan

unread,
Nov 18, 2022, 4:37:58 AM11/18/22
to Chromium Extensions, Jackie Han, Chromium Extensions, Artem, Manvel Saroyan
Thanks for followup, really helpful.

I see your point, right, the fix commit in `1271154`  seem to aim to fix both cases, but those two have 2 different hotfix(if we refer to separation mentioned in Simeon's comment) from what I read/tested:
- `1316588` - opening any extension page seem to fix that "zombie" state.
- `1271154` - opening any extension page and then registering service worker again.

That's why I try to differentiate between both at this point, I might be still missing something, but my impression is that there are less reports about `1271154`, but more about `1316588` and many new reports on `1271154` doesn't mention if the SW has got unregistered(extension ID does not appear on chrome://serviceworker-internals), more seem to be zombie state(can find the extension's ID on chrome://serviceworker-internals) related. Assume that might be one of the  reason why Simeon ask to comment under 2 different ticket. Saying that, I am currently thinking to come-up with a hot-fix for `1316588`, assuming that `1271154` is fixed, please correct me if I am wrong and if you or anyone else know of any available more or less reliable reproduction step for `1271154` in that context reported since the fix, that would be super helpful because we have repro for `1316588`, but can't reproduce `1271154` in mentioned context.

Manvel Saroyan

unread,
Nov 18, 2022, 11:49:59 AM11/18/22
to Chromium Extensions, Manvel Saroyan, Jackie Han, Chromium Extensions, Artem
We decided to add hotfix for both of the cases mentioned above and also we will get notified in case users will have the service worker unregistered, there is no way we can get info about the zombie state, but this can provide some high level info if users experience service worker unregistration issue. Will keep posted when we have more info. Thanks for your help.

Pawel Kacprzak

unread,
Nov 18, 2022, 12:00:15 PM11/18/22
to Chromium Extensions, Manvel Saroyan, Jackie Han, Chromium Extensions, Artem
We also did the same last week. 

First notified users about the bug and the responses were positive, fortunately, many users figured out that disabling and re-enabling the extension re-registers service worker. Every user that reported back said that the bug is rare (1-2 times in 2 weeks span of daily use) and they couldn't name any specific actions to replicate it.  

Then, 3 days ago, we published a workaround that works flawlessly in our case - if your main entry point for the extension is clicking the extension's icon, i.e. action button, then I described the workaround here: https://groups.google.com/a/chromium.org/g/chromium-extensions/c/MesMv9ugQIQ/m/Hk4D8LILBAAJ and it's based on the idea given in the same thread: https://groups.google.com/a/chromium.org/g/chromium-extensions/c/MesMv9ugQIQ/m/f97t4JkCBAAJ

 

Artem Harutyunyan

unread,
Nov 18, 2022, 12:13:45 PM11/18/22
to Pawel Kacprzak, Chromium Extensions, Manvel Saroyan, Jackie Han
Good to know we are not alone :). Do you think there are any levers we can pull to draw Chrome developer's attention to this? While a popup solves the problem, it's not ideal from a UX point of view. We got mixed responses about the flickering popup, and it would be good to solve this problem for good. 

Also, wanted to use this opportunity to say a very special THANK YOU to wOxxOm! He saved us (and I am sure a lot of others in the community) countless debugging hours :) 🙏.


Cheers,
Artem.

Pawel Kacprzak

unread,
Nov 18, 2022, 12:35:12 PM11/18/22
to Chromium Extensions, Artem, Chromium Extensions, Manvel Saroyan, Jackie Han, Pawel Kacprzak
Probably posting on bugs' threads as Simeon Vincent suggested: https://groups.google.com/a/chromium.org/g/chromium-extensions/c/MesMv9ugQIQ/m/YMlaxxAQBAAJ but even if there is a fix coming today then a) it'd take some time to land in the production version considering Chrome shipping schedule b) workaround is a viable option for those with Chrome versions from before a fix

I also would prefer to not have any popup shenanigans but I find it magnitudes less painful than the extension not working.

> Also, wanted to use this opportunity to say a very special THANK YOU to wOxxOm! He saved us (and I am sure a lot of others in the community) countless debugging hours :) 🙏.

Totally, if not wOxxOm then our fix either wouldn't exist or would be much delayed. Huge thanks! Also, keeping up to date with (relevant) posts on the group helps immensely. There are so many tricks and hidden knowledge about shipping/migrating to MV3 that someone could consider creating and managing a wiki about it (or even a book or some other resource). I'd happily contribute to that in areas I know about.

Anteneh Bekele

unread,
Nov 18, 2022, 12:39:53 PM11/18/22
to Pawel Kacprzak, Chromium Extensions, Artem, Manvel Saroyan, Jackie Han
Reply all
Reply to author
Forward
0 new messages