Post

Replies

Boosts

Views

Activity

How to completely remove extension?
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?
0
0
455
Jun ’23
Cannot import script to service worker with `self.importScripts`
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
1
1
2.1k
Jul ’22
Is "storage.session" not available in Manifest V3?
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?
2
0
1.2k
Jul ’22
Infinite loop in "browser.i18n.getMessage" API
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!
2
0
1.2k
Mar ’22
Using "captureVisibleTab" on extension page
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?
0
0
925
Apr ’21
Storing Blobs into IndexedDB
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...
0
0
1.8k
Apr ’21
Reply send from runtime.onMessage handler is not received by sender
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
2
0
2.9k
Sep ’20