Public bug reported:

Using snapd 2.31.1 on bionic, that installation seems to have an invalid
store macaroon which leads snapd to fail to work. It would be useful to
at least hint the user how to get out of this situation (snap
logout/login?)

$ snap install gnome-chess
erreur : cannot perform the following tasks:
- Download snap "gnome-chess" (17) from channel "stable" (invalid credentials)

Corresponding debug snapd log (SNAPD_DEBUG_HTTP=7)

snapd[7580]: 2018/03/08 12:27:08.540583 logger.go:76: DEBUG: < "HTTP/1.1 401 
UNAUTHORIZED\r\nContent-Length: 125\r\nContent-Type: application/json\r\nDate: 
Thu, 08 Mar 2018 11:27:08 GMT\r\nServer: gunicorn/19.7.1\r\nWww-Authenticate: 
Macaroon needs_refresh=1\r\nX-Request-Id: 
640e16db-b518-47ed-a2b3-08feedbe4e7f\r\nX-Vcs-Revision: 6e60d16\r\n\r\n"
snapd[7580]: 2018/03/08 12:27:08.540761 retry.go:40: DEBUG: Retrying 
https://login.ubuntu.com/api/v2/tokens/refresh, attempt 1, elapsed time=12.894µs
snapd[7580]: 2018/03/08 12:27:08.541289 logger.go:69: DEBUG: > "POST 
/api/v2/tokens/refresh HTTP/1.1\r\nHost: login.ubuntu.com\r\nUser-Agent: 
snapd/2.31.1+18.04 (series 16; classic) ubuntu/18.04 (amd64) 
linux/4.15.0-10-generic\r\nContent-Length: 1168\r\nAccept: 
application/json\r\nContent-Type: application/json\r\nAccept-Encoding: 
gzip\r\n\r\n{\"discharge_macaroon\":\"REPLACEDTEXT\"}"
snapd[7580]: 2018/03/08 12:27:08.723326 logger.go:76: DEBUG: < "HTTP/1.1 401 
UNAUTHORIZED\r\nTransfer-Encoding: chunked\r\nContent-Language: 
en\r\nContent-Type: application/json; charset=utf-8\r\nDate: Thu, 08 Mar 2018 
11:27:08 GMT\r\nServer: gunicorn/19.3.0\r\nStrict-Transport-Security: 
max-age=15768000; includeSubDomains; preload\r\nVary: 
Accept,Authorization,Accept-Language,Cookie\r\nX-Bzr-Revision-Number: 
1599\r\nX-Content-Type-Options: nosniff\r\nX-Frame-Options: 
SAMEORIGIN\r\nX-Request-Id: WqEeDH8AAQEAAH4P75YAAACE1\r\nX-Xss-Protection: 1; 
mode=block\r\n\r\nc9\r\n{\"error_list\": [{\"message\": \"Provided 
email/password is not correct.\", \"code\": \"invalid-credentials\"}], 
\"message\": \"Provided email/password is not correct.\", \"code\": 
\"INVALID_CREDENTIALS\", \"extra\": {}}\r\n0\r\n\r\n"
snapd[7580]: 2018/03/08 12:27:08.723531 retry.go:52: DEBUG: The retry loop for 
https://login.ubuntu.com/api/v2/tokens/refresh finished after 1 retries, 
elapsed time=182.786609ms, status: 401
snapd[7580]: 2018/03/08 12:27:08.723827 task.go:303: DEBUG: 
2018-03-08T12:27:08+01:00 ERROR invalid credentials

** Affects: snapd (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1754345

Title:
  Returns "invalid credentials" error while trying to refresh an invalid
  macaroon

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1754345/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to