Chrome extension disabled after update.

87 views
Skip to first unread message

Kollerman

unread,
Apr 27, 2023, 1:18:02 PM4/27/23
to Chromium Extensions
Hey Guys! I just realized that after I update my extension it keeps getting disabled. I have "activeTab" as the only permission, but no new ones added after each update. Is this the expected behaviour?

wOxxOm

unread,
Apr 27, 2023, 1:57:52 PM4/27/23
to Chromium Extensions, Kollerman
The "matches" in "content_scripts" section is also adding to host permissions, did you change or add it?

Kollerman

unread,
Apr 27, 2023, 2:00:54 PM4/27/23
to Chromium Extensions, wOxxOm, Kollerman
Deleted one 🤔 It makes sense that this was the cause. Any idea how to call or make the page that tells the user of the update?

wOxxOm

unread,
Apr 27, 2023, 2:29:41 PM4/27/23
to Chromium Extensions, Kollerman, wOxxOm
Depends on what "update" is. For onboarding you can make an html page inside your extension and open it with chrome.tabs.create({url: 'page.html'}) from your background script (service worker), no need for a content script.

Kollerman

unread,
Apr 27, 2023, 2:40:59 PM4/27/23
to Chromium Extensions, wOxxOm, Kollerman
But the OnBoarding will only be after install, not after every update or major update, right? 

Amy Dev

unread,
Apr 27, 2023, 4:17:35 PM4/27/23
to Chromium Extensions, Kollerman
You can set the runtime.onInstalled() reason as "install" or "update". Install only runs when the user first adds the extension.

You can see a code sample here.

Simeon Vincent

unread,
Apr 27, 2023, 7:00:43 PM4/27/23
to Amy Dev, Chromium Extensions, Kollerman
Deleted one 🤔 It makes sense that this was the cause. Any idea how to call or make the page that tells the user of the update?

Removing match patterns shouldn't cause the extension to be disabled. User's should only be prompted when the extension asks for sensitive permissions it doesn't currently have.

It sounds like there may be a bug. Kollerman, are you able to consistently reproduce this? If so, it may be best to file a bug report on crbug.com.

Simeon - @dotproto


--
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/539d4679-4a69-4118-bd11-51fcec0e2af1n%40chromium.org.
Reply all
Reply to author
Forward
0 new messages