Discrepancy Between Local and Web Store Version of Chrome Extension

114 views
Skip to first unread message

Kris Escobar

unread,
Oct 4, 2023, 7:48:53 PM10/4/23
to Chromium Extensions
Hello,

I've developed my first Chrome extension that works flawlessly when loaded unpacked (locally). However, once packaged and installed from the Chrome Web Store, a specific functionality (real-time visual update of a timer) fails to work as intended.

I've verified that the code in both versions (local and from the store) is identical. Additionally, testing the extension across different profiles and browsers (like Edge) resulted in the same issue.

Interestingly, a folder named _metadata is present in the Web Store version, containing computed_hashes.json and verified_contents.json, which isn’t in my local version. No other discernible differences are present.

I’m stumped and would greatly appreciate any insights or suggestions the community might have regarding this perplexing issue.

Thank you in advance!

Simeon Vincent

unread,
Oct 4, 2023, 8:46:00 PM10/4/23
to Kris Escobar, Chromium Extensions
Based on what you shared so far I see two potential causes.

1) You’re using chrome.alarms for your timer. As described in the create method's docs, there’s no limit to how often an alarm can fire when running an unpacked extension, but packed extensions cannot schedule alarms less than one out from when the alarm is created. 

2) You're doing something like using setInterval in the extension's service worker to call action.setIcon() every second and don't have many other extension events being received by the service worker. In this case, the extension service worker is probably being stopped due to inactivity. You may not have seen this during development because keeping devtools open extends the life of the service worker.

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/da989f32-bf73-4bd0-abd3-637432404147n%40chromium.org.
Reply all
Reply to author
Forward
0 new messages