Closed timharek closed 3 years ago
A few questions about your setup:
Some possible root issues that spring to mind when a page doesn't redirect:
nitter.net
for Twitter) if the value for Nitter instance is undefined. Not sure if this will lead to more confusion, however. Will need further input.https://adservice.google.com/adsid/google/ui
, which is most likely blocked by my PiHole. Nothing else. I have tried disabling the whole PiHole to check if it's that, but it's not :/Huh, nothing obvious there that I can find. Been trying to reproduce it on my end, I'm thinking it's got something to do with the M1 as that's the only variable different between our setups. I'll try and look into this more, but I'm sorry I can't see that much more to do as I don't have an M1 machine myself.
Same problem here. M1 Air on Big Sur 11.5.2.
On YouTube nothing obvious is in the dev tools beyond a ton of crap being blocked by a separate content blocker.
If I go in the "sources" and look at extension scripts I don't see anything related to this add-on being loaded. Is this expected?
When navigating to one of the supported sites, there should be a content script loaded that checks for your settings and then runs if the redirect is enabled – I'm not certain that "sources" is where that shows up, but it sounds right.
@jneplokh is potentially going to be able to work on an M1 Mac in the next week or so – we can investigate more then. In the meantime, I might cook up a build from the main branch for you to potentially test and see if the changes made since last publishing to the App Store affect this error.
I wanted to leave a comment that I tried compiling this on my (Intel) Mac but it fails to work even on Twitter. The extension is enabled, and nothing happens regardless of anything I can tweak in Safari or the native settings. There's nothing in the dev tools either at least where I looked. I haven't tried the Mac App Store version, although I wouldn't mind buying it knowing it might work :-)
We think we've narrowed down what the issue is, but we're not sure how to fix it just yet. Both @jneplokh and I are able to reproduce the bug.
In ContentView.swift
and InstancesView.swift
we make calls with the @AppStorage
property wrapper to set the user settings. They're initialized with our default values: all redirects are enabled, and the basic instances are configured:
https://github.com/smmr-software/privacy-redirect-safari/blob/27f4fd9dfcabe326614383000b0e375bec38268c/Privacy%20Redirect%20for%20Safari/ContentView.swift#L14-L19
https://github.com/smmr-software/privacy-redirect-safari/blob/27f4fd9dfcabe326614383000b0e375bec38268c/Privacy%20Redirect%20for%20Safari/InstancesView.swift#L18-L23
However, the defaults don't seem to be set initially when accessed from SafariWebExtensionHandler.swift
:
https://github.com/smmr-software/privacy-redirect-safari/blob/27f4fd9dfcabe326614383000b0e375bec38268c/Privacy%20Redirect%20for%20Safari%20Extension/SafariWebExtensionHandler.swift#L31-L36
Instead, booleans return false
and strings return nil
, the UserDefaults behavior for unset keys. This stops the extension from redirecting, as it sees that all redirects are disabled and thus does nothing.
We're investigating the root cause of this issue, but in the meantime our hacky fix (which seems to work on our end, but let us know) is to toggle all of the settings off and on.
Yes - toggling the settings resolved the problem.
Just pushed an commit that should solve this issue – sending this over to the App Store now. Obviously, if the issue persists, please let us know!
Can confirm that this works now! Awesome 😄 Great work
I have enabled all of the redirects and it does not work google.com, translate.google.com, youtube.com, maps.google.com nor reddit.com(or old.reddit.com). Only one that works is Twitter.
I'm using an M1 Mac and I bought the extention via the App Store.
Please let me know how I can help sort out this issue :)