Jump to content
cwagdev

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

Share this post


Link to post

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"

Share this post


Link to post

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

Share this post


Link to post

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.

Share this post


Link to post

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  :(

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...