extensions icon indicating copy to clipboard operation
extensions copied to clipboard

[Google Chrome] ...

Open DerDieDasRalf opened this issue 3 years ago • 9 comments

Extension

https://www.raycast.com/Codely/google-chrome

Description

Error:

Error: Command failed with exit code 1: osascript -e 
    tell application "Google Chrome"
      activate
      set _wnd to first window where id is NaN
      set index of _wnd to 1
      set active tab index of _wnd to 2
    end tell
    return true
  
96:99: execution error: The variable NaN is not defined. (-2753)

    tell application "Google Chrome"
      activate
      set _wnd to first window where id is NaN
      set index of _wnd to 1

Steps To Reproduce

I installed the Google Chrome extension with the Raycast store. Than I run the "Search Tabs" command. Running the command shows me a list of my open tabs. As soon as I select one and hit enter I end up with the picture below: image

System: macOS Ventura Version 13.3.1 (22E261) Chrome Version: Version 112.0.5615.137 (Official Build) (x86_64)

Current Behaviour

No response

Expected Behaviour

No response

DerDieDasRalf avatar Apr 19 '23 16:04 DerDieDasRalf

Thank you for opening this issue!

🔔 @rgomezcasas @bromanko @crisboarna @andreaselia @rtyke @karolre @Aiee you might want to have a look.

💡 Tip: Once the issue is resolved, comment @raycastbot close this issue to close it.

raycastbot avatar Apr 19 '23 16:04 raycastbot

@rschmidtner is it a normal/newly opened tab that this is happening with, or a tab within a group?

andreaselia avatar Apr 19 '23 16:04 andreaselia

Because I cannot reproduce the issue, I have prepared the pull request which should provide more info allowing to help understand the root cause: https://github.com/raycast/extensions/pull/6068

karolre avatar Apr 20 '23 19:04 karolre

I was able to find a root cause thanks to more extensive error logging. The issue is related to the fact that in some cases MacOS generates windows identifiers which are represented in exponential form: 1,304973562E+9. Full exception below.

Error: Issue with tab: '[tab name]~~~[tab url]~~~~~~1,304973562E+9~~~4'
Command failed with exit code 1: osascript -e 
    tell application "Google Chrome"
      activate
      set _wnd to first window where id is NaN
      set index of _wnd to 1
      set active tab index of _wnd to 4
    end tell
    return true
  
96:99: execution error: The variable NaN is not defined. (-2753)

Command failed with exit code 1: osascript -e 
    tell application "Google Chrome"
      activate
      set _wnd to first window where id is NaN

Now I need to find a way to resolve it.

karolre avatar Apr 25 '23 07:04 karolre

Raised PR to fix the issue: https://github.com/raycast/extensions/pull/6172

karolre avatar Apr 25 '23 22:04 karolre

@andreaselia it is a normal tab, not one within a tab group

DerDieDasRalf avatar Apr 26 '23 17:04 DerDieDasRalf

Is PR #6172 live already? If so it did not solve the issue for me (still getting the same error after reinstallation of the extension)

DerDieDasRalf avatar Apr 26 '23 17:04 DerDieDasRalf

Is PR #6172 live already? If so it did not solve the issue for me (still getting the same error after reinstallation of the extension)

@rschmidtner the PR is still open pending review, the updates will go live automatically when the PR is merged in.

andreaselia avatar Apr 26 '23 19:04 andreaselia

Works like a charm, thanks folks!

DerDieDasRalf avatar Apr 27 '23 21:04 DerDieDasRalf