-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getting 404 shortly after starting with aw-qt #350
Comments
Does the log say anything about which asset path is used/found?
…On Mon, Mar 13, 2023, 20:45 Joshua Ferguson ***@***.***> wrote:
Not sure if I should post here or in the main activitywatch repo.
I'm running into an issue where if I run aw-qt, and then migrate to
127.0.0.1 I immediately get a 404 message from rocket.
steps to reproduce
1. clone activity watch, pull submodules, cd into the top-level repo
2. create and activate the .venv
3. run make build
4. cd to .venv/bin run ./aw-qt
5. navigate to 127.0.0.1:5600 or local:5600
the output from the process is complaining about a None response:
[2023-03-13 14:35:36][WARN][_]: Response was `None`.
[2023-03-13 14:35:36][WARN][_]: No 404 catcher registered. Using Rocket default.
[2023-03-13 14:35:37][WARN][_]: Response was `None`.
[2023-03-13 14:35:37][WARN][_]: No 404 catcher registered. Using Rocket default.
2023-03-13 14:37:59 [INFO ]: Became AFK (aw_watcher_afk.afk:97)
it's also worth noting that when I run with cargo run --bin aw-server the
webui works as expected.
—
Reply to this email directly, view it on GitHub
<#350>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKXDOVHVRGYP7FGMG66D5LW352OLANCNFSM6AAAAAAVZQVXME>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
yeah, I just saw where it did, my apologies.
|
I think I realize the problem and might have an idea for a fix, at least for linux. It needs to be able to find the assets for the webui, which isn't a problem when testing with cargo run, but it is when running the binary from anywhere else. I'd recommend using the looking to confirm, it seems you already have created a folder for the client and the server in there, so I'd recommend copying the necessary directories for the webui to that location as part of your build process. |
okay, so this turned out to be user error. I wasn't running after reading through the code I realized you are already checking for |
Good to hear you figured it out! If you make a PR with changes that'd get us in line with the spec I'd gladly take a look at them. I do think we should handle this better than a generic 404 though. If webui assets can't be found, we should probably return a message stating that specifically. Not the first time I've seen someone ask for help after strange 404s caused by missing assets. |
I've been looking around for relevant crates for cross-platform directory handling. The most useful I've found so far have been dirs and directories. The only thing that this won't cover is the system level directories I could implement that in a PR(later tonight or tomorrow), but I want to confirm that would be a change you would be interested in first |
Not sure if I should post here or in the main activitywatch repo.
I'm running into an issue where if I run aw-qt, and then migrate to 127.0.0.1 I immediately get a 404 message from rocket.
steps to reproduce
make build
.venv/bin
run./aw-qt
127.0.0.1:5600
orlocal:5600
the output from the process is complaining about a None response:
it's also worth noting that when I run with
cargo run --bin aw-server
the webui works as expected.The text was updated successfully, but these errors were encountered: