Some users send me error logs which says that the IndexedDB is broken (all DB operations throws TypeError: Load failed).
And reinstalling doesn't help. It seems that uninstalling extension doesn't delete all data so the corrupted database is still there.
How can I find and delete the extension files manually after it's been uninstalled?
Post
Replies
Boosts
Views
Activity
I'm getting the following error when I try to import my service worker script:
[Error] Failed to load resource: unsupported URL (background_ah.worker.js, line 0)
[Error] NetworkError: Load failed
Using the following code:
try {
self.importScripts('./background_ah.worker.js');
} catch (e) {
console.error(e);
}
Am I doing something wrong? The file is there but from the error it seems the extension protocol is not supported at all.
It works in Chrome and it's based on this:
https://stackoverflow.com/questions/66406672/chrome-extension-mv3-modularize-service-worker-js-file
I'm trying to port MV3 extension but it seem that storage.session API is not available.
Is that right?
I've checked the docs but there is 0 articles when searching for "storage":
https://developer.apple.com/documentation/safariservices/safari_web_extensions
MDN:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/session
Is there a plan to support this API?
If not, then where do I store session related data?
I was tracking down an infinite loop and it's caused by calling:
browser.i18n.getMessage('faq_4a', ['$13.99'])
Where the "faq_4a" is defined as:
"faq_4a": {
"message": "Highlight all prices like $1"
},
The problem is the parameter ['$13.99'], if I use this parameter for any message that accepts a placeholder, it will just froze the console or whatever executed it.
Can someone please try to run this code to verify?
I need to know if this is a Safari issue or if just my Safari broken. I use Safari 15.3 (17612.4.9.1.8).
Thank you!
I have an extension that needs to take screenshot of it's own page, but the browser.tabs.captureVisibleTab() doesn't work on "safari-web-extension://" protocol - even when the page is the extension itself and even when using "activeTab" (from popup / context menu) and "all_urls" permissions.
It just fails with:
Error: Error capturing visible tab.
Is there some workaround?
Is here anyone who is using IndexedDB to store blobs?
I'm porting my extension that stores images as Blobs into the IndexedDB but after each extension reload, some of the images stops loading (I use URL.createObjectURL(blob) to create image link). Note that same code works in Firefox and Chrome.
Also sometimes update fails with error:
Error preparing blob/file
https://bugs.webkit.org/show_bug.cgi?id=188438
If this is a known problem, I will refactor it back to Data URL strings :(.
But I'm still hoping this is just some development-mode related issue...
I've noticed the chrome_url_overrides is missing.
But is this on purpose? To NOT allow users to have custom new tab pages like in Opera?
Or is it just missing API which I can polyfill?
I could just react on new tab being created and replace it with my extension page. But is it allowed?
Thanks!
Hello,
I'm running this:
window.matchMedia('(prefers-color-scheme: dark)').matches
To see if the system is using dark mode. And while it works fine in extension pages, it will always return false in the popup window.
Is there some place where bugs like this can be reported?
Thanks!
I'm converting my extensions and I've noticed that no reply is being send when I send message between different contexts of my extension.
Steps to reproduce:
1) open background script console and execute:
browser.runtime.onMessage.addListener(x => {
	if (x === 'hello') {
		console.warn(x);
		return Promise.resolve('ok');
	}
});
2) open extension page and in the console execute this:
await browser.runtime.sendMessage('hello');
Background console will correctly print "hello" but the extension page won't receive the reply "ok".
Is sending responses from runtime.onMessage handler not supported in Safari?
MDN: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onMessage