Skip to content
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

Yay displays a cryptic error for when the AUR portal is under maintenance AND/OR is down #2470

Open
alexlnkp opened this issue Jul 13, 2024 · 11 comments
Labels
Status: Approved Feature Request or Enchancement has been approved. Type: Enhancement

Comments

@alexlnkp
Copy link

alexlnkp commented Jul 13, 2024

Affected Version

Every version before and including yay v12.3.5 - libalpm v14.0.0

Describe the bug

Whenever the AUR portal is down, whether it's for maintenance or not, the error message is not clear enough for end-users to understand.

Example output:

$ yay
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 multilib is up to date
:: Searching AUR for updates...
:: Searching databases for updates...
 -> 1 error occurred:
	* response decoding failed: invalid character '<' looking for beginning of value

Trying to install any package (yay-git as example):

$ yay -S yay-git
 -> 1 error occurred:
	* response decoding failed: invalid character '<' looking for beginning of value


 -> Failed to find AUR package for yay-git:1 error occurred:
	* response decoding failed: invalid character '<' looking for beginning of value


 -> No AUR package found for yay-git
 there is nothing to do

Reproduction Steps

  1. Try to use yay while AUR portal(s) is/are down

Expected behavior

A clear and concise error message, stating that the website is under maintenance or is down.

Output

YAY config:

$ yay -Pg
{
	"aururl": "https://aur.archlinux.org",
	"aurrpcurl": "https://aur.archlinux.org/rpc?",
	"buildDir": "/home/alex/.cache/yay",
	"editor": "",
	"editorflags": "",
	"makepkgbin": "makepkg",
	"makepkgconf": "",
	"pacmanbin": "pacman",
	"pacmanconf": "/etc/pacman.conf",
	"redownload": "no",
	"answerclean": "",
	"answerdiff": "",
	"answeredit": "",
	"answerupgrade": "",
	"gitbin": "git",
	"gpgbin": "gpg",
	"gpgflags": "",
	"mflags": "",
	"sortby": "votes",
	"searchby": "name-desc",
	"gitflags": "",
	"removemake": "ask",
	"sudobin": "sudo",
	"sudoflags": "",
	"version": "12.3.5",
	"requestsplitn": 150,
	"completionrefreshtime": 7,
	"maxconcurrentdownloads": 1,
	"bottomup": true,
	"sudoloop": false,
	"timeupdate": false,
	"devel": false,
	"cleanAfter": false,
	"keepSrc": false,
	"provides": true,
	"pgpfetch": true,
	"cleanmenu": true,
	"diffmenu": true,
	"editmenu": false,
	"combinedupgrade": true,
	"useask": false,
	"batchinstall": false,
	"singlelineresults": false,
	"separatesources": true,
	"debug": false,
	"rpc": true,
	"doubleconfirm": true,
	"rebuild": "no"
}

Running YAY with debug in config while the AUR portal is down for maintenance:

$ yay
[DEBUG:runner] running /usr/bin/sudo pacman -S -y --config /etc/pacman.conf --
[sudo] password for alex: 
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 multilib is up to date
[DEBUG:db] populating db executor package caches. sync_len 1440 remote_len 70
:: Searching AUR for updates...
[DEBUG:runtime] packages to query [appimagelauncher aseprite betterbird-bin bottles catppuccin-gtk-theme-mocha clean-chroot-manager cli-visualizer ctre davinci-resolve-studio downgrade electron11-bin electron11-bin-debug ffnvcodec-headers-12-1 fvs glib gtk hid-sony-panic-fix-dkms hyprpicker icoextract image-roll lib32-nvidia-utils-beta libggml-git librewolf libtxc_dxtn logseq-desktop-bin nvidia-beta-dkms nvidia-settings-beta nvidia-utils-beta nvm nwg-look-bin obs-cmd opencl-nvidia-beta paclogger papirus-folders-catppuccin-git patool pcsx2 plymouth-theme-deus-ex-git prismlauncher-git python-cached-property python-pathvalidate python-pylspci python-pynotify python-steamgriddb python2 python2-debug r2modman rivalcfg sdl3-git sentencepiece shaderc-non-semantic-debug sokol-git swaylock-effects swww-git upd72020x-fw vesktop vim-wayland-clipboard-git vkbasalt vkbasalt-cli vscodium vscodium-debug waybar-module-pacman-updates-git wg-client wg-client-debug wineasio xorg-xwayland-git xorgproto-git yay yaycache yaycache-hook youtube-dl-gui]
[DEBUG:runtime] rpc request https://aur.archlinux.org/rpc?arg%5B%5D=appimagelauncher&arg%5B%5D=aseprite&arg%5B%5D=betterbird-bin&arg%5B%5D=bottles&arg%5B%5D=catppuccin-gtk-theme-mocha&arg%5B%5D=clean-chroot-manager&arg%5B%5D=cli-visualizer&arg%5B%5D=ctre&arg%5B%5D=davinci-resolve-studio&arg%5B%5D=downgrade&arg%5B%5D=electron11-bin&arg%5B%5D=electron11-bin-debug&arg%5B%5D=ffnvcodec-headers-12-1&arg%5B%5D=fvs&arg%5B%5D=glib&arg%5B%5D=gtk&arg%5B%5D=hid-sony-panic-fix-dkms&arg%5B%5D=hyprpicker&arg%5B%5D=icoextract&arg%5B%5D=image-roll&arg%5B%5D=lib32-nvidia-utils-beta&arg%5B%5D=libggml-git&arg%5B%5D=librewolf&arg%5B%5D=libtxc_dxtn&arg%5B%5D=logseq-desktop-bin&arg%5B%5D=nvidia-beta-dkms&arg%5B%5D=nvidia-settings-beta&arg%5B%5D=nvidia-utils-beta&arg%5B%5D=nvm&arg%5B%5D=nwg-look-bin&arg%5B%5D=obs-cmd&arg%5B%5D=opencl-nvidia-beta&arg%5B%5D=paclogger&arg%5B%5D=papirus-folders-catppuccin-git&arg%5B%5D=patool&arg%5B%5D=pcsx2&arg%5B%5D=plymouth-theme-deus-ex-git&arg%5B%5D=prismlauncher-git&arg%5B%5D=python-cached-property&arg%5B%5D=python-pathvalidate&arg%5B%5D=python-pylspci&arg%5B%5D=python-pynotify&arg%5B%5D=python-steamgriddb&arg%5B%5D=python2&arg%5B%5D=python2-debug&arg%5B%5D=r2modman&arg%5B%5D=rivalcfg&arg%5B%5D=sdl3-git&arg%5B%5D=sentencepiece&arg%5B%5D=shaderc-non-semantic-debug&arg%5B%5D=sokol-git&arg%5B%5D=swaylock-effects&arg%5B%5D=swww-git&arg%5B%5D=upd72020x-fw&arg%5B%5D=vesktop&arg%5B%5D=vim-wayland-clipboard-git&arg%5B%5D=vkbasalt&arg%5B%5D=vkbasalt-cli&arg%5B%5D=vscodium&arg%5B%5D=vscodium-debug&arg%5B%5D=waybar-module-pacman-updates-git&arg%5B%5D=wg-client&arg%5B%5D=wg-client-debug&arg%5B%5D=wineasio&arg%5B%5D=xorg-xwayland-git&arg%5B%5D=xorgproto-git&arg%5B%5D=yay&arg%5B%5D=yaycache&arg%5B%5D=yaycache-hook&arg%5B%5D=youtube-dl-gui&type=info&v=5
:: Searching databases for updates...
 -> 1 error occurred:
	* response decoding failed: invalid character '<' looking for beginning of value

Trying to install yay-git using yay with debug turned on and the portal under maintenance:

$ yay -S yay-git
[DEBUG:runtime] packages to query [yay-git]
[DEBUG:runtime] rpc request https://aur.archlinux.org/rpc?arg%5B%5D=yay-git&type=info&v=5
 -> 1 error occurred:
	* response decoding failed: invalid character '<' looking for beginning of value


[DEBUG:runtime] rpc request https://aur.archlinux.org/rpc?arg=yay-git&by=provides&type=search&v=5
 -> Failed to find AUR package for yay-git:1 error occurred:
	* response decoding failed: invalid character '<' looking for beginning of value


 -> No AUR package found for yay-git
 there is nothing to do
@alexlnkp
Copy link
Author

alexlnkp commented Jul 13, 2024

The issue was originally mistaken for YAY-specific problem, turns out the error was related to the fact that the AUR portal simply returned 404 Not Found error on visit.

Original comment

I forgot to check if AUR portal was even online... Turns out it isn't.
Trying to visit AUR portal leads to a 404 Not Found error / nginx

Update

The portal returned 404 Not Found prior, but now it clearly states that the website is under maintenance. So yay should cover BOTH cases, when the portal returns 404 Not Found AND when the website is under maintenance.

The website's HTML for when it's under maintenance:

<!DOCTYPE html>
<!-- Source: https://gist.github.com/pitch-gist/2999707 -->
<html data-darkreader-mode="dynamic" data-darkreader-scheme="dark"><head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252"><style class="darkreader darkreader--fallback" media="screen"></style><style class="darkreader darkreader--text" media="screen"></style><style class="darkreader darkreader--invert" media="screen">.jfk-bubble.gtx-bubble, .captcheck_answer_label > input + img, span#closed_text > img[src^="https://www.gstatic.com/images/branding/googlelogo"], span[data-href^="https://www.hcaptcha.com/"] > #icon, ::-webkit-calendar-picker-indicator, img.Wirisformula, img[src*="icons/"], img[src="/svg/calendar.svg"] {
    filter: invert(100%) hue-rotate(180deg) contrast(90%) !important;
}</style><style class="darkreader darkreader--inline" media="screen">[data-darkreader-inline-bgcolor] {
  background-color: var(--darkreader-inline-bgcolor) !important;
}
[data-darkreader-inline-bgimage] {
  background-image: var(--darkreader-inline-bgimage) !important;
}
[data-darkreader-inline-border] {
  border-color: var(--darkreader-inline-border) !important;
}
[data-darkreader-inline-border-bottom] {
  border-bottom-color: var(--darkreader-inline-border-bottom) !important;
}
[data-darkreader-inline-border-left] {
  border-left-color: var(--darkreader-inline-border-left) !important;
}
[data-darkreader-inline-border-right] {
  border-right-color: var(--darkreader-inline-border-right) !important;
}
[data-darkreader-inline-border-top] {
  border-top-color: var(--darkreader-inline-border-top) !important;
}
[data-darkreader-inline-boxshadow] {
  box-shadow: var(--darkreader-inline-boxshadow) !important;
}
[data-darkreader-inline-color] {
  color: var(--darkreader-inline-color) !important;
}
[data-darkreader-inline-fill] {
  fill: var(--darkreader-inline-fill) !important;
}
[data-darkreader-inline-stroke] {
  stroke: var(--darkreader-inline-stroke) !important;
}
[data-darkreader-inline-outline] {
  outline-color: var(--darkreader-inline-outline) !important;
}
[data-darkreader-inline-stopcolor] {
  stop-color: var(--darkreader-inline-stopcolor) !important;
}
[data-darkreader-inline-bg] {
  background: var(--darkreader-inline-bg) !important;
}
[data-darkreader-inline-invert] {
    filter: invert(100%) hue-rotate(180deg);
}</style><style class="darkreader darkreader--variables" media="screen">:root {
   --darkreader-neutral-background: #131516;
   --darkreader-neutral-text: #d8d4cf;
   --darkreader-selection-background: #004daa;
   --darkreader-selection-text: #e8e6e3;
}</style><style class="darkreader darkreader--root-vars" media="screen"></style><style class="darkreader darkreader--user-agent" media="screen">@layer {
html {
    background-color: #181a1b !important;
}
html {
    color-scheme: dark !important;
}
iframe {
    color-scheme: initial;
}
html, body {
    background-color: #181a1b;
}
html, body {
    border-color: #736b5e;
    color: #e8e6e3;
}
a {
    color: #3391ff;
}
table {
    border-color: #545b5e;
}
mark {
    color: #e8e6e3;
}
::placeholder {
    color: #b2aba1;
}
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    background-color: #404400 !important;
    color: #e8e6e3 !important;
}
::-webkit-scrollbar {
    background-color: #202324;
    color: #aba499;
}
::-webkit-scrollbar-thumb {
    background-color: #454a4d;
}
::-webkit-scrollbar-thumb:hover {
    background-color: #575e62;
}
::-webkit-scrollbar-thumb:active {
    background-color: #484e51;
}
::-webkit-scrollbar-corner {
    background-color: #181a1b;
}
* {
    scrollbar-color: #454a4d #202324;
}
::selection {
    background-color: #004daa !important;
    color: #e8e6e3 !important;
}
::-moz-selection {
    background-color: #004daa !important;
    color: #e8e6e3 !important;
}
}</style>
<meta name="keywords" content="automatic redirection">
<title>AUR under Maintenance</title>
<style>
  body { text-align: right; padding: 150px; }
  h1 { font-size: 50px; }
  body { font: 20px Helvetica, sans-serif; color: #333; }
  article { display: block; text-align: left; width: 650px; margin: 0 auto; }
  a { color: #dc8100; text-decoration: none; }
  a:hover { color: #333; text-decoration: none; }
</style><style class="darkreader darkreader--sync" media="screen"></style>

<meta name="darkreader" content="7285fd3633e14dbaa8205702f88a48db"><style class="darkreader darkreader--override" media="screen">.vimvixen-hint {
    background-color: #7b5300 !important;
    border-color: #d8b013 !important;
    color: #f3e8c8 !important;
}
#vimvixen-console-frame {
    color-scheme: light !important;
}
::placeholder {
    opacity: 0.5 !important;
}
#edge-translate-panel-body,
.MuiTypography-body1,
.nfe-quote-text {
    color: var(--darkreader-neutral-text) !important;
}
gr-main-header {
    background-color: #0f3a48 !important;
}
.tou-z65h9k,
.tou-mignzq,
.tou-1b6i2ox,
.tou-lnqlqk {
    background-color: var(--darkreader-neutral-background) !important;
}
.tou-75mvi {
    background-color: #032029 !important;
}
.tou-ta9e87,
.tou-1w3fhi0,
.tou-1b8t2us,
.tou-py7lfi,
.tou-1lpmd9d,
.tou-1frrtv8,
.tou-17ezmgn {
    background-color: #0a0a0a !important;
}
.tou-uknfeu {
    background-color: #231603 !important;
}
.tou-6i3zyv {
    background-color: #19576c !important;
}
div.mermaid-viewer-control-panel .btn {
    background-color: var(--darkreader-neutral-background);
    fill: var(--darkreader-neutral-text);
}
svg g rect.er {
    fill: var(--darkreader-neutral-background) !important;
}
svg g rect.er.entityBox {
    fill: var(--darkreader-neutral-background) !important;
}
svg g rect.er.attributeBoxOdd {
    fill: var(--darkreader-neutral-background) !important;
}
svg g rect.er.attributeBoxEven {
    fill: var(--darkreader-selection-background);
    fill-opacity: 0.8 !important;
}
svg rect.er.relationshipLabelBox {
    fill: var(--darkreader-neutral-background) !important;
}
svg g g.nodes rect,
svg g g.nodes polygon {
    fill: var(--darkreader-neutral-background) !important;
}
svg g rect.task {
    fill: var(--darkreader-selection-background) !important;
}
svg line.messageLine0,
svg line.messageLine1 {
    stroke: var(--darkreader-neutral-text) !important;
}
div.mermaid .actor {
    fill: var(--darkreader-neutral-background) !important;
}
mitid-authenticators-code-app > .code-app-container {
    background-color: white !important;
    padding-top: 1rem;
}
iframe#unpaywall[src$="unpaywall.html"] {
    color-scheme: light !important;
}
embed[type="application/pdf"] { filter: invert(100%) contrast(90%); }</style></head>
<body>
<article>
    <img src="AUR%20under%20Maintenance_files/archlinux-logo-dark-90dpi.ebdee92a15b3.png" alt="Arch Linux logo">

    <h1>The AUR is currently undergoing maintenance</h1>

    <div>
        <p>As we <a href="https://lists.archlinux.org/archives/list/[email protected]/thread/5JKT4WTJTASKN43YHJVWJSGGK4566BNN/">have previously announced</a> the AUR will undergo maintenance from 12:00 
UTC until it is done (approximately 2 hours)!</p>

        <p>— The Arch Linux DevOps Team</p>
    </div>
</article>



</body></html>

@Felixoid
Copy link

Came here with the same issue. I think, the error should be different, like saying the portal is down.

Here's the HTML code for the 404:

<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>

@alexlnkp
Copy link
Author

Came here with the same issue. I think, the error should be different, like saying the portal is down.

Here's the HTML code for the 404:

<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>

Agree. The error that is printed out means nothing to the end user. In fact, I'd argue that it suggests that the yay specifically is to blame here, when it, in fact, isn't.

@stelgenhof
Copy link

stelgenhof commented Jul 13, 2024

The AUR site is undergoing maintenance as announced here: https://lists.archlinux.org/archives/list/[email protected]/thread/5JKT4WTJTASKN43YHJVWJSGGK4566BNN/

@silentgameplays
Copy link

silentgameplays commented Jul 13, 2024

Same issue with:
" response decoding failed: invalid character '<' looking for beginning of value"

Even rebuilt the yay package just in case, but turns out AUR is in maintenance mode:

"The AUR is currently undergoing maintenance

AUR will undergo maintenance from 12:00 UTC until it is done (approximately 2 hours)!"

https://aur.archlinux.org/

@alexlnkp
Copy link
Author

The AUR site is undergoing maintenance as announced here: lists.archlinux.org/archives/list/[email protected]/thread/5JKT4WTJTASKN43YHJVWJSGGK4566BNN

Still, a verbose message stating that the website is down should be printed instead of the one that is printed right now

@Felixoid
Copy link

The AUR site is undergoing maintenance as announced here: https://lists.archlinux.org/archives/list/[email protected]/thread/5JKT4WTJTASKN43YHJVWJSGGK4566BNN/

Doesn't mean a yay user should go and check the maillists, tbh.

@alexlnkp
Copy link
Author

alexlnkp commented Jul 13, 2024

Edited the issue to be more related to the cryptic error message for when the AUR portal is down/under maintenance

@alexlnkp alexlnkp changed the title Yay crashes every single time on latest kernel release Yay displays a cryptic error for when the AUR portal is under maintenance AND/OR is down Jul 13, 2024
@silentgameplays
Copy link

Should I edit this issue to be more about the fact that a better error message is warranted for when the website is under maintenance AND/OR is down?

Changing the error message would be optimal, since this error code looks like something broke in the yay package:
" response decoding failed: invalid character '<' looking for beginning of value"

@stelgenhof
Copy link

The AUR site is undergoing maintenance as announced here: https://lists.archlinux.org/archives/list/[email protected]/thread/5JKT4WTJTASKN43YHJVWJSGGK4566BNN/

Doesn't mean a yay user should go and check the maillists, tbh.

Agree that the error message from yay should be more meaningful

@Jguer Jguer added Type: Enhancement Status: Approved Feature Request or Enchancement has been approved. and removed Type: Bug Status: Triage labels Jul 18, 2024
@Jguer
Copy link
Owner

Jguer commented Jul 18, 2024

I agree with this, a more user-friendly "the AUR could not be reached" or "AUR endpoint did not return valid data." , "Please check AUR status" could be of more assistance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Approved Feature Request or Enchancement has been approved. Type: Enhancement
Projects
None yet
Development

No branches or pull requests

5 participants