Closed halo closed 3 years ago
Is there any log file that could hint me as to what is going wrong?
Yes, please try:
Then switch to Console:
Thanks!
Another thing to try is to run the AppleScript code without the extension.
set URL_PREFIXES to {"https://localhost"}
tell application "Google Chrome"
set _wIndex to 0
set _tIndex to 0
set _target to active tab of front window
if ((count of URL_PREFIXES) > 0) then
repeat with _window in windows
set _wIndex to _wIndex + 1
repeat with _tab in tabs of _window
set _tIndex to _tIndex + 1
if (my startswith(URL of _tab, URL_PREFIXES)) then
set _target to _tab
set active tab index of window _wIndex to _tIndex
exit repeat
end if
end repeat
end repeat
end if
reload _target
end tell
on startswith(_str, _list)
repeat with i in _list
if _str starts with i then return true
end repeat
false
end startswith
Ok, thanks a lot for leading the way :)
It's the Apple Script failing when trying to access front window
of Google Chrome
I tried to debug it but. Apple Script says Chrome is running and that it is active, but it simply has no windows.
I also tried to wait for it but the window
would never exist:
So I thought that the Google Chrome process must have run an automatic update of itself and maybe the OS can't access it any more. I quit Chrome - and I could not restart Chrome. I had to manually kill every helper and renderer process that was related to Chrome. Then I started Chrome again, and the script works again:
So – at least I know now that I don't need to restart my computer but that I have a work-around 😆
It would be great, of course, if your extension could display the error message in a more prominent way, and maybe even explain what could have happened.
I almost just deleted the extension because I felt it was buggy. I'm glad I reached out to you, but it would be a shame if other people just delete it and think of it no more.
Again, thank you for your time and effort. I appreciate it.
Nice investigation! So, it's a Chrome's quirk.
It would be great, of course, if your extension could display the error message in a more prominent way, and maybe even explain what could have happened.
Done & published in version 1.1.3.
Thanks!
Sweet! Thank you!
I even got the pleasure to try it right away, because Chrome let me down again 😄 and it works:
After a couple hours of regular work, this extension stops to refresh the browser. Instead it shows this message:
I have no idea what causes it. I already tried deactivating pretty much every other extension but the error keeps recurring after some time.
One time I thought that the problem starts happening when I save a file (CMD + s) and then quickly try to refresh the browser. But I cannot reproduce the error.
Is there any log file that could hint me as to what is going wrong?
Thank you for your time and for making this extension, it's very useful.