snapcraft upload can fail while monitoring scan status

Bug #1572963 reported by Vincent Ladeuil
46
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
Medium
Vincent Ladeuil
snapcraft (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * Spurious errors on the Ubuntu Store currently cause snap uploads to
   fail.

 * This fix will handle those spurious errors correctly.

[Test Case]

 * snapcraft upload a snap. It should still work. Spurious errors while
   scanning the status url should not fail the upload.

[Regression Potential]

 * None.

Vincent Ladeuil (vila)
Changed in snapcraft:
assignee: nobody → Vincent Ladeuil (vila)
status: New → In Progress
Changed in snapcraft:
milestone: none → 2.8.5
importance: Undecided → Medium
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

I can reliably reproduce this (5/5 times so far) when uploading a snap that's 3.5MB from New Zealand (I mention this since vila believes it's tied in some way to the connection age).

Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Changed in snapcraft:
status: In Progress → Fix Committed
Changed in snapcraft:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package snapcraft - 2.8.8

---------------
snapcraft (2.8.8) yakkety; urgency=medium

  * Create the 'partial' directory for apt. (#499) (LP: #1578007)

 -- Sergio Schvezov <email address hidden> Wed, 04 May 2016 14:22:58 -0300

Changed in snapcraft (Ubuntu):
status: New → Fix Released
description: updated
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Vincent, or anyone else affected,

Accepted snapcraft into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/snapcraft/2.8.8b in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in snapcraft (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Leo Arias (elopio) wrote :

Tested in an up-to-date xenial system:
- enabled the proposed archive
- updated snapcraft to 2.8.8b
- registered a user in staging sso
- verified the email address
- logged in to staging myapps
- accepted the terms
- registered the snap name keepassx-elopio-20160513
- git clone https://github.com/elopio/snaps
- cd snaps/keepassx
- renamed the snap to keepassx-elopio-20160513
- set the staging env vars:
UBUNTU_SSO_API_ROOT_URL=https://login.staging.ubuntu.com/api/v2/
UBUNTU_STORE_API_ROOT_URL=https://myapps.developer.staging.ubuntu.com/dev/api/
UBUNTU_STORE_SEARCH_ROOT_URL=https://search.apps.staging.ubuntu.com/
UBUNTU_STORE_UPLOAD_ROOT_URL=https://upload.apps.staging.ubuntu.com/
- snapcraft login
- entered the credentials for the newly created user.
- snapcraft upload <name of the>.snap [3 times]
- verified that there are 4 versions of the snap in staging myapps.

2 of the updates showed an error message despite the snap reaching the store ok. I reported a new bug for that: bug #1581689

I'm marking the verification as done.

Thanks Chris!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package snapcraft - 2.8.8b

---------------
snapcraft (2.8.8b) xenial; urgency=medium

  [ Sergio Schvezov ]
  * Remove missing replacement for unittest.mock (#494) (LP: #1576998)
  * Create the 'partial' directory for apt. (#499) (LP: #1578007)
  * Don't fail if there is no system library list (#496) (LP: #1577750)
  * Don't clean target before extracting npm (#489) (LP: #1575876)
  * Don't delete the nodejs download on build. (#490) (LP: #1575882)

  [ Leo Arias ]
  * Import mock from unittest. (#492) (LP: #1576998)
  * autopkgtests: run the tests using the installed package (#464)
    (LP: #1570992)
  * Remove --allow-unauthenticated from examples tests (#482) (LP: #1573211)
  * Update the assertion of the example install (#483) (LP: #1573243)
  * Examples tests: Update the path to the snaps binaries (#484) (LP: #1573349)
  * Examples tests: use systemctl instead of the removed snap service (#485)
    (LP: #1573697)
  * Update the mosquitto example SNAP_USER_DATA path. (#486) (LP: #1574857)
  * Update the busybox test to use the snap data path. (LP: #1574901)
  * Remove the integration tests coverage. (#488) (LP: #1575383)

  [ Vincent Ladeuil ]
  * Make upload more robust by ignoring spurious errors while polling the
    scan status. (#480) (LP: #1572963)

  [ Kyle Fazzari ]
  * docs/get-started.md: Stop discussing snappy-tools. (#454) (LP: #1568113)

 -- Sergio Schvezov <email address hidden> Fri, 29 Apr 2016 14:59:47 -0300

Changed in snapcraft (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for snapcraft has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Newell Jensen (newell-jensen) wrote :

I am still hitting this error:

Uploading sage_7.2_amd64.snap.
Uploading sage_7.2_amd64.snap [ ] 0%
Uploading sage_7.2_amd64.snap [===========================================] 100%
There was an error uploading the package.
Reason: Proxy Error
Text: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>502 Proxy Error</title>
</head><body>
<h1>Proxy Error</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
The proxy server could not handle the request <em><a href="/unscanned-upload/">POST&nbsp;/unscanned-upload/</a></em>.<p>
Reason: <strong>Error reading from remote server</strong></p></p>
<hr>
<address>Apache/2.4.7 (Ubuntu) Server at upload.apps.ubuntu.com Port 443</address>
</body></html>

'dict' object has no attribute 'track'

$ snapcraft --version
2.13.1

The snap I am trying to upload is rather big (128 MB):

$ ls -l --block-size=M sage_7.2_amd64.snap
-rw-r--r-- 1 newell newell 1282M Aug 6 17:54 sage_7.2_amd64.snap

Revision history for this message
Sergio Schvezov (sergiusens) wrote : Re: [Bug 1572963] Re: snapcraft upload can fail while monitoring scan status

El 07/08/16 a las 16:38, Newell Jensen escribió:
> I am still hitting this error:

Can you please log a new bug for this one?
Thanks

>
> Uploading sage_7.2_amd64.snap.
> Uploading sage_7.2_amd64.snap [ ] 0%
> Uploading sage_7.2_amd64.snap [===========================================] 100%
> There was an error uploading the package.
> Reason: Proxy Error
> Text: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <html><head>
> <title>502 Proxy Error</title>
> </head><body>
> <h1>Proxy Error</h1>
> <p>The proxy server received an invalid
> response from an upstream server.<br />
> The proxy server could not handle the request <em><a href="/unscanned-upload/">POST&nbsp;/unscanned-upload/</a></em>.<p>
> Reason: <strong>Error reading from remote server</strong></p></p>
> <hr>
> <address>Apache/2.4.7 (Ubuntu) Server at upload.apps.ubuntu.com Port 443</address>
> </body></html>
>
> 'dict' object has no attribute 'track'
>
>
> $ snapcraft --version
> 2.13.1
>
> The snap I am trying to upload is rather big (128 MB):
>
> $ ls -l --block-size=M sage_7.2_amd64.snap
> -rw-r--r-- 1 newell newell 1282M Aug 6 17:54 sage_7.2_amd64.snap
>

Revision history for this message
Newell Jensen (newell-jensen) wrote :
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.