Lissy93 / AdGuardian-Term

🛡️ Terminal-based, real-time traffic monitoring and statistics for your AdGuard Home instance
https://adguardian.as93.net
MIT License
901 stars 37 forks source link

Docker container error - missing field last_updated #5

Closed brandonleegit closed 1 year ago

brandonleegit commented 1 year ago

Connection is successful:

Verifying connection to your AdGuard instance... AdGuard connection successful!

Then, container fails to run:

Failed to run: error decoding response body: missing field last_updated at line 1 column 348 thread 'main' panicked at 'called Result::unwrap() on an Err value: Custom { kind: Other, error: "Failed to run" }', src/main.rs:93:12 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

brandonleegit commented 1 year ago

Lissy,

Thank you for updating the container....it looks like I am now getting past the initial error. However, now seeing this similar error: 2023-05-30_8-22-49

error decoding response body: missing field protection_disabled_duration at line 1 column 174 Error: Failed to run: error decoding response body: missing field protection_disabled_duration at line 1 column 174

brandonleegit commented 1 year ago

Also, this is a vanilla Ubuntu 22.04 Server Docker container host with latest Docker installed.

Lissy93 commented 1 year ago

Hmm, this implies that the stuff coming back from Adguard isn't matching the API spec used here. Could you confirm what version of AdGuard Home your running/ is it the latest (like v0.107.29)? If you visit the endpoint directly https://[your-adguard-instance]/control/status - do you see something that sort-of matches this spec?

brandonleegit commented 1 year ago

Ah yes, just checked and was running v0.107.26. One thing to note, it looks like .26 is the version pulled when using the "latest" tag. I just explicitly pulled the v0.107.29 tag that you mentioned above and it now works! Thanks Lissy.

brandonleegit commented 1 year ago

Lissy, nevermind the statement above, I may have had an old latest tagged adguard in the local repo...I will clear it out and see what I pull.

brandonleegit commented 1 year ago

Confirmed all good pulling the most recent latest....not enough coffee yet this morning :)

Lissy93 commented 1 year ago

Yay :) Yeah I've noticed a mismatch between AdGuard Docker and GH versions before. Maybe I'll add a check for version, so it can fail gracefully instead of just crashing

agneevX commented 1 year ago

Would it be possible to include a fix for users running older versions of AGH? Thanks!

Verifying connection to your AdGuard instance...
AdGuard connection successful!

Error: Failed to run: error decoding response body: missing field `protection_disabled_duration` at line 1 column 186
Lissy93 commented 1 year ago

It wouldn't be very easy, as the schema is completely different If you want to make those changes in your fork, the bulk of the code you'd need to update would be in /src/fetch