File dispute not working

Bug #1771767 reported by Toto Bille
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snap Store Server
Fix Released
Undecided
Unassigned
Snapcraft
Triaged
Undecided
Unassigned

Bug Description

# Summary

When registering a snap name that already exists filing a dispute is not working.

# Steps to reproduce

## On API

- Register a snap that already exists
/dev/api/register-name/
{
  "snap_name": "toto"
}

Response:
409 Conflict
{
 "error_list": [{'message': "'toto' is already registered.", 'code': 'already_registered'}]
}

- File a dispute
/dev/api/register-name/
{
  "snap_name": "toto",
  "registrant_comment": "I want this awesome snap name"
}

Response:
409 Conflict
{
 "error_list": [{'message': "'toto' is already registered.", 'code': 'already_registered'}]
}

# Expected behaviour

## On API

- Register a snap that already exists
/dev/api/register-name/
{
  "snap_name": "toto"
}

Response:
409 Conflict
{
 "error_list": [{'message': "'toto' is already registered.", 'code': 'already_registered'}]
}

- File a dispute
/dev/api/register-name/
{
  "snap_name": "toto",
  "registrant_comment": "I want this awesome snap name"
}

Response:
409 Conflict
{
 "error_list": [{'message': "You already registered a claim for 'toto'.", 'code': 'already_claimed'}]
}

Revision history for this message
Adam Collard (adam-collard) wrote :
Changed in snapstore:
status: New → Incomplete
Revision history for this message
Toto Bille (tbmb) wrote :

I updated the description without the dashboard part, I don't why it seemed to work for me yesterday...
So it seems that the problem comes from the API

description: updated
Toto Bille (tbmb)
description: updated
Changed in snapstore:
status: Incomplete → New
Celso Providelo (cprov)
Changed in snapstore:
assignee: nobody → Celso Providelo (cprov)
status: New → In Progress
Revision history for this message
Celso Providelo (cprov) wrote :

The associate MP has landed in staging for tests.

It has dropped the support for 'registrant_comment' field, since it would be only saved in cases it's not relevant at all (when the name is registered). For now, the API does not support filing disputes (reserved or transfer requests), they have to be done via the webUI.

Snapcraft has to grow support for `already_claimed` and `revoked_name` error codes, otherwise it will continue to fallback to "Registration failed." CLI error.

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

What is the difference between `already_claimed` and these: `reserved_name`, `already_owned` and `already_registered`. Is it that you have claimed it or that someone else has? Link to docs would be nice.

Revision history for this message
Celso Providelo (cprov) wrote :

Sergio,

Documentation was updated in https://dashboard.staging.snapcraft.io/docs/api/snap.html#register-a-package-name (will eventually reach production)

 * `already_owned` => name is already yours, nothing to be done
 * `already_registered` => registered by someone else, you may file a name-dispute in the web UI
 * `reserved_name` => blacklisted names (debs or special terms), you may file a name-dispute in the web UI
 * `already_claimed` => "... is waiting for review, either because it was a reserved name or already registered by someone else ..."

One tries `snapcraft register foo` and gets either `already_registered` or `reserved_name` error, goes to dashboard (following the error instructions) and file a name-dispute ... goes to bed. Next day, when trying again `snapcraft register foo`, one gets `already_claimed` error.

Celso Providelo (cprov)
Changed in snapstore:
status: Fix Committed → Fix Released
Revision history for this message
Felipe Santos (felipecassiors) wrote :

This happenened to me today. Look at the picture attached.

Revision history for this message
Toto Bille (tbmb) wrote :

hi @felipecassiors

I can't reproduce this bug. Could you try to go through this page to register the name and file a dispute: https://snapcraft.io/register-name-dispute?snap-name=onedrive

Let me know if it works for you.

Revision history for this message
Felipe Santos (felipecassiors) wrote :

Hi @tbmb

Thank you so much, your link worked.

And so I caught the problem: the `snapcraft register onedrive` command was pointing me to the following link instead.

https://dashboard.snapcraft.io/register-snap/?name=onedrive

I believe the CLI should be adjusted.

Revision history for this message
Felipe Santos (felipecassiors) wrote :

Another thing,

The URL https://dashboard.snapcraft.io/register-snap/?name=onedrive says "File a dispule to request the existing snap name to be revoked: please enter a rationale 'Comment' box and click the 'Submit name dispute' button below" but the suggestion does not work: I can't click the 'Submit name dispute' button as it keep failing with "Error: The snap name 'onedrive' is already registered".

So I suggest either 1. Fix the behavior of this URL, or 2. Abandon this URL in favor of the working one you shared with me and then set a URL redirection.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

The registration url is returned by the API:
{
 'code': 'already_registered',
 'detail': 'The snap name "gnome-calculator" is already registered.',
 'field': 'snap_name',
 'register_name_url': 'https://dashboard.snapcraft.io/register-snap/?name=gnome-calculator',
 'snap_name': 'gnome-calculator',
 'status': 409,
 'suggested_snap_name': 'sergiusens-gnome-calculator',
 'title': 'The snap name "gnome-calculator" is already registered.',
 'type': 'devportal:v1:already_registered'
}

Changed in snapcraft:
status: New → Invalid
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

I cannot change the state of the bug for the Snap Store, so will go and discuss with someone that can

Changed in snapcraft:
status: Invalid → Triaged
Revision history for this message
Daniel Manrique (roadmr) wrote :

If I go to https://dashboard.snapcraft.io/register-snap/?name=$SOME_RANDOM_NAME I can register a new name no problem.

On the other hand, if I go https://dashboard.snapcraft.io/register-snap/?name=onedrive, I can submit a dispute without problems (I just did, fwiw).

Can you attach a screenshot of the page you get with the "error" so I can see how it fails for you?

Thanks!

Changed in snapstore-server:
assignee: Celso Providelo (cprov) → nobody
Revision history for this message
Felipe Santos (felipecassiors) wrote :

I already attached a screenshot when I was trying to submit a dispute for onedrive. But I'm attaching another (the error persists) when I try to submit a dispute for 'code' through this URL: https://dashboard.snapcraft.io/register-snap/?name=code

Revision history for this message
Daniel Manrique (roadmr) wrote :

Can you try this?

1- https://dashboard.snapcraft.io/register-snap/?name=code # or whichever other name you want to try disputing for. You can put "please revoke this" or something in the comment so I know it's you)

it should show the "The name 'code' is already taken. " warning in yellow, with snap name and comment fields.

2- Fill out the comment field, click "submit name dispute".

You get mostly the same screen but with "Please correct the fields indicated below before continuing. " and with " Error: The snap name "foobar40" is already registered. " - this is basically what you showed.

3- Click "submit name dispute" again.

4- You should land in a "Your snaps" page with "Thanks for requesting "code"!" message.

(or if you don't, let me know what you see; perhaps the same page from step 2).

FWIW the above is the behavior I'm seeing, and requiring the double submit would indeed be a bug which we can look into, but a clear repro case would help.

Revision history for this message
Felipe Santos (felipecassiors) wrote :

I can confirm the behavior you described. It's necessary to click submit twice. (And I just submited one for 'code').

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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