activitywatch: Cannot detect Genshin Impact

  • I am on the latest ActivityWatch version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • OS name and version: Windows 10 21H2 19044.2846
  • ActivityWatch version: v0.12.2 (rust)

Describe the bug

Today I played Genshin Impact for around 2 hours and found that it’s not detect by ActivityWatch.

The thing is, it can be detected before 2023/03/31 and after that I didn’t see it anymore in ActivityWatch.

image

As you can see, ActivityWatch knows that I’m not AFK, but it didn’t know what I was doing then.

To Reproduce

Maybe just play it for two minutes and see whether if ActivityWatch detects it.

I’m using CN version’s launcher though, so it may not reproduce on global version’s launcher.

Update: A friend of mine told me it’s related to the new version v0.12.2, he is using v0.12.1 and it works fine. Also I updated to the new version at 2023/04/01, which matches the evidence. I don’t know which part of logs may help.

The main process name for the CN version is YuanShen.exe.

Expected behavior

It detects it, just as if should.

image

The image comes from 2023/03/31. The word “原神” is the Chinese name for Genshin Impact.

Documentation

Additional context

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 20 (8 by maintainers)

Most upvoted comments

Had the same issue with a non-Steam game: since updating, the playtime was not being tracked. Removing the Administrator rights to the game or elevating ActivityWatch rights to Administrator, both approaches solved the issue.

Running it as administrator is not something I’m comfortable recommending as a fix, but glad if it’s working for you!

This was a regression when we updated the method of getting window titles to a faster one. We might re-add the old method of getting window titles (slower) as a fallback if the primary one fails.

Apparently new version is not able to detect any windows with elevated rights, like Genshin.

Is that intended? I‘m still using the old version, will it be fixed?

By reading the change log, the new version switched from WMI to Win32 API (https://github.com/ActivityWatch/aw-watcher-window/pull/83) to obtain window in focus, I guess it fixed the issue of high CPU usage of WMI Provider Host. That should be the cause of the behavior change.

It is expected for a program without elevated rights being unable to access programs with elevated rights. But this might not be an expected behavior of ActivityWatch.

We have a WIP fix here: https://github.com/ActivityWatch/aw-watcher-window/pull/96

Anyone with a little dev experience and access to a Windows machine is encouraged to test it 😃

@BelKed I understand, just wanted to check 😃

Had the same issue with a non-Steam game: since updating, the playtime was not being tracked. Removing the Administrator rights to the game or elevating ActivityWatch rights to Administrator, both approaches solved the issue.

May I ask what should I do to elevating ActivityWatch rights to Administrator?

Sure!

Locate the ActivityWatch EXE file. For me, it was at this location: C:\Usersyour username\AppData\Local\Programs\ActivityWatch\aw-qt.exe

Right-click on the ActivityWatch EXE file > select ‘Properties.’ > In the ‘Properties’ window, go to the ‘Compatibility’ tab. > Tick the box that says ‘Run this program as an administrator’ > Apply and OK to save changes.

Hope that helps!

Apparently new version is not able to detect any windows with elevated rights, like Genshin.