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.
Answered by KyleYe in 669526022
A solution for me
Code Block
PATH=/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support:"$PATH"
lsregister -f /Applications/Safari.app

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

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

Did:

lsregister -f /Applications/Safari.app

fix the issue for other folks too?

This is only a solution for client side?

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

Safari Web Extension Not Working for User
 
 
Q