Jump to content

osascript Issues in 10.11 El Capitan


Recommended Posts

Hello Scripting Gurus!

 

I had been using this excellent GitHub workflow just fine in 10.10 and since updating 10.11 it stopped opening Safari. I ran in debug mode to see if I could gather any information and am seeing this result...

Processing output 'alfred.workflow.action.script' with arg 'https://github.com/cwagdev/random'
[ERROR: alfred.workflow.action.script] osascript: can't open default scripting component.
[INFO: alfred.workflow.action.script] Processing output 'alfred.workflow.output.notification' with arg ''

I opened an issue on the GitHub project as well, https://github.com/gharlan/alfred-github-workflow/issues/50

 

Any thoughts? Google search results seem to suggest this is a pretty arcane/uncommon issue.

 

Also, running the resulting command from the workflow in Terminal yields a similar result.

$ osascript -e "open location \"'google.com'\""
$ osascript: can't open default scripting component.

Seems more of an OS issue than Alfred, but hoping that the scripting Gurus in here could assist. 

Edited by cwagdev
Link to comment

There are a few things wrong with that. I'm assuming the doubled osascript -e is a typo.

 

More correctly, it should read osascript -e 'open location "https://google.com"'

 

(No need to put two sets of quotes around "google.com"; You need the https:// to make it a valid URL; It's better to wrap commands in single quotes.)

 

But it's entirely unnecessary to use AppleScript. Just run open "https://google.com"

Link to comment

Sorry for misleading, I am not trying to use oascript myself, I found that the workflow I use is using it. Seen here: https://github.com/gharlan/alfred-github-workflow/blob/master/action.php#L74

 

The issue appears to be that oascript itself is messed up on my system, I was hoping someone here had seen this before. 

 

Running the syntax you provided yields the same result.

$ osascript -e 'open location "https://google.com"'
osascript: can't open default scripting component.

Thanks for the reply. 

Edited by cwagdev
Link to comment

Right. It does sound like a messed up install.

 

Assuming you've already tried rebooting, you might have to reinstall the system from the Recovery Partition. This should fix a broken OS installation.

 

If you don't want to do that right now, you could edit the workflow to use "open", as described above, instead of osascript.

Link to comment

Right. It does sound like a messed up install.

 

Assuming you've already tried rebooting, you might have to reinstall the system from the Recovery Partition. This should fix a broken OS installation.

 

If you don't want to do that right now, you could edit the workflow to use "open", as described above, instead of osascript.

 

 

Yeah I am thinking I'll have to go the reinstall route. I also noticed that the Dropbox app doesn't work either when I click recent files or "Open Dropbox.com", something has gone awry with the update it seems  :(

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...