
Now 14:24 CET+2 (Brussels) July 27 2019 you can test this.
When AUR website is down we get a strange answer - thinking something was wrong with my script, I checked to analyze it.
This is what we get in the terminal when AUR website is down
[erik@ArcoLinux Get-Started]$ yay -Syu
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
multilib is up to date
arcolinux_repo is up to date
arcolinux_repo_3party is up to date
arcolinux_repo_submicron is up to date
:: Starting full system upgrade...
there is nothing to do
:: Searching databases for updates...
:: Searching AUR for updates...
invalid character '<' looking for beginning of value
[erik@ArcoLinux Get-Started]$
This is the line coming from YAY.
invalid character '<' looking for beginning of value
Could we include a check if AUR is accessible and if not
"Can not connect to the AUR website. Try again later" or something in those lines.
This is too specific for yay to really know about. But if the page returns non 200 then we could handle it.
Returns a 503 it seems, https://aur.archlinux.org/rpc/?v=5&type=search&arg=foobar
I just stumbled upon this issue myself a moment ago.
Can confirm. The AUR website does seem to return a 503.
$ curl -v https://aur.archlinux.org/
* Trying 5.9.250.164:443...
* TCP_NODELAY set
* Connected to aur.archlinux.org (5.9.250.164) port 443 (#0)
...
Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x55fc560a7f30)
> GET / HTTP/2
> Host: aur.archlinux.org
> User-Agent: curl/7.65.3
> Accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
< HTTP/2 503
< server: nginx/1.16.0
< date: Sat, 27 Jul 2019 13:17:10 GMT
< content-type: text/html
< content-length: 39356
< etag: "4fa68737-99bc"
<
<!DOCTYPE HTML>
<html>
<head>
<title>Arch Linux Maintenance</title>
<meta name="robots" content="noindex,nofollow" />
...
This is too specific for yay to really know about.
Even then, in my opinion, the error thrown by yay shouldn't be shown to the user. It made me think that something was wrong with my system (or with yay itself), rather than a problem connecting to the AUR.
I believe that a generic Error communicating with the AUR. or something along those lines would be better received by someone using the software (as can be seen by issues being created here).
The actual error invalid character '<' looking for beginning of value could possibly still be found in log files, if those exist.
EDIT: Was a bit late to the party, but I'm glad that it seems possible to know whether the AUR is actually down.
@nunocastromartins I'd still say you have a valid point regardless of the status code. For example the 'content-type' header could have been checked, as well as any parsing errors in general.
Possible resolution: https://github.com/mikkeloscar/aur/pull/9
yay -g and yay -d don't have any meaning.
mikkeloscar/aur#9 is merged, putting this issue to rest
Most helpful comment
@nunocastromartins I'd still say you have a valid point regardless of the status code. For example the 'content-type' header could have been checked, as well as any parsing errors in general.