snapcraft push fails to a registered name

Bug #1691597 reported by Celso Providelo
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snap Store Server
Won't Fix
Undecided
Unassigned
Snapcraft
Fix Released
Low
Sergio Schvezov

Bug Description

Initial `snapcraft push` to a registered name is failing:

{{{
$ snapcraft registered
Name Since Visibility Price Notes
hello-robinhood2017 2017-05-17T16:15:08Z public - -

$ snapcraft push hello-robinhood2017_2.10_amd64.snap
Starting snapcraft 2.29+17.4 from /usr/lib/python3/dist-packages/snapcraft.
b'Parallel unsquashfs: Using 2 processors\n1 inodes (1 blocks) to write\n\n\r[===================================================================|] 1/1 100%\n\ncreated 1 files\ncreated 2 directories\ncreated 0 symlinks\ncreated 0 devices\ncreated 0 fifos\n'
Preparing to push 'hello-robinhood2017_2.10_amd64.snap' to the store.
Starting new HTTPS connection (1): myapps.developer.ubuntu.com
"POST /dev/api/snap-push/ HTTP/1.1" 200 None
Starting new HTTPS connection (1): upload.apps.ubuntu.com ] 0%
"POST /unscanned-upload/ HTTP/1.1" 200 None [============================ ] 99%
Pushing hello-robinhood2017_2.10_amd64.snap [=============================] 100%
Starting new HTTPS connection (1): myapps.developer.ubuntu.com
"POST /dev/api/snap-push/ HTTP/1.1" 202 None
Starting new HTTPS connection (1): dashboard.snapcraft.io
"GET /dev/api/snaps/mVyGrEwiqSi5PugCwyH7WgpoQLemtTd6/builds/ba76f29c-ff83-4d0f-9890-f4ae0b87f178/status HTTP/1.1" 200 69
Starting new HTTPS connection (1): dashboard.snapcraft.io
"GET /dev/api/snaps/mVyGrEwiqSi5PugCwyH7WgpoQLemtTd6/builds/ba76f29c-ff83-4d0f-9890-f4ae0b87f178/status HTTP/1.1" 200 167
Processing...|
Error while processing...
Traceback (most recent call last):
  File "/usr/bin/snapcraft", line 31, in <module>
    snapcraft.main.main()
  File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 253, in main
    return run(args, project_options)
  File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 297, in run
    _run_store_command(args)
  File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 365, in _run_store_command
    snapcraft.push(args['<snap-file>'], release_channels)
  File "/usr/lib/python3/dist-packages/snapcraft/_store.py", line 455, in push
    result = _push_snap(snap_name, snap_filename)
  File "/usr/lib/python3/dist-packages/snapcraft/_store.py", line 477, in _push_snap
    tracker.raise_for_code()
  File "/usr/lib/python3/dist-packages/snapcraft/storeapi/__init__.py", line 790, in raise_for_code
    raise errors.StoreReviewError(self.__content)
snapcraft.storeapi.errors.StoreReviewError: The store was unable to accept this snap.
  - __all__: You do not have access to modify this package.
}}}

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

Related logging messages:

{{{
May 17th 2017, 20:12:27.451 devportal.tasks INFO Downloading package from https://public.apps.ubuntu.com/unscanned-download/ba76f29c-ff83-4d0f-9890-f4ae0b87f178?token=ba76f29c-ff83-4d0f-9890-f4ae0b87f178%3A1dB87H%3AqkYtFMGg8rBjZDqIawvOul81dig

May 17th 2017, 20:12:27.450 devportal.tasks INFO PerformClickPackageScanTask processing upload 53336: https://public.apps.ubuntu.com/unscanned-download/ba76f29c-ff83-4d0f-9890-f4ae0b87f178?token=ba76f29c-ff83-4d0f-9890-f4ae0b87f178%3A1dB87H%3AqkYtFMGg8rBjZDqIawvOul81dig

May 17th 2017, 20:12:27.323 devportal.tasks INFO CreateApplicationTask for user: 2117799, updown id: ba76f29c-ff83-4d0f-9890-f4ae0b87f178, extra: {u'store': u'ubuntu'}
}}}

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

So I have tried the package locally downloaded from the related loging messages provided by @cprov. That package reports the snap name for it is "hello" and not "hello-robinhood2017". Granted the error message should probably be more helpful but this is not really a malfunction of our checks.

Here's the result of unpacking the package and reading its snap.yaml:

[fgallina@snapcraft-xenial:~/Code … eviewers-tools/current_work] % wget 'https://public.apps.ubuntu.com/unscanned-download/ba76f29c-ff83-4d0f-9890-f4ae0b87f178?token=ba76f29c-ff83-4d0f-9890-f4ae0b87f178%3A1dB87H%3AqkYtFMGg8rBjZDqIawvOul81dig' -O hello-robinhood2017_2.10_amd64.snap
--2017-05-18 11:38:12-- https://public.apps.ubuntu.com/unscanned-download/ba76f29c-ff83-4d0f-9890-f4ae0b87f178?token=ba76f29c-ff83-4d0f-9890-f4ae0b87f178%3A1dB87H%3AqkYtFMGg8rBjZDqIawvOul81dig
Resolving public.apps.ubuntu.com (public.apps.ubuntu.com)... 162.213.33.92, 162.213.33.91
Connecting to public.apps.ubuntu.com (public.apps.ubuntu.com)|162.213.33.92|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2998272 (2.9M) [application/octet-stream]
Saving to: ‘hello-robinhood2017_2.10_amd64.snap’

hello-robinhood2017_2.10_amd64.snap 100%[======================================================================================================================>] 2.86M 567KB/s in 7.5s

2017-05-18 11:38:21 (390 KB/s) - ‘hello-robinhood2017_2.10_amd64.snap’ saved [2998272/2998272]

[fgallina@snapcraft-xenial:~/Code … eviewers-tools/current_work] % bin/unpack-package hello-robinhood2017_2.10_amd64.snap unpacked
Successfully unpacked to 'unpacked'
[fgallina@snapcraft-xenial:~/Code … eviewers-tools/current_work] % cat unpacked/meta/snap.yaml
apps:
  bash:
    command: command-bash.wrapper
  hello:
    command: command-hello.wrapper
architectures:
- amd64
confinement: strict
description: 'GNU hello prints a friendly greeting.

  '
grade: stable
name: hello
summary: GNU Hello, the "hello world" snap
version: '2.10'

Celso Providelo (cprov)
Changed in snapstore:
status: New → Won't Fix
Revision history for this message
Celso Providelo (cprov) wrote :

Now that we know what the problem was, we could have spotted the mismatch just after pushing the file by checking that the snap-id in the upload-status URL (mVyGrEwiqSi5PugCwyH7WgpoQLemtTd6) is the "hello" snap, instead of "JM8jBjdJsQWEEB4K7wfxKFfWamsFkvos" (hello-robinhood2017)

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

So snapcraft should check that the snap id and the snap name match, before trying to upload. I'm marking this as triaged.

Changed in snapcraft:
status: New → Triaged
Changed in snapcraft:
importance: Undecided → Low
Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Changed in snapcraft:
status: Triaged → Fix Committed
assignee: nobody → Sergio Schvezov (sergiusens)
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.

Other bug subscribers

Remote bug watches

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