gcollazo / BrowserRefresh-Sublime

This plugin will switch from ST2 and ST3 to Google Chrome, Google Chrome Canary, Safari, Firefox or Opera and reload the active tab
http://gcollazo.github.com/BrowserRefresh-Sublime
565 stars 62 forks source link

Browser does not refresh after update to OS X Mavericks #41

Closed ted451 closed 10 years ago

ted451 commented 10 years ago

Hello!

Using the shortcut saves the file but does not activate nor refresh the browser. OS X Mavericks, Sublime Text 2.0.2 (tried on 3 also, same result) Google Chrome 30.0.1599.101

Thanks for your great work!

potsky commented 10 years ago

:+1:

GurudayalKhalsa commented 10 years ago

Same problem with me

oliverpitsch commented 10 years ago

Sadly I'm in with this issue …

potsky commented 10 years ago

For Safari on Mac OS X only, I have finally :

    {
        "keys": ["super+shift+r"],
        "command": "shell_command",
        "args": {
            "command": "/usr/bin/osascript -e 'tell application \"Safari\"' -e 'activate' -e 'do JavaScript \"window.location.href=window.location.href\" in document 1' -e 'end tell'",
            "title": "Refresh Safari",
            "panel": true
        }
    }

It works like a charm !

gcollazo commented 10 years ago

Just pushed a new release that correctly detect Safari and Webkit under Mavericks. It should be up in a few minutes.

In terms of issues with Chrome on Mavericks I can't reproduce the problem. Can you provide more info on your setup @ted451?

ted451 commented 10 years ago

OK, I did this:

Please let me know what details could be helpful -- I'm ready to provide the info. Quick overview of versions currently in my system:

My config file for Browser Refresh:

    [
        {
            "keys": ["command+control+s"], "command": "browser_refresh", "args": {
            "auto_save": true,
            "delay": 0.0,
            "activate_browser": true,
            "browser_name" : "Google Chrome"
        }
    }
]

Also I have tried with standard shortcut, same result.

Thanks for your help!

gcollazo commented 10 years ago

@ted451 I really don't understand why it's not working. I have almost the same setup as you do and it works fine with all browsers. I tried your key combination and it also works.

What the plugin does is that it checks for running browsers before doing the reload. It appears that somehow it is not finding your chrome browser. Can you do the following: Open your chrome browser, open your terminal and run this:

ps aux | grep Google\ Chrome\.app\/Contents\/MacOS\/Google\ Chrome

That should find your chrome browser process, if it doesn't that might be the problem.

oliverpitsch commented 10 years ago

The command finds chrome without problems. The plugin however doesn't. :(

gcollazo commented 10 years ago

@reputamiOT can you jump in IRC to see if we can fix this now? #elweb on freenode

http://webchat.freenode.net?channels=%23elweb&uio=d4

oliverpitsch commented 10 years ago

Sorry, I'm on the move right now. Can we skype tomorrow? (Handle: oliver.twardowski)

ted451 commented 10 years ago

@gcollazo On my setup the command finds Chrome too, so the problem is something else I guess...

ted               179   0.0  3.8  1312688 118888   ??  S    Fri06PM  13:15.89 /Applications/Google Chrome.app/Contents/MacOS/Google Chrome -psn_0_28679
ted             11782   0.0  0.0  2442584    352 s000  U+   11:20AM   0:00.00 grep Google Chrome.app/Contents/MacOS/Google Chrome
gcollazo commented 10 years ago
Do you have the osascript command available?
# This command should bring Chrome to the foreground.
osascript -e 'tell application "Google Chrome" to activate'
Can you check if this works?
# This command should bring Chrome to the foreground and reload the active tab.
curl https://gist.github.com/gcollazo/d8d17f6e46505f9f2f93/raw/ | osascript $1
ted451 commented 10 years ago

@gcollazo Seems that we finally start to see what's going on: after the first command I had a message from Parallels Desktop (which does not work in Mavericks anyway or at least I did not update it) that it is installed incorrectly and cannot activate Chrome. So this is likely an issue with Parallels Desktop 'application sharing' feature.

ted451 commented 10 years ago

@gcollazo So, I just uninstalled the Parallels Desktop and it works! Thanks for your help, it is greatly appreciated!

I guess for those who do use Parallels Desktop and are having this kind of troubles it would be best to either disable 'Application sharing' in parallels or just figure out how to selectively remove Chrome from the applications shared by Parallels.

gcollazo commented 10 years ago

@potsky @GurudayalKhalsa @reputamiOT Are you running Parallels Desktop? Can you try disabling "Application Sharing"?

oliverpitsch commented 10 years ago

I am running PD. But where can I find that option … ?

GurudayalKhalsa commented 10 years ago

I do not have Parallels installed, but found that on the new release that if I changed the command from "command+shift+r" to pretty much anything else, it worked. I have "command+shift+e" for now

gcollazo commented 10 years ago

@GurudayalKhalsa have you tried using super+shift+r ?

GurudayalKhalsa commented 10 years ago

Yes, it doesn't work for me

ted451 commented 10 years ago

@reputamiOT I'm afraid you'll have to google this yourself according to your version of PD. Last time I used PD it had this feature called 'Application Sharing' that created shortcuts to Windows apps in mac Applications folder or something like that. You could turn it off in virtual machine settings. But that was version 5 I guess, I did not use it since and on my current machine I had some PD install from previous owner so I just wiped it.