uploading a snap registered by somebody else shows the wrong error

Bug #1602786 reported by Leo Arias
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
Undecided
Unassigned
Software Center Agent
New
Undecided
Unassigned

Bug Description

If I try to upload a snap registered by another user, I get the following error:

There has been a problem while analyzing the snap, check the snap and try to push again.

To reproduce:

Download and build the attached snapcraft.yaml
⟫ snapcraft upload integration_tests/snaps/basic/basic_0.1_all.snap
Uploading integration_tests/snaps/basic/basic_0.1_all.snap.
Uploading integration_tests/snaps/basic/basic_0.1_all.snap [ ] 0%
Uploading integration_tests/snaps/basic/basic_0.1_all.snap [====================================] 100%
Error while processing...|
Uploaded 'basic'
There has been a problem while analyzing the snap, check the snap and try to push again.

The first problem here is that the snap is fully uploaded before the error is received. The second is that the only problem with the snap is the name. The error message mentions nothing about changing the name, or the claim form.

Tags: store
Revision history for this message
Leo Arias (elopio) wrote :
Revision history for this message
Leo Arias (elopio) wrote :

Note that this will change a little when branches are implemented in the store. In that case, if the snap allows branching it will succeed. If the snap doesn't allow branches, it should fail with an improved message.

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

We need store support to improve the error message, this is the current API

If a push is attempted for a package that has not had its name registered beforehand, an error like this will be returned

Response:

HTTP/1.1 404 NOT FOUND

For getting a register required error before uploading we need a registration-required or am-I-allowed like endpoint

Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 1602786] Re: uploading a snap registered by somebody else shows the wrong error

Right, this is a good opportunity to ask the tore team to design the
experience they want their APIs to support. "404" is not a very easy
thing to work with on the client side :)

Mark

tags: added: store
Revision history for this message
Kyle Fazzari (kyrofa) wrote :

I see this nowadays:

Pushing 'basic_0.1_all.snap' to the store.
Uploading basic_0.1_all.snap [ ] 0%
Uploading basic_0.1_all.snap [============================================] 100%
Error while processing...|
The store was unable to accept this snap.
  - __all__: You do not have access to modify this package.

Terribly ugly, but an improvement. Probably not good enough to close the bug until that nasty __all__ is gone, though.

Changed in snapcraft:
status: New → 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.