Chrome applescript execution error
See original GitHub issueWhen running npm run start
on an ejected Create React App app, several minutes pass with it just sitting on Starting the development server...
before finally displaying:
/path/to/scripts/utils/chrome.applescript:81:99: execution error: Google Chrome Canary got an
(not a typo, the message cuts off there).
Despite this warning message, the build does compile successfully, it just doesn’t open in-browser.
I realize I may have voided my warranty by ejecting, and this isn’t a high priority issue anyway. For anyone else encountering it, you can circumvent the lengthy timeout process by erasing the code in chrome.applescript
; you’ll lose the auto-open functionality, but that’s not a big deal.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
AppleScript referencing tabs suddently breaking on Chrome
I've been successfully using a script for a long time, which uses Chrome to calculate execute some javascript and return the result. tell ......
Read more >Executing JavaScript through AppleScript is turned off in ...
This morning all the scripts that use Chrome are getting the following error: WebBrowserActionAllowJavaScriptFromAppl.
Read more >Applescript "Google Chrome got an error: Can't make |tabs
The error I'm getting is: "Google Chrome got an error: Can't make |tabs| of window id 1 into type specifier." The "offending object"...
Read more >Javascript executed from Applescript doesn't have access to ...
Issue 543437: Javascript executed from Applescript doesn't have access to the page variables. This issue has been migrated to Launch, see link in...
Read more >doesn't understand the “open location” message. (-1708 ...
This is an Apple event error: "The script doesn't understand the message. The event was not handled." AppleScript documentation:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Closing for the lack of information.
If somebody experiences this please try to figure out a way to reproduce (e.g. take note of which windows are open, whether you are using stable or canary, etc).
Sorry for the delay!
Alright, so: it was still reproducible after creating a new project with master. I decided to muck about in the applescript, and the issue is no longer occurring, but I have no idea why o_O.
Details:
I updated
create-react-app
from GitHub’s maser branch, created a new project, and rannpm run start
. After 3-4 minutes of “Starting the development server…”, a new browser tab opens and everything works. This is the case regardless of whether or not I’ve ejected.When I cleared the contents of
chrome.applescript
, start-up time was much much faster; a few seconds instead of a few minutes.Next, in the applescript, I tried to remove the loop that looks for pre-existing tabs. This had no effect.
Then, I simplified the logic at the bottom, from:
to:
I thought maybe there was some weirdness with setting active windows/tabs, and I was somewhat right; this switch fixed the issue.
However, the issue isn’t reproducible anymore. I undid all my changes, and it works perfectly, even in other projects.
If I had to guess, I’d assume that Chrome had some weird internal issue and wasn’t able to comply with that request. I didn’t think to try restarting chrome, but I suspect that may have fixed it as well.