Safari browser(especially 15.4). I have few html pages deployed as part of extension. When I try to set the current Tab page url to one of these html pages, extension stops working. May I know why ? Am I doing something wrong here ?
I have experienced a similar issue where a number of web extensions stop working on Safari 15.4. A deeper investigation shows that this is likely a Safari issue in breaking the web extension 'tabs' API:
chrome.tabs.create doesn't work when the url is a page that's packaged with an extension. It seems to crash and ruin all chrome.tabs event handlers.
Reproducible scenario:
- chrome.tabs.onActivated.addListener(()=> console.log('new active tab')) .. Note: I use onActivated just to test whether event listeners on tabs still works.
- Switching between tabs.. You should see the 'new active tab' printed in the console.
- chrome.tabs.create({url: chrome.runtime.getURL('/index.html')}) --> a new tab is created. Note: index.html is an html file packaged in your extension.
- Switching between tabs..
Expect: 'new active tab' printed in the console as usual
Actual: no 'new active tab' printed in the console…
Note: this problem does not occur when the url is a public reachable URL, nor on Safari 15.3 Version 15.4 (17613.1.17.1.13)
Please fix.