anakinsk / SafariStand

SIMBL plugin for Safari
128 stars 6 forks source link

Appears to be broken with Safari 10.1 on 10.12.4 beta 2 #38

Closed orbitly closed 7 years ago

orbitly commented 7 years ago

Stand not loading.

bauerp commented 7 years ago

Yup, same here

Fofer commented 7 years ago

I wonder if Safari 10.1 uses Library-Validation, just like Safari Technology Preview does? Fortunately mySIMBL has been updated to work around that. But SafariStand would need to be updated to deal with the same.

c0ppo commented 7 years ago

Same thing here :( mySimbl is not the problem, it was updated a while ago. SafariStand is the one that needs updating :)

Fofer commented 7 years ago

Yes, read my post again slowly, that is exactly what I wrote.

Cal-Ed commented 7 years ago

Fofer is correct, Library-Validation has been introduced - I see a couple of errors when trying to load Safari / SafariStand on 10.12.4:

Error loading /Library/Application Support/SIMBL/Plugins/SafariStand.bundle/Contents/MacOS/SafariStand: dlopen(/Library/Application Support/SIMBL/Plugins/SafariStand.bundle/Contents/MacOS/SafariStand, 265): no suitable image found. Did find: /Library/Application Support/SIMBL/Plugins/SafariStand.bundle/Contents/MacOS/SafariStand: code signing blocked mmap() of '/Library/Application Support/SIMBL/Plugins/SafariStand.bundle/Contents/MacOS/SafariStand'

then

Library Validation failed: Rejecting '/Library/Application Support/SIMBL/Plugins/SafariStand.bundle/Contents/MacOS/SafariStand' (Team ID: none, platform: no) for process 'Safari(45400)' (Team ID: none, platform: yes), reason: mapped file has no cdhash (unsigned or signature broken?)

c0ppo commented 7 years ago

Will this be fixed? :(

ibrokemypie commented 7 years ago

+1

otherguy commented 7 years ago

👍

DearDeparted00 commented 7 years ago

I know nothing about WebKit development but decided to try to get my hands dirty again last night. I noticed stand is fully functional on the latest Mac OS beta release if you open safari with the "run-safari" script without making any changes to the code. I just happened to notice it as the primary objective was just to make sure WebKit build without error, but all of he stand settings including expanded search bar were right there. Don't really know enough about either stand or WebKit to give more details nor have I had much time to play around but this might be a useful tidbit to someone more skilled than I.

DearDeparted00 commented 7 years ago

To give specifics I'm running Mac OS 10.12.4 beta version 8 from March 20th, 2017

Fofer commented 7 years ago

So macOS 10.12.4 is now released, available for all via the App Store. But I'm afraid to install it for fear of losing compatibility with SafariStand.

staniki commented 7 years ago

Doesn't work at macOS 10.12.4 (Safari 10.1) :(

drewauff commented 7 years ago

@DearLostPoetry is correct, it does work with the latest webkit..

w0lfschild commented 7 years ago

Hmmm. It's definitely a mySIMBL issue. Problem is that SIP needs to be disabled to remove Library-Validation from Safari since it's a system file. This is something I'll have to look into fixing as Apple makes more apps include this flag.

To fix this issue on your own you can turn off SIP and use unsign to remove code signing, which includes Library-Validation, from Safari.

Any updates to Safari will require the binary to be unsigned again.

b0gdanw commented 7 years ago

@w0lfschild Wouldn't be easier to sign SafariStand? We need a Cydia Impactor for MacOS :-)

w0lfschild commented 7 years ago

@bogdangit80 Unfortunately no. Signing a bundle does not allow it to be loaded.

For right now you can use /Applications/Safari.app/Contents/MacOS/SafariForWebKitDevelopment which still allows loading of mySIMBL plugins.

BigMacOS commented 7 years ago

@anakinsk any news when a new version of SafariStand will be released? I can't code or debug but I'm happy to contribute to the project? 👍 I'm finding it hard to cope without Safari stand! I'm not clear on how to unsign to get it working again. Would a new release work? Thanks for all the hard work.

drewauff commented 7 years ago

@w0lfschild any progress so far?

Autoplayhater5 commented 7 years ago

following as I've confirmed SafariStand not working

drewauff commented 7 years ago

well..for now I'm going to stick to the "WebKit Nightly" .. everything works perfectly..

DearDeparted00 commented 7 years ago

While using the WebKit project is how I found stand to be functional, it doesn't seem necessary to have a build of the project for stand to work. As @w0lfschild mentioned, running /Applications/Safari.app/Contents/MacOS/SafariForWebKitDevelopment seems to work fine. Would recommend making an alias for the script or importing it. That being said I haven't tried this without the WebKit project files all together. Simply having the project seems like a more comfortable alternative than taking the time and space to rebuild WebKit esspecially with how often it's updated.

BigMacOS commented 7 years ago

I've updated to 10.12.4 releases to the public this week and it doesn't work. I'm not that technical :( Is there anything we can do to get this working?

media-lush commented 7 years ago

Glims used to be perfect for this and a whole more cool Safari stuff but the developer just stopped upgrading [it was free]... somebody should have a look at it and try and replicate it and monetise it... pretty sure they'd make a small fortune if they charged $5 for it... how anybody at Apple looked at a whole bunch of tabs with favicons and thought that plain grey would be better beats me.

Kudos for whoever made SIMBL but whilst it did the job the installation was pretty inelegant

Fofer commented 7 years ago

As @w0lfschild mentioned, running /Applications/Safari.app/Contents/MacOS/SafariForWebKitDevelopment seems to work fine. Would recommend making an alias for the script or importing it

Can you be more specific about this? I made an alias of this file (the original is actually in /Library/Application Support/Apple/Safari/SafariForWebKitDevelopment) but I'm not sure what to do with it, or how it would allow SafariStand to work with Safari in macOS 10.1.2.4. Double-clicking it opens a Terminal window and runs some commands. What next?

DearDeparted00 commented 7 years ago

I am also currently using public beta 10.12.4 ~ The easiest way I would recommend would be creating an alias by entering: alias safariJump="/Applications/Safari.app/Contents/MacOS/SafariForWebKitDevelopment" into the terminal. Though this would be a temporary and the step would have to be repeated whenever you start a new terminal session. A bit more involved but persisting method would be making a permanent alias. You would enter in the terminal nano .bash_profile if your shell is bash and nano ~/.zshrc if you're using ZSH. There you'll be greeted with with your configuration. In bash you'll enter export PATH="/Applications/Safari.app/Contents/MacOS/SafariForWebKitDevelopment/sbin:$PATH" in ZSH you'll find a space for personal aliases near the very bottom of the configuration page reading "# Set personal aliases." At the very bottom add alias safariJump="/Applications/Safari.app/Contents/MacOS/SafariForWebKitDevelopment" (though you can really name it anything you want, safariJump was just the first thing that came to mind). Click control + x and hit y at the prompt to confirm and save the new changes to the configuration. Bash users can confirm the changes have taken by entering echo $PATH and checking if SafariForWebKitDevelopment has been added to the PATH list, whilst ZSH would enter source ~/.zshrc to update their current configuration. Enter your alias in the terminal instead of clicking the Safari icon in launchpad or the applications folder and Safari Stand should be active at opening.

BigMacOS commented 7 years ago

There's only been one release of this extension and nothing since. Ah glims, I remember glims. @anakinsk Anything you need for another release?

DearDeparted00 commented 7 years ago

Also @Fofer I've avoided using the original in explanation because I've noticed the terminal wasn't a fan of spaces. I often forget this myself but it usually won't read the full path name if theres a space in such as Application Support and not register text after the space but I believe either one would be fine in terms of preference. You'd just have to represent the spaces as backslash when entering the path into the terminal: /Library/Application\ Support/Apple/Safari/SafariForWebKitDevelopment

m-thomson commented 7 years ago

I'm able to run "SafariForWebKitDevelopment" and SafariStand works with it. Thanks for the tip @DearLostPoetry @w0lfschild

One problem - none of my extensions are installed. I don't think re-installing normally will work since "regular" safari will open any .safariextz file I download rather than the "SafariForWebKitDevelopment" version.

Anyone have an idea?

m-thomson commented 7 years ago

Actually I can enable extensions using "SafariForWebKitDevelopment" just fine. But after re-starting, the extensions are gone.

drewauff commented 7 years ago

@m-thomson I have already posted this over @ bugzilla.. hopefully it will be fixed soon

this was the response

rdar://problem/31335578

this was my first bug report there, so not sure what to do with that but I will assume they are working on it.

Fofer commented 7 years ago

Well, given the choice between "extensions staying installed," and "SafariStand," I'm afraid I'd have to choose the former. I just can't use SafariForWebKitDevelopment if it means having to reload my extensive list of extensions on every restart. Thanks for the suggestion, though!

So my next question is: is there any way to get SafariStand working again, with Safari 10.1, if we're willing to leave SIP off in order to do so (even just temporarily?) Or is this new incompatibility something deeper than that?

DearDeparted00 commented 7 years ago

I've been giving it some thought in my off time, the reason I was even messing with webkit this week actually. Safari Stand has a lot of features but I think (at least for me personally), the main draw has been having the ability to extend the search bar to each end of the window rather than having it sit on either one side or scrunched in the middle. Maybe the favicons too though I'm not exactly hating this minimal thing apple is doing with pinned tabs (if the site supports it).

I don't know a lot about the workings of the Webkit Project or those of Safari Stand but every so often I try to look through and understand how those specific changes take place without altering the browsing experience. Another Simbl tool that I find fun is the iMessage indicator that tells when and which contact is typing you a message and have noticed that it seems to have been unaffected since installation to changes apple has introduced since. Wanted to see if removing or changing some stand features and trimming it down could allow it to float through the apple gates more easily, but I haven't had much play time with either and only actually thought of this the week Stand stopped working. This being said I never really to explore the A-B process it takes through installation and activation. With this little side step we have going I'm going to give it another go a little more thoroughly, but if anyone is more fluent in either project than I, i'd love some insight. I get a few things with Stand but in trying to build from the source, there are libraries that don't seem to be shipped by default, as well as having never been able to successfully "see" or access "Webkit 2." Even with a successful 45-minute to 2-hour wait time building webkit, using the package-root script always gave a ditto error when it reached webkit 2. So I never successfully had the chance in turn to successfully build Safari Stand from source and get a feel of how it worked.

To my understanding the current Stand is forked from a fairly old project and wondered if maybe it just suffers from an aspect in the original that's either dated in terms of how the current versions of Safari and MacOS work or maybe attempts to load a feature that Safari now does natively or is no longer necessary. Something that caught my eye is in customizing the tool bar whilst using stand the iCloud icon is no loner present to view tabs on other devices, but this could be indifferent of Stand as I'm personally unable to access my keychain entirely while using webkit for development. But in the end this all this is a guess in the dark. If anyone understands either of these projects more intricately and would like to share I would love the insight.

w0lfschild commented 7 years ago

@Fofer https://github.com/anakinsk/SafariStand/issues/38#issuecomment-289665394

@DearLostPoetry Yes a plugin with less features will likely last longer without being broken. The more hooks / functionality a tweak has, the more likely it is to break with each update of the application it's hooking into. There's a lot going on in Safari Stand and the Safari application frequently has UI and functionality updated that can break Safari Stand.

BigMacOS commented 7 years ago

I was really hopeful for safaristand being resurrected but there's been one release ...I fear it's gone the same was as glims and hetima's safaristand. There's huge moneymaking potential in selling this.

It could do with someone forking this and taking over.

dzpt commented 7 years ago

Finally, how do i get stand works on 10.12.4?

BigMacOS commented 7 years ago

@anakinsk appreciate your work on this. Just wondered if this fork of Safaristand is dead or development continues? Buch of people here willing to help and it seems like there is radio silence on here...

Fofer commented 7 years ago

Okay, I plan to turn off SIP, and use unsign (to remove code signing from Safari 10.1) in order to allow mySIMBL injections (i.e. SafariStand.)

But I'm a newbie to this, can someone please share more specific instructions than what's included here? https://github.com/steakknife/unsign

Don't laugh, but I'm stuck on step 1. I'm guessing this is a Terminal command, but I don't know the rest of the syntax. And when I try it on the Makefile, the response I get is "Nothing to be done for Makefile"

Installing 1) make .

Any kind assistance appreciated :)

media-lush commented 7 years ago

I'm not a coder but I loves me my tab favicons... anyway here's an idea for those that are good at this thing:

WHY NOT START A CROWDFUNDING PROJECT for it... from what [little] I understand about crowdfunding if the project is not delivered than you get your money back.

If someone was to make an app similar along the lines to Glims (much simpler to use than SIMBL with lots more options) and if you were to pledge $5 and get it for that price once it was developed surely it would be a win-win. The goal price could be whatever the developer/coder though was worth his/her while to code this thing. Obviously they'd have to commit to updates to match anything Apple put out.

I'm an admin of a Mac Facebook group with a few thousand members and have the same in twitter followers ... I'm sure word would get out and someone could make a decent amount of bucks for this.

dzpt commented 7 years ago

@Fofer cd to unsign-master folder and run make (not make .) to compile C file then you'll have unsign executable file. I've done this step but have to idea how to make it works then

b0gdanw commented 7 years ago

Don't bother with unsigning Safari see https://github.com/inket/cosyTabs/issues/15#issuecomment-290270985 "Unsigning Safari 10.1 seems to be a no-go because unsigning causes these issues: Safari forgets all installed extensions every time you close it Safari will also forget other settings Touch ID doesn't work and probably more that I haven't noticed."

dzpt commented 7 years ago

@media-lush i share this annoying with you. I love using Safari with Favicon, i have no idea why the hell till now Apple don't put it. Chrome has this feature but it consumes ram and energy so much on macOS

Fofer commented 7 years ago

@media-lush Unfortunately that's not how crowdfunding works. Typically speaking, no, money is not returned if the project isn't delivered. There are other web projects out there, where folks collect a "bounty" for hacking things, and that may be more appropriate here.

Because the point is that it's not SafariStand that's broken; it's Safari 10.1 to which Apple has introduced "Library-Validation." Which means it's protected against any 3rd party code injection. Other SIMBL injections for Safari (like cosyTabs) aren't working either: https://github.com/inket/cosyTabs/issues/15#issuecomment-290270985

And so any forward movement here would require that we figure out how to disable Library-Validation, without crippling Safari in other ways. If/once we do THAT, then SafariStand will start working again, without any code modification required. At least until Apple updates Library-Validation in response. This is a cat-and-mouse game at this point and I'm not sure it's one we're likely to win.

media-lush commented 7 years ago

I know this might be a dumb question but has anybody considered going the actual Safari 10 for developers route? https://developer.apple.com/safari/

On a personal level I'd love to speak to someone at Apple who could explain to me why they thought getting rid of favicons and replacing all tabs as generic grey slabs of meh was a "good idea"... it's almost if Jonny Ive is taking the piss here... Apple themselves say:

"Safari Extensions are a new way for developers to enhance and customize the browsing experience. If you know how to develop web pages, then you already know how to make extensions for Safari."

... either way it makes me more and more annoyed with Apple everyday

Fofer commented 7 years ago

Safari Extensions in 2017 allow users to customize the display and utility of web pages themselves, not of the Safari application. And I don't think Apple's thought process came down to "getting rid of favicons" (as they do display when tabs are pinned) as much as it came down to tightening security of the browser. By eliminating the possibility for code injection from 3rd parties, they minimize the risk of malware.

m-thomson commented 7 years ago

Everyone here should ping Apple with feedback about this (if you haven't already). Please write them, it will take 30 seconds: http://www.apple.com/feedback/safari.html

Simply ask them to enable tab favicons (or modify their extension platform to allow third parties to do it).

anakinsk commented 7 years ago

Is there anyone here who did try to run the unsign command tool and got the original safari working with safari stand?

I am extremely busy at the moment so didn't even have time to update my sierra so still running the version that does not have singing validation. Sorry everyone.

I think if the whole deal is in running this unsign thing with the right parameters I could try to make an installer of some kind that does that for safari to make our lives a bit easier.

drewauff commented 7 years ago

@media-lush Going through developers route means using WebKit Nightlys..fwiw SafariStand works fine with WebKit, just keeps "disappearing" all extensions. So if someone can fix this then our problems will be solved assuming your are comfortable with WebKit Nightlys..

rotorek commented 7 years ago

@anakinsk Hi, I just tried to go the "unsign" method and got the same result as with starting Safari using "SafariForWebkitDevelopment". That means, SafariStand works ok, however all extensions are purged after restarting Safari.

So, the easiest way to use SafariStand right now is to just run Safari like this:

nohup /Applications/Safari.app/Contents/MacOS/SafariForWebKitDevelopment & (Note: You don't even need to install any WebKit, it works out of the box.)

And then just reinstall desired extensions.

drewauff commented 7 years ago

@anakinsk did exactly what you said and VOILA! no extensions..that is to say my extensions are still installed just not showing up on the extensions tab and therefore unusable...

Fofer commented 7 years ago

So, the easiest way to use SafariStand right now is to just run Safari like this: nohup /Applications/Safari.app/Contents/MacOS/SafariForWebKitDevelopment & (Note: You don't even need to install any WebKit, it works out of the box.) And then just reinstall desired extensions.

@rotorek, do you mean to say that this "easiest way" requires us to reinstall the desired extensions every single time we restart SafariForWebKitDevelopment? This sounds terrible to me -- but then again, I rely on a large collection of extensions. Does it at least save the preferences we've set for each of our extensions, or must they be reconfigured each time as well?

Given the choice, I'll have to just give up SafariStand, and that's a real bummer. But before doing so I want to fully understand the caveats of the alternative. Thanks!