在开发Firefox扩展时遇到类似如下错误提示:
Error: The storage API will not work with a temporary addon ID. Please add an explicit addon ID to your manifest. For more information see https://mzl.la/3lPk1aE .
如:在调用chrome.storage.sync.set({}).then(()=>{})时会遇到。
解决方案
在manifest.json配置文件中增加
"browser_specific_settings": {
"gecko": {
"id": "your-id@example.com"
}
}