prasmussen / chrome-cli

Control Google Chrome from the command line
MIT License
2.61k stars 89 forks source link

Can't activate #86

Open agzam opened 1 year ago

agzam commented 1 year ago

activate doesn't seem to be working for me. I'm trying to use it with Brave 1.57.64 Chromium: 116.0.5845.188 on Mac Ventura 13.5.2. How can I troubleshoot this, any ideas?

sboeser commented 1 year ago

Same issue here with Chrome Version 118.0.5993.70 - activate does not seem to have any effect.

ph9t commented 12 months ago

Likewise with Chrome v. 118.0.5993.117.

tadhg-ohiggins commented 11 months ago

I'm also having this problem, and it's possible that it's due to the tab identifiers not being stable—if I run chrome-cli list tabs repeatedly, the identifiers change each time, so it's possible that they're no longer relevant by the time I pass any of them to activate -t.

prasmussen commented 11 months ago

Activate works for me. Are you using the latest chrome-cli (1.9.3)? That one fixes the problem with the id's changing.

ph9t commented 11 months ago

Mine's on the latest. Still doesn't seem to work. Tab IDs are also stable.

lingium commented 2 months ago

I'm using 1.9.3, activate still cannot work. Tab IDs are stable.

aidan-gibson commented 1 month ago

Also on 1.9.3 and activate doesn't work, noticed tab id is rotating between two different numbers.

j3h commented 2 weeks ago

This is happening consistently for me. I just updated via homebrew, and it didn't change anything. For what it's worth, this was happening before I updated to macOS Sonoma and also before I updated chrome-cli, so it's not specific to the versions of the software that I'm using. I wish I had thought to capture the behavior before I updated stuff so that it was clearer the range of versions that were misbehaving.

I hadn't looked at this project in a while, and I want to give a shout-out to the JSON output mode, it's great to work with! Thanks for that.

Below is an example of the issue with versions of all of the software that seem like they could be relevant. Let me know if there is any other info that might be useful for debugging.

macOS Version 14.7 (23H124)

; /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version
Google Chrome 129.0.6668.91
; chrome-cli version
1.9.3
; OUTPUT_FORMAT=json chrome-cli info
{
  "id" : "1076280841",
  "loading" : false,
  "title" : "ChatGPT",
  "url" : "https://chatgpt.com/?model=gpt-4o",
  "windowId" : "1076280837"
}
; OUTPUT_FORMAT=json chrome-cli list tabs | jq '.tabs|map(select(.title|contains("Issue #86")))'
[
  {
    "id": "1076281114",
    "title": "Can't activate · Issue #86 · prasmussen/chrome-cli",
    "url": "https://github.com/prasmussen/chrome-cli/issues/86",
    "windowId": "1076280837",
    "windowName": "ChatGPT"
  }
]
; chrome-cli activate -t 1076281114
; OUTPUT_FORMAT=json chrome-cli info
{
  "id" : "1076280841",
  "loading" : false,
  "title" : "ChatGPT",
  "url" : "https://chatgpt.com/?model=gpt-4o",
  "windowId" : "1076280837"
}

Note that the active tab is not the one that that the chrome-cli activate command attempted to activate.