iOS 17.4.1 Safari extension issues

Since updating to iOS v17.4.1 our safari extension no longer functions as it used to We are experiencing issues where our content script is not getting initialized, On devices running iOS 17.4.1, the content script included in our extension does not appear to run. There are no logs from the content script in the console, whereas on other versions and devices, it operates as expected. Our Extension relies con communication between the background and content scripts in order for us to render various popups to our users, based on our logs as of iOS 17.4.1 this communication is not successful, we can see messages being sent from the background script but as mentioned above nothing on the content script side.

This behavior happens majority of the time and on random sites, sometimes opening the same site in a new tab would work but not always. There are also times where we would only receive our popups after opening the safari menu and interacting with our extension via this menu.

Please assist with a way forward

Replies

We believe that this issue is resolved in iOS 17.5, please test against the latest developer seed to see if your extension still experiences this issue. If it does, please let us know using http://feedbackassistant.apple.com/ and share the Feedback ID here.

  • Thanks for acknowledging this, is there any known workaround until iOS 17.5 is released?

  • Update: I have tried on iOS 17.5 but the problem is still occurring, so a workaround would be appreciated.

Add a Comment

I have tested on the ios 17.5 beta version and we are still experiencing issues.

Here is the feedback id: FB13744621.

Here is the issue we are now facing on the 17.5 beta version. Based on our logs, what we seeing is that the content scripts are being loaded on this beta version but an issue we now seeing is that most of the time our background scripts are only getting run once we interact with our extension via the safari menu. An example of this is, our extension when landing on certain sites and the tab gets loaded we send a message from the background script to the content script to load our popups, what is happening on this version is that even though the tab has completed loading our popup wont appear until we open the safari menu and interact with our extension, as soon as we interact with the safari menu our popups get loaded and we can see the logs from our background script. This functionality used to work as expected on iOS versions prior to 17.4.1

  • Same issue with the background script loading only once or twice on iOS 17.5 beta(1,2,3), it works reliably on iOS 17.4.1. In my app, which uses only a background script (no content script), I have to force quit Safari and relaunch it to make it work again. I also tried create new Safari extension where I added a webNavigation.onBeforeNavigate listener to the background script. However, this listener triggers only once or twice and requires tapping extension popup to get it working again briefly

Add a Comment

Thank you for filing this feedback!

Is it possible to include a sample extension in the feedback that reproduces this issue + steps to reproduce using that extension?

What do you mean by the Safari menu here?

Good day, I've attached more information as well as a couple of screen recordings to the feedback ticket - FB13744621. I've also added a link to the current production version of our extension. Please review and let me know if there is anything else you need.

By safari menu, I am referring to the menu that opens up when we click on AA, which gives us options to manage our extensions as well as other options.

Thank you for your time and I look forward to your response

I'm experiencing the same issue. The background script only loads once or twice on iOS 17.5 beta 1, 2, and 3, whereas it works as expected on iOS 17.4.1.

My app doesn't include a content script, only a background script. To resolve the issue, I have to force quit Safari and relaunch it. Additionally, I attempted to create a new Safari extension project. In the background script, I added a listener to webNavigation.onBeforeNavigate, but it only triggers once or twice and then stops working. To get it to trigger again, I need to tap the 'aA' menu and then tap the extension popup menu, but it still only functions sporadically.

Feedback id: FB13735437

Good Day, Is there any update on this? FB13744621.

Looking forward to your response.

Good day, Is there any update on this issue? FB13744621.

Thanks.

Hello, I am on the latest iOS 17.5 beta, still having issues with my extension.