-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UserScripts 4.0.9 upgrade caused the extension to disappear from Safari #193
Comments
Thanks for reporting this. I have a test machine, running 11.6.2 that I just ran the update procedure on from 3.3.1 -> 4.0.9 and didn't experience this. I wonder if it has something to do with macOS 12. Did you have Safari open when you updated? Have you restarted Safari? Have you given the extension permission to run in Safari? (apologies for the simple questions, just checking) Looking through the logs I don't see anything that clearly indicates what is going in. If you have console.app open and are streaming, then subsequently open Userscripts.app, and then filter the console by "userscripts" you should see any errors related to the app and extension.
In my experience, that indicates the app is not able to "communicate" with Safari properly, but that shouldn't be the case here. Any additional information you can provide via the console method mentioned above would be super helpful. If all else fails these steps should, hopefullym resolve any lingering issues:
Doing the above will remove any settings you've made previously, such as the built in editor settings and which scripts are toggled on/off. |
Did all of the above, but it didn't change anything. Here's the Console.app output from launching Userscripts:
|
I'll try spinning up a clean VM of 12.1 and see if the same thing happens. |
How are you going about installing the app/extension? The only time I have seen the message, I am still looking through the logs you sent, I will let you know if I find anything of value. |
Nope; I'm just installing it from the App Store. Nothing special. |
@djpadz can you email me at the address listed on my profile? |
Was this a fresh install or an update? I spoke to @djpadz via email and he got it working, but I am not totally sure the steps he took. It seemed like there was a larger issue at play and perhaps not the app or extension directly causing the issue. From the logs above, and your screenshot, it seems like you both have AdGuard running. I am wondering if this issue could be somehow related to that. If you disable AdGuard, restart Safari and the Userscripts App, does anything change? |
@YaxinCheng also, are you on Apple Silicon or Intel? |
@quoid I noticed the problem after updating. Then I tried to uninstall and reinstall from App Store, but it did not work. I also tried the suggestions you gave above about deleting folders from I'm on Apple Silicon I just tried to disable ADGuard and restart safari, but it did not help either. Tried to reinstall UserScripts too after restarting safari, it still does not show up in the extension page |
Thanks for following up. This is difficult to figure out. If you'd don't mind shooting me an email (on my github profile), we could try to further debug this over there and if we come up with a solution, we can update this issue. |
@quoid Sorry if I miscommunicated, but I was not able to get it working. It works fine on my M1 Mac, but my Intel Mac is still not seeing the extension (on 4.0.9 and 4.0.10). I've been able to uninstall and reinstall other extensions on that machine without any problems. Coincidentally, I'm running AdGuard, too. However, I'm also running it on both machines: the M1 and the Intel Mac. I'll try uninstalling AdGuard, just for grins. |
No luck uninstalling AdGuard. I even went so far as to uninstall all of my extensions. One additional thing that I did was to reboot with SIP turned off. This gave me visibility into ~/Library/Containers/com.apple.Safari. I noticed that the Extensions.plist file didn't mention Userscripts. So that would tell me that the extension registration failed. @YaxinCheng By any chance are you running CrowdStrike? |
@djpadz thanks for clearing that up In the console of @YaxinCheng we are seeing the following error and fault:
It's seemingly an issue with a plist file. It's curious that this is only affecting a subset of users. I wonder what the file at this location According to this Apple dev post, that error could be considered "log noise". However there is mention of an entitlement which the app does not have, Could there be anything on your machines that would blocking this app from running? Just posting this issue from another repo because it seems similar, however the solution there seemingly did not work here (deleting both Userscripts folders) from the Edit: I am just realizing that |
@YaxinCheng CrowdStrike is an antimalware package. Just curious if that might have been the culprit. @quoid I had both |
This is interesting... I just checked the Intel VM, and it has |
I noticed when I I also noticed this in the logs @YaxinCheng sent me, however still not sure if it is relevant:
|
Yeah, I noticed the same thing with the alias naming. The results that I posted were all from the |
Just adding some more data. I was seeing this with an auto-update to 4.0.10 and then managed to resolve it by restoring to an older version of Userscripts from a Time Machine backup. I then upgraded back to 4.0.10. However, after a few days and reboots the problem has come up again. When I came to my computer this morning, there was a prompt to restart Safari because of an update and afterward Userscripts was disabled again. I've tried the steps above and they do not work. I've restored Userscripts from my Time Machine backup again. This time the version I restored was 4.0.10. It has started working again. So it appears to be happening with App Store update versions. I'm on a M1 MBP and 12.1. I do not have AdGuard installed but do have a few other Safari extensions. |
@43n79w Thanks for the report Unfortunately, I still have no idea why this is happening for some users. I am going to dig more into the issue this weekend and hopefully I can uncover something.
Interesting find. I would expect clean installs to resolve the issue if that the App Store update was the cause. I'd be interested to hear if everything continues to work for you, longer than a few days. Version 3.x can be downloaded and installed outside of the App Store if something is needed in the meantime. |
I downloaded the source for 4.0.10, and built it on my machine. Launching it locally, I got the following error on the console. Dunno if it helps.
|
Done. Looks like it threw the same exception:
|
Incidentally, I also tried signing it with my own Apple Developer cert. Same thing :-/ |
Solution! I tried this and it worked! https://lapcatsoftware.com/articles/disappearing-safari.html [edit] I did have to delete So I think that (assuming the fix holds) we can safely say that the problem wasn't necessarily a bug in Userscripts, as it hit other people with other web extensions. |
Nice! Thank you so much for sharing this! I thought I saw another reply showing the For those reading this thread, the solution in the linked article is:
It was interesting to hear that Bitwarden had a similar issue. Please do let me know how it works out for you. I will report this to Apple if it ends up being an upstream bug. |
Works! |
I have also tried this solution from @djpadz, and it works fine for me! Thanks for @djpadz for finding the solution and thanks @quoid for helping me all the way through! |
One quick caveat to the solution above... Some apps may need to be reinstalled, unless they can figure out their own permissions. I found this to be the case with Parallels. |
@quoid Regarding the disappearing scripts... Do you use the iCloud frameworks to sync them? If not, you might consider that... |
@djpadz I don't use the framework, the user can set any folder they like, whether it be iCloud or Dropbox, etc... Can you elaborate on the value of adding iCloud frameworks?
Also, what are you referring to? Scripts should not be disappearing |
I guess it'd just be one less thing to worry about. That said, using a user-specified folder that can be picked up by DropBox or iCloud Drive would do just as well. In any case: https://github.com/apple/cloudkit-sample-privatedb-sync
Oh, I was just talking about #213. I know they shouldn't be disappearing; I might not have read the issue closely enough though. |
Got ya. Yeah, I am much more in favor of user-specified folders. To be clear, that is already implemented, right now you can select any folder you'd like to store your userscripts, including an iCloud folder.
Roger that, I thought there was something else I was missing. I am still unsure if the userscripts disappeared for that user or a new directory was created and the old directory still is housing their old userscripts. |
Right. I did want to mention that it'd be helpful if, in the UI, mousing over the save location would reveal the entire path and/or clicking Change… would start you at the existing path. Right now, it just goes to ~/Documents, regardless of what the save path was set to. (sorry if we're getting off-track here.) |
Agreed, I think that would be a valuable enhancement.
Interesting; on my machine when I click change it takes me to the folder that I have set, which is an iCloud directory.
We are, but that's ok. You solved this major problem so I owe you! I will make an issue for the hover path enhancement, as for the second, I will look more into it. If you think there's a bug, feel free to open a ticket for it. |
Strangely, this bug just occurred for me when I updated to macOS 12.3 last week. The provided fix worked. |
@lucasbrown I am very glad to hear that! Thank you for reporting the success. Unfortunately it seems like this is happening to more people than I originally had thought. I actually noticed a 1 star review on the app store due to this bug, so it is definitely hitting people who are unaware of the GitHub repo. If there was something I could do to prevent it I would, but it is seemingly out of my hands, especially considering other extensions/apps have experienced it. |
I was having the same issue, the extension disappear from Safari for your extension and another one. Userscripts Safari Version 4.1.0 |
Thanks for reporting this @gem2578 - this seems to validate that this is not a specific issue with this extension but rather an upstream bug with Safari |
The fix from @djpadz worked too for me: Userscripts.app v4.1.0 |
Thanks - The fix from @djpadz worked for me. Userscripts v 4.2.0 |
Fix not working for me. M1 macOS 12.5 used this command: rm -r ~/Library/Containers/com.userscripts.macos* still have error " Safari Extension State Unknown" |
That seems like a different command that what is suggested in this article: https://lapcatsoftware.com/articles/disappearing-safari.html. Have you tried what is described there? |
@quoid |
closing this issue but it will remain pinned so users who experience it can reference this info |
from #353:
|
After updating to US 4.0.9 from the App Store, the UserScripts extension no longer appears in the extensions list in Safari. Launching the app says that the Safari Extension State is Unknown.
System Information:
The text was updated successfully, but these errors were encountered: