jotta / jotta-cli-issues

45 stars 1 forks source link

Invalid header field value when using using jotta-cli with Telia Sky on FreeBSD #171

Closed NorwegianRockCat closed 1 year ago

NorwegianRockCat commented 2 years ago

Make sure you are running the latest version of jotta-cli before reporting an issue.

jotta-cli release (jotta-cli version): jotta-cli version 0.13.55213

Description of problem:

I upgraded from jotta-cli version 0.11.47628 to 0.13.55213. While the upgrade seemed to work OK. I later could not see the status with jotta-cli. I get messages like:

jotta-cli status
Error: Connected but jottad did not respond to query within deadline

Looking through the logs, I see many of these messages on failure:

pid:32057 2022/02/21 08:59:11 jottad.auth.err => Post "https://sky-auth.telia.no/auth/realms/get/protocol/openid-connect/token": net/http: invalid header field value "Jottacloud/0.13.55213 (cli; FreeBSD 12.2-RELEASE-p12\n; amd64)" for key User-Agent

Expected:

The client would work just like it did with 0.11.47628.

jotta-cli status (jotta-cli status):

jotta-cli status
Error: Connected but jottad did not respond to query within deadline
Usage:
  jotta-cli status
  jotta-cli status [command]

Available Commands:
  log         See the -n last backup changes

Flags:
  -h, --help      help for status
      --json      output status in json
  -v, --verbose   verbose output for status. includes a full list of file errors

Global Flags:
      --host string   the ip address of the host jottad is running on (default "127.0.0.1")
      --port string   the port jottad is listening on (default "14443")

Use "jotta-cli status [command] --help" for more information about a command.

Relevant logs for the issue (~/.jottad/jottabackup.log or /var/lib/jotta/jottabackup.log )

pid:30509 2022/02/21 08:10:20 Starting /usr/local/sbin/jottad version 0.13.55213 as 277(jottad)/277 (freebsd:amd64)
pid:30509 2022/02/21 08:10:20 jottad.init
pid:30509 2022/02/21 08:10:20 jottad.init.appdata => /usr/local/etc/jottad
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad/.ignore (1609246535|490)
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad/cldb (1645380608|38920192)
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad/cldb.bak (1615655060|4194304)
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad/config.ini (1609246344|63)
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad/config.ini.sample (1645380513|57)
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad/db (1645427390|27090944)
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad/db.bak (1618640087|45731840)
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad/downloads
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad/downloads/history (1645380747|32768)
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad/jottabackup.log (1645427420|1147)
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad/jottabackup.log.bak (1645427390|63166009)
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad/localfiles (1645427390|28561408)
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad/nstore - (44bea510a4a67d1e3dc487b4f9c57e0b|1645378388|65536)
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad/obj
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad/obj/5b296082 (1645379624|807)
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad/queue.56.q (1645425333|2396160)
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad/settings.dat (1645380747|240)
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad/settings.dat.bak (1618640268|184)
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad/uploads
pid:30509 2022/02/21 08:10:20 jottad.appdata    /usr/local/etc/jottad/uploads/history (1645380747|32768)
pid:30509 2022/02/21 08:10:20 jottad.init.excludes @ v1 .jottaignore
pid:30509 2022/02/21 08:10:20 Loading settings from /usr/local/etc/jottad/settings.dat
pid:30509 2022/02/21 08:10:20 jottad.init.cfg.downloadrate => 0B/s
pid:30509 2022/02/21 08:10:20 jottad.init.cfg.uploadrate => 0B/s
pid:30509 2022/02/21 08:10:20 jottad.init.user => [get-61236642] on [jotta3] @ [66b7fe61d09b8aacef021b6096abb29e]
pid:30509 2022/02/21 08:10:20 jottad.init.cfg.scaninterval =>  1h0m0s
pid:30509 2022/02/21 08:10:20 jottad.init.cfg.backupmode => Interval
pid:30509 2022/02/21 08:10:20 jottad.init.done => ok
pid:30509 2022/02/21 08:10:20 jottad.startup
pid:30509 2022/02/21 08:10:20 error fetching account info: Post "https://api.jotta.cloud/customer/v2/get_customer": net/http: invalid header field value "Jottacloud/0.13.55213 (cli; FreeBSD 12.2-RELEASE-p12\n; amd64)" for key User-Agent
pid:30509 2022/02/21 08:10:20 jottad.startup.update-userinfo =>   66b7fe61d09b8aacef021b6096abb29e
pid:30509 2022/02/21 08:10:20 jottad.startup.confirm-remote failed => Post "https://api.jotta.cloud/device/v2/list": net/http: invalid header field value "Jottacloud/0.13.55213 (cli; FreeBSD 12.2-RELEASE-p12\n; amd64)" for key User-Agent
pid:30509 2022/02/21 08:10:20 api.grpc.tls.active => 127.0.0.1:14443
pid:30509 2022/02/21 08:10:20 jottad.startup => ok
pid:30509 2022/02/21 08:10:20 running 1 delayed startup tasks
pid:30509 2022/02/21 08:10:20 updating account info / customer true true
pid:30509 2022/02/21 08:10:21 running 3 delayed startup tasks
.....

pid:30509 2022/02/21 08:10:27 Starting full scan at /jotta/music
pid:30509 2022/02/21 08:10:27 Running full scan at /jotta/music
pid:30509 2022/02/21 08:10:50 jottad.auth.err => Post "https://sky-auth.telia.no/auth/realms/get/protocol/openid-connect/token": net/http: invalid header field value "Jottacloud/0.13.55213 (cli; FreeBSD 12.2-RELEASE-p12\n; amd64)" for key User-Agent
pid:30509 2022/02/21 08:10:51 waiting for remote session confirmation

Traceback Not applicable.

Additional info:

This setup was working perfectly with 0.11.47628. I just thought I would upgrade since I noticed there was a new version. The release notes and the instructions don't seem to indicate anything that I should do as part of the upgrade process.

If it is possible to downgrade, I will, but I figured I would report the error first.

coopersimon commented 2 years ago

Hi, we changed the user agents recently. There is a bug in the FreeBSD version here- we will get a fix out asap. In the meantime, you can find older versions here https://repo.jotta.us/archives/freebsd/amd64/

Thanks for the helpful bug report!

NorwegianRockCat commented 2 years ago

Ah, OK, good to know!

I can report that going back to the 0.11.47628 version works OK. I'll stay on that until there is a fix.

coopersimon commented 2 years ago

Hi, this should be fixed in the newest version (0.13.56239)

yngvar commented 2 years ago

Same issue as described above on latest version, 0.13.56239, running FreeBSD (Asustor NAS)

Post "https://id.jottacloud.com/auth/realms/jottacloud/protocol/openid-connect/token": net/http: invalid header field value "Jottacloud/0.13.56239 (cli; Linux/3.4.26\n; 386)" for key User-Agent
Kimbsen commented 2 years ago

Thanks for letting us know the fix didn't work. I released an unstable version 0.13.56548 with a fix for this. Please let me know if this resolves it for you.

NorwegianRockCat commented 2 years ago

Thank you for the unstable version. I will have some time this evening to test and verify this.

NorwegianRockCat commented 2 years ago

Hmm... where can one download the unstable version? There is no link to the 0.13.56548 version on repo.jotta.us.

Kimbsen commented 2 years ago

They are here: https://repo.jotta.us/archives-unstable/ and there is more information about unstable here: https://github.com/jotta/jotta-cli-issues/blob/master/README.md

NorwegianRockCat commented 2 years ago

@Kimbsen Thanks. I guess I should have taken a look at README.md. Anyway, I tried it out this evening and it seems to work OK. At least, jotta-cli works and I don't see any error messages in the log file. I guess this is "fixed".

ErikFontanel commented 2 years ago

I'm experiencing the same error with Jottacloud/0.13.56239 (cli; Linux/4.4.180+\n; arm64), using the unstable 0.13.56548 release fixes the issue for me.

yngvar commented 2 years ago

Installed latest version, 0.14.58899, and it seems to be working here on my FreeBSD installation