activitywatch icon indicating copy to clipboard operation
activitywatch copied to clipboard

aw-watcher-window reports wrong window with multiple app instances

Open tbuckler opened this issue 3 years ago • 3 comments

  • [x] I am on the latest ActivityWatch version.
  • [x] I have searched the issues of this repo and believe that this is not a duplicate.
  • OSX 10.15.7 & 11.1 :
  • 0.10.0:

I have not tried this in Windows yet.

Describe the bug

When running multiple instance of the same app, AW timeline reports the frontmost window for the first app instance even when the second instance is the active application.

To Reproduce

In my case I'm using a database development platform "4D" from 4d.com, but I have tried this with MS Word as well:

  1. Find the app in applications, duplicate it. (Word.app for example)
  2. Open one instance, create a document "Letter A" and save it, now the window has the title of "Letter A"
  3. Open the second instance Word Copy.app, create a document "Letter B", now the window has the title "Letter B"
  4. Open AW Timeline and note that there's no reference to "Letter B" and the the time spent on "Letter A" also includes the time you actually spent on the second letter in the second instance of Word.

activitywatchLogs202103200846.zip

Expected behavior

Should be able to see the different window titles and compute the times spent in each.

Documentation

Logs attached, using two instances of 4D. Fresh install of 4D with fresh install of AW on separate machine from which this issue was noticed.

Additional context

Word might not be a practical example since you can have multiple docs open simultaneously, but is common enough to test with. Other apps do not allow multiple projects to be open at the same time. & replicating the app solves that problem.

tbuckler avatar Mar 20 '21 15:03 tbuckler

Hi there! As you're new to this repo, please make sure you've used an appropriate issue template and searched for duplicates (it helps us focus on actual development!). We'd also like to suggest that you read our contribution guidelines and our code of conduct. Thanks a bunch for opening your first issue! 🙏

github-actions[bot] avatar Mar 20 '21 15:03 github-actions[bot]

Hello, thanks for filing this issue. We were not aware that this issue existed before.

However, we are in the process of rewriting how the macOS support works as we have seen a few other problematic issues with it, hopefully that should solve the issue once that's done.

https://github.com/ActivityWatch/aw-watcher-window/pull/49

johan-bjareholt avatar Mar 22 '21 20:03 johan-bjareholt

Hi There,

Sorry for coming back to this issue so far after bringing it up in March, but I'm on a new machine and new OS (MacOS Monterey) and this problem persists. AW v0.11.0. I can say the problem existed two os versions prior: Catalina. Not sure I used AW before that...

When I have two instances of the same app open, aw-watcher reports App:Unknown and Title:Unknown for the second instance. I recall, and based on the title of this thread, that earlier I was getting the wrong title, now it's just "unknown" — see attached.

As soon as I quit the first instance, AW starts picking up the app and title properly for the second instance. Now that "becomes the first" and only instance, so if I again open another instance, it's that most recently opened instance that AW can't identify.

If I can help in any way, please advise, Thx Tom

/encl.

Tom Buckler | Buckler Microelectronics Inc. 17008 - 90 Avenue NW | Suite 272 | Edmonton | AB | Canada | T5T 1L6 Cell: (780) 499-5525

On Mar 22, 2021, at 2:38 PM, Johan Bjäreholt @.***> wrote:

Hello, thanks for filing this issue. We were not aware that this issue existed before.

However, we are in the process of rewriting how the macOS support works as we have seen a few other problematic issues with it, hopefully that should solve the issue once that's done.

ActivityWatch/aw-watcher-window#49 https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ActivityWatch_aw-2Dwatcher-2Dwindow_pull_49&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=lLgBEVfQpz9q_odixvTTnX-yWSSdG90LLsaOQzSuTPc&m=sYRt1Kl9_m43McRGl_V5HXmbgPhN5bCSWZjHo_WKbu0&s=l50pmSgdAWLyOFNg409AXU6z8bEFDiHXIzm6OkO8ykw&e= — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ActivityWatch_activitywatch_issues_579-23issuecomment-2D804377831&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=lLgBEVfQpz9q_odixvTTnX-yWSSdG90LLsaOQzSuTPc&m=sYRt1Kl9_m43McRGl_V5HXmbgPhN5bCSWZjHo_WKbu0&s=xs91-snHMHKxi_fXChCZwV7xFPY_OkqLTcK9dxm8ULE&e=, or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ABCOHQQBGHKIYYWDNUH3CT3TE6TE5ANCNFSM4ZQQOWJQ&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=lLgBEVfQpz9q_odixvTTnX-yWSSdG90LLsaOQzSuTPc&m=sYRt1Kl9_m43McRGl_V5HXmbgPhN5bCSWZjHo_WKbu0&s=q2EyImpU61qeLO7B-_XpowfA2T-SBaCMyQ77ujOEFWk&e=.

tbuckler avatar Dec 27 '21 15:12 tbuckler

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 07 '23 21:01 stale[bot]