Safari Web Extension Not Working for User

Hey everyone, so I have a Safari Web Extension live in the Mac App Store, and it seems like it's working for most of my users, however I have a user saying that the extension is not appearing in Safari's extension window for him after running the app.

After performing basic troubleshooting (making sure he's using Big Sur and Safari 14, restarting his computer, reinstalling the extension), it still seems to not be working for him.

I've narrowed the issue down to this piece of code:

Code Block  
SFSafariExtensionManager.getStateOfSafariExtension

Normally in the ViewController, it runs this function and says either "\(appName) is currently on." or "\(appName) is currently off." in the main window.

However, for my user, his window just says "\(appName)", which tells me that "getStateOfSafariExtension" is throwing an error.

What would my next troubleshooting steps be to figure out what's going on for this user? Trying to get the extension successfully installed for him.

Thanks so much! Sorry for the long post.

Accepted Reply

A solution for me
Code Block
PATH=/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support:"$PATH"
lsregister -f /Applications/Safari.app

  • AMAZING, IT WORKED! THANK YOU SO MUCH FOR THIS!

Add a Comment

Replies

This looks like a similar or perhaps identical problem I'm experiencing https://developer.apple.com/forums/thread/668693
Yes this issue sounds similar, pkdavidstorm. Unfortunately my extension just got a 1-star review because of this issue (user unable to see the extension in Safari, and the button to "Quit and open Safari Extension Preferences" does nothing.) Hopefully this is fixed soon.
Edit: I now have 3+ users reaching out to me with installation issues, and a 1-star review saying that the extension is not installing. What’s going on?
The best thing to do would be for the user to collect a sydiagnose and attach it to a bug report at https://feedbackassistant.apple.com

Without that, it's hard to know what is going on here.
@tuggif Have you ever figured out the culprit here?
  • Yes! Check out the accepted answer (lsregister).

Add a Comment
I too have received a 1-star review due to the same issue... any known fixes for this issue?
A solution for me
Code Block
PATH=/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support:"$PATH"
lsregister -f /Applications/Safari.app

  • AMAZING, IT WORKED! THANK YOU SO MUCH FOR THIS!

Add a Comment
Seems related to: https://developer.apple.com/forums/thread/112057

@tuggif did you figure out what the problem was? A couple of our users are reporting the same too.

  • Unfortunately I have not, however, I just asked one user experiencing this issue to try out this new lsregister solution - will report back with results!

Add a Comment

Did:

lsregister -f /Applications/Safari.app

fix the issue for other folks too?

  • Sorry just saw this comment and this new lsregister solution. I just asked a user experiencing this issue to try it out - will report back!

  • One of my users reported back saying that the two lsregister terminal commands worked!! Finally!

    Is there a reason why some users are experiencing this issue (Safari Launch Services needing to be force updated?) Thanks!

  • Hi @bweinstein,

    I'm having to ask multiple users a day to do the following two terminal commands to fix their Safari extensions not showing up, is there any way that this can be fixed? The following two commands work with a 100% success rate, but they have to do it on their end unfortunately.

    PATH=/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support:"$PATH" lsregister -f /Applications/Safari.app

Add a Comment

This is only a solution for client side?

I can't upload my extension because for the reviewer that button doesn't work. 🤦‍♂️

  • Having the same issue with reviewer. How did you fix it?

  • Having same issue with reviewer. How did you fix this?

  • Have you found any workaround for this bug?

Add a Comment