Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

chrome.storage not defined in Opera

205 views
Skip to first unread message

Don Schmitt

unread,
Jul 4, 2024, 12:44:43 PM7/4/24
to chromium-extensions
Our extension uses chrome.storage.local, but does not declare it in the manifest.

Two questions to whoever might know:

1. Why does Opera require the "storage" permission in the manifest (without it chrome.storage is undefined)?

2. Or the better question:  Why doesn't Chrome require us to request the "storage" permission?

It strikes me that Chrome used to require it, and since it supposedly doesn't generate a warning then I can't imagine why they removed that requirement, any ideas?

woxxom

unread,
Jul 5, 2024, 3:01:25 AM7/5/24
to Chromium Extensions, Don Schmitt
It's required in Chrome in my tests.

Oliver Dunk

unread,
Jul 5, 2024, 5:11:55 AM7/5/24
to woxxom, Chromium Extensions, Don Schmitt
As wOxxOm mentioned, the storage API definitely requires the storage permission in Chrome :)
Oliver Dunk | DevRel, Chrome Extensions | https://developer.chrome.com/ | London, GB


--
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/db9c4fb6-e9b7-4d5a-a9f0-99fda8d2a3c6n%40chromium.org.

woxxom

unread,
Jul 5, 2024, 1:15:02 PM7/5/24
to Don Schmitt, Oliver Dunk, Chromium Extensions

Nice find, but I wonder if it's a bug, because the expected behavior to me intuitively would be to grant `chrome.storage.managed` and not other areas.

On 05-Jul-24 20:02, Don Schmitt wrote:
I found the source of the discrepancy.  You are slightly wrong, you apparently do not need to have "storage" in the "permissions" section if you have a "storage" entry, as in: 

...
"default_locale": "en_US",
"storage": {
    "managed_schema": "managed_schema.json"
}
...
"permissions": {
[no "storage" entry necessary]
...

Apparently Chrome treats that as an implicit request for the storage permission, because just by having that and no "storage" entry in the "permissions" section you can in fact use chrome.storage.local (in Chrome or Edge, but not in Opera).




Roberto Oneto

unread,
Jul 5, 2024, 2:05:44 PM7/5/24
to Chromium Extensions, woxxom, Chromium Extensions, Don Schmitt, Oliver Dunk
It must also be said that there are more things for which Opera follows its own path rather than those for which it conforms to the Chromium "world".
When you open a report about anomalous things or bugs they don't respond even after many months.
I personally don't test anything on Opera anymore and I don't recommend it to users of my extensions.
Too bad, because they were once competitive in some fields.

woxxom

unread,
Jul 5, 2024, 2:07:43 PM7/5/24
to Roberto Oneto, Chromium Extensions, Don Schmitt, Oliver Dunk

In this case the reason is known - it's because Opera doesn't implement any policies, including policy-managed storage. Dunno why though.

Don Schmitt

unread,
Jul 8, 2024, 7:08:27 AM7/8/24
to Oliver Dunk, woxxom, Chromium Extensions
I found the source of the discrepancy.  You are slightly wrong, you apparently do not need to have "storage" in the "permissions" section if you have a "storage" entry, as in: 

...
"default_locale": "en_US",
"storage": {
    "managed_schema": "managed_schema.json"
}
...
"permissions": {
[no "storage" entry necessary]
...

Apparently Chrome treats that as an implicit request for the storage permission, because just by having that and no "storage" entry in the "permissions" section you can in fact use chrome.storage.local (in Chrome or Edge, but not in Opera).





On Fri, Jul 5, 2024 at 2:11 AM Oliver Dunk <olive...@google.com> wrote:
Reply all
Reply to author
Forward
0 new messages