Registering a snap without agreeing to terms and conditions fails opaquely

Bug #1619193 reported by David Lawson
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
High
Para Siva
Software Center Agent
Fix Released
Medium
Fabián Ezequiel Gallina

Bug Description

If you attempt to register a snap name via "snap register foo" without first logging into the snapcraft site and agreeing to terms and conditions, setting a namespace, etc. If that's the case it should fail in a way that gives the user some indication of what they need to do to remedy the situation, not simply report "Registration failed".

Tags: store
Changed in software-center-agent:
status: New → In Progress
assignee: nobody → Fabián Ezequiel Gallina (fgallina)
importance: Undecided → Medium
Revision history for this message
Fabián Ezequiel Gallina (fgallina) wrote :

Local try-out against staging with snapcraft locally modified to print received response: https://pastebin.canonical.com/165288/

Changed in software-center-agent:
status: In Progress → Fix Committed
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

A good error message would kindly tell the user what to do, don't you think?

Revision history for this message
Fabián Ezequiel Gallina (fgallina) wrote :

The same error string is widely used across endpoints and was re-used in register-name as a matter of consistency. Feel free to propose a string to globally enhance that message. Note there is also a similar message for missing agreement: https://bazaar.launchpad.net/~canonical-ca-hackers/software-center-agent/trunk/view/head:/src/devportal/api/handlers.py#L87

Changed in software-center-agent:
status: Fix Committed → Fix Released
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

I would prefer something like, "Account details are missing, please fill them in at https://blah"

Revision history for this message
Evan (ev) wrote :

We should catch both cases, not signed the developer agreement and missing a short namespace (to later be replaced with an SSO username check), on snapcraft login.

In the case of registration failed:
```
$ snapcraft login
Email:
Password:
Two-factor:

You need to sign the developer agreement to push snaps. Please visit http://… and log in again.
```

https://docs.google.com/document/u/1/d/1FCPYVcb01XqRoYXCTardWqF7y04Az9JkDPDu7YnvtTU/edit#heading=h.cx2d9tfvjapo

If the short namespace is missing:
```
$ snapcraft login
Email: <email address hidden>
Password:
Two-factor:

You need to set a username. It will appear in the developer field alongside the other details for your snap. Please visit http://… and log in again.
```

https://docs.google.com/document/d/1FCPYVcb01XqRoYXCTardWqF7y04Az9JkDPDu7YnvtTU/edit#heading=h.6xbdc5oax4o2

Para Siva (psivaa)
Changed in snapcraft:
status: New → In Progress
assignee: nobody → Para Siva (psivaa)
Revision history for this message
Para Siva (psivaa) wrote :
Leo Arias (elopio)
tags: added: store
Changed in snapcraft:
importance: Undecided → High
milestone: none → 2.23
status: In Progress → Fix Committed
Changed in snapcraft:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.