nroi / flexo

a central pacman cache
MIT License
172 stars 10 forks source link

[Potential Bug] DemarshallError(Error("unknown variant `ftp`, expected one of `http`, `https`, `rsync`", line: 1, column: 227697)) #105

Closed cbc02009 closed 1 year ago

cbc02009 commented 1 year ago

Describe the bug Flexo cannot parse the latest servers file because it contains an unknown variant for protocol

Installation method Tested on both AUR and docker installs

Distribution AUR is installed in an LXC container running Arch linux, docker container is running on vyos

Version Both are running the same version:

Name            : flexo
Version         : 1.6.8-1
Description     : A central pacman cache
Architecture    : x86_64
URL             : https://github.com/nroi/flexo
Licenses        : MIT
Groups          : None
Provides        : flexo
Depends On      : curl  pacman-contrib
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : flexo-git
Replaces        : None
Installed Size  : 2.66 MiB
Packager        : Unknown Packager
Build Date      : Sat Mar 4 22:20:01 2023
Install Date    : Sat Mar 4 22:20:59 2023
Install Reason  : Explicitly installed
Install Script  : Yes
Validated By    : None

Log

May 29 12:10:24 Flexo flexo[116]: [2023-05-29T16:10:24.975Z INFO  flexo::mirror_flexo] Retrieved 1266 files with a total size of 3.48 GiB from local file system.
May 29 12:10:27 Flexo flexo[116]: [2023-05-29T16:10:27.680Z INFO  flexo] Unable to fetch mirrors remotely: DemarshallError(Error("unknown variant `ftp`, expected one of `http`, `https`, `rsync`", line: 1, column: 227060))
May 29 12:10:27 Flexo flexo[116]:     Will try to fetch them from cache.

Log output doesn't change for this error with additional debugging added.

cbc02009 commented 1 year ago

It also seems like the backup JSON isn't being used. I went back through https://github.com/nroi/archlinux-mirrors-status-fallback to find a backup that didn't contain the line with "protocol: "ftp" and added it to my config file via mirrors_status_json_endpoint_fallbacks but it didn't seem to try it after the main JSON failed.

nroi commented 1 year ago

Thank you for reporting this, @cbc02009!

I've fixed it and released the new version 1.6.9, so flexo is able to handle ftp entries in the JSON file. Flexo should start successfully as soon as you update it. I've also created a separate issue for the fallback not being used (although this shouldn't be a big problem for now, since the JSON file can be parsed now).

cbc02009 commented 1 year ago

Thanks!