javascriptmicrosoft-edgemicrosoft-edge-extensiongoogle-chrome-storagemissingmethod

Chrome API missing methods


I'm developing a browser extension and it was working fine until today. When I'm opening "Inspect pop-up window" console and type chrome.storage.local everything looks as expected: pop-up window console

But when I open console in any website and check for storage I get an Uncaught TypeError: Cannot read properties of undefined (reading 'local'): browser console

In fact, as the title of this question states, I'm missing most of the API methods from chrome: available methods of chrome variable

I'm using the latest Microsoft Edge Version 101.0.1210.32 (Official build) (64-bit). Tried restarting the browser and computer. Clearing all user data, cookies, everything except passwords. Tried logging out and back in in the browser and re-installing my extension as well.


Solution

  • Based on your description, I think you might be confusing chrome.storage.local with Window.localStorage.

    It stores the data of the extensions installed in local machine, so it only works in the extension. So youneed to debug it in the Inspect popup of the extensions you mentioned above.