Open ErikBjare opened 2 years ago
@modderme123 Any idea how to fix this? :)
One reason might be because we're somehow building for a newer macos version that doesn't support async networking stuff. We probably need to explicitly set a flag to build for an older version and unfortunately probably also pull in a library to do network requests without modern swift networking (which comes in macos 10.14 I think, so this is probably not why it is failing here)
The other guess I have is also related to building this and that somehow if we don't build with xcode we're building a dev version that requires command line tools and xcode to be installed...
Probably running xcode-select --install
will fix it (but isn't an ideal fix)
Probably running xcode-select --install will fix it (but isn't an ideal fix)
This isn't the case for me as I have them installed already.
➜ ~ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
@Gleek Would you mind posting your version of xcode and swift?
@modderme123 Does this help?
➜ ~ xcrun swift -version
Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
Target: x86_64-apple-darwin20.6.0
➜ ~ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 13.2.0.0.1.1638488800
volume: /
location: /
install-time: 1639516865
groups: com.apple.FindSystemFiles.pkg-group
I don't have the full Xcode installation present. I only have the command line tools installed.
I have the same issue as @ErikBjare on macOS Version 11.7.2 with identical Swift and pkgutil versions as @Gleek. My error message (also the same besides the timestamps):
2023-01-29 13:50:31 [INFO ]: aw-watcher-window started (aw_watcher_window.main:62)
2023-01-29 13:50:32 [INFO ]: Using swift strategy, calling out to swift binary (aw_watcher_window.main:67)
2023-01-29 13:50:32 [INFO ]: Connection to aw-server established by aw-watcher-window (aw_client.client:429)
This also happened using macOS Version 11.7.3.
Switching the strategy_macos
in the aw-watcher-window.toml
config did not resolve the problem for me → same error.
Also, I was unable to build from source with macOS 11 (as expected, since macOS 12.0 seems to be required):
Installing the current project: aw-watcher-window (0.2.0)
# if macOS, build swift
if [ "Darwin" = "Darwin" ]; then \
make build-swift; \
fi
swiftc aw_watcher_window/macos.swift -o aw_watcher_window/aw-watcher-window-macos
aw_watcher_window/macos.swift:189:53: error: 'upload(for:from:delegate:)' is only available in macOS 12.0 or newer
let (_, response) = try await URLSession.shared.upload(for: urlRequest, from: payload)
I intent to stay on macOS 11 for the weeks to come. If I can help out by running any possibly fixed versions on my system, please let me know.
Looks like there's a solution described in this blog post: https://nonstrict.eu/blog/2023/using-async-await-in-a-commandline-tool-on-older-macos-versions
Unfortunately, I wasn't able to make the changes to the aw-watcher-window
package to confirm this :(
@BelKed You referred me to this issue from "Module aw-watcher-window quit unexpectedly." I am using macOS BigSur 11.2.3. If I understand correctly, then ActivityWatch is not compatible with this version of macOS. If I upgrade to the latest version of macOS, then will that solve the issue?
Yes, upgrading to macOS Monterey will solve the problem :) (I can confirm this because I'm running ActivityWatch on macOS Monterey without any issues)
@BelKed Okay, I will back up and upgrade macOS.
@BelKed Good news! I upgraded to macOS Ventura 13.4.1, and ActivityWatch is tracking time again. Thank you for your help.
The following was posted in: https://github.com/ActivityWatch/activitywatch/issues/787#issuecomment-1260766761
Unfortunately, v0.12.1 didn't work for me. There are no errors in the logs now:
But it seems that the afk-watcher-window is not running as seen from the ps output
Running it manually would give the following error:
Changing the method to jxa also doesn't work with the following logs
I'm on macOS Big Sur (v11.6.1)
Any help is appreciated! Thanks :)
Edit: I also get an error pop-up, that I hadn't noticed before, everytime activitywatch opens up. There's no error in the details. But it's consistently crashing
Originally posted by @Gleek in https://github.com/ActivityWatch/activitywatch/issues/787#issuecomment-1260766761