Document explicitly that storage.managed.get() is cached, its content reloaded only on Firefox restarts and onChange event is not supported
Categories
(WebExtensions :: Storage, task, P3)
Tracking
(Not tracked)
People
(Reporter: andrey2013, Assigned: rbloor)
References
Details
(Keywords: dev-doc-complete)
Attachments
(2 files, 4 obsolete files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Steps to reproduce:
I'm developing browser extension.
- Configured the location of the manifest.json.
- Started the extension and loaded manifest.json via storage.managed.get().then(..)
- The right data was loaded
- Manually updated manifest.json
- storage.managed.get().then() didn't get the new values.
- Waited for 16 hours and restarted the firefox
- storage.managed.get().then() got the new values
Actual results:
storage.managed.get() did not take the updated values in manifest.json (the file was updated manually after the extension already started)
Expected results:
I would expected storage.managed.get() to bring the updated values on manifest.json
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•5 years ago
|
||
I thought this was documented on MDN, but can't find it now. Adding doc-needed to track adding it.
Aside from that, Mike do you know if we support updates to Policy while Firefox is running for anything else?
Also also, the storage.managed page should probably mention that we also support setting it via Policy.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/managed
Updated•5 years ago
|
Comment 3•5 years ago
|
||
Mike do you know if we support updates to Policy while Firefox is running for anything else?
Nope, all policy changes require a restart.
Good point on the doc changes. I need to get something documented around that.
Updated•4 years ago
|
Comment 4•4 years ago
|
||
Clear a needinfo that is pending on an inactive user.
Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE.
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 14•2 years ago
|
||
Clear a needinfo that is pending on an inactive user.
Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE.
For more information, please visit BugBot documentation.
Updated•2 years ago
|
Comment 16•2 years ago
|
||
Clear a needinfo that is pending on an inactive user.
Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 17•1 year ago
|
||
Doc updates in Bug-1685965 managed storage policy update clarification #37794. However, what is the status of onChange? If an update to manage storage only occurs when the browser starts, does onChange ever fire in practice? If it doesn't, then we need a note to say that while supported it has no practical use until such time as a browser change is made to dynamically load policy changes. Do any other browsers dynamically load policy changes to manage storage?
Comment 18•1 year ago
|
||
onChange definitely wouldn't make sense for us. You're right, I should update the docs.
Other browsers dynamically load policy.
Comment 19•10 months ago
|
||
A notice has been added to https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/StorageArea/onChanged to more explicitly mention that in Firefox the managed storage content is expected to be only reloaded on restarts and so that technically it is expected to not be emitting the browser.storage.managed.onChanged event.
Marking this as fixed (from a documentation perspective, from an implementation perspective this was already the expected behavior).
Updated•10 months ago
|
Comment 20•10 months ago
|
||
Do we have a big for fixing the caching? we'll need to do that for Firefox Enterprise.
Comment 21•10 months ago
|
||
(In reply to Mike Kaply [:mkaply] from comment #20)
Do we have a big for fixing the caching? we'll need to do that for Firefox Enterprise.
Hi Mike,
I just took a look and we don't have one tracking support for refreshing the storage.managed data after it has been loaded before in the same Firefox session, would you mind filing one and link it to this issue as a seealso?
Comment 22•9 months ago
|
||
Description
•