Uploading a new version results in an error page



Developer Pages
4 years ago
3 years ago


(Reporter: gerard, Unassigned)




(Whiteboard: [incorrect_implementation])



4 years ago
While uploading a new version of my application, I get redirected at the end on the status page. As of today, this page displays as an error page stating that something bad happened. Not anymore information is available.

Upload itself seems to have complete successfully, the new app is visible and waiting for review.


IOError: [Errno 2] No such file or directory: '/mnt/netapp/mkt.prod/addons.mozilla.org/files/temp/9c38c75451d741d38aa155d69e18c7df.zip'

Stacktrace (most recent call last):

  File "django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "amo/decorators.py", line 157, in wrapper
    return f(*args, **kw)
  File "amo/decorators.py", line 149, in wrapper
    return f(*args, **kw)
  File "addons/decorators.py", line 33, in wrapper
    return f(request, addon, *args, **kw)
  File "amo/decorators.py", line 32, in wrapper
    return func(request, *args, **kw)
  File "mkt/developers/decorators.py", line 49, in wrapper
    return fun()
  File "mkt/developers/decorators.py", line 28, in <lambda>
    *args, **kw)
  File "mkt/developers/views.py", line 223, in status
    elif 'upload-version' in request.POST and upload_form.is_valid():
  File "django/forms/forms.py", line 124, in is_valid
    return self.is_bound and not bool(self.errors)
  File "django/forms/forms.py", line 115, in _get_errors
  File "django/forms/forms.py", line 271, in full_clean
  File "django/forms/forms.py", line 299, in _clean_form
    self.cleaned_data = self.clean()
  File "mkt/submit/forms.py", line 196, in clean
    pkg = parse_addon(data['upload'], self.addon)
  File "files/utils.py", line 515, in parse_addon
    parsed = WebAppParser().parse(pkg)
  File "files/utils.py", line 255, in parse
    data = self.get_json_data(fileorpath)
  File "files/utils.py", line 227, in get_json_data
    file_ = get_file(fileorpath)
  File "files/utils.py", line 63, in get_file
    return storage.open(fileorpath.path)
  File "django/core/files/storage.py", line 33, in open
    return self._open(name, mode)
  File "amo/utils.py", line 937, in _open
    return super(LocalFileStorage, self)._open(name, mode=mode)
  File "django/core/files/storage.py", line 156, in _open
    return File(open(self.path(name), mode))
In sentry, we can see that this happens from time to time (last error sentry has is on August 11, and there are 132 occurences in total).

I don't quite understand how the new version can be saved (comment 0 indicates that the version is visible and ready for review) since the error occurs when checking upload_form.is_valid(), which happens before the Version.from_upload() calls which creates/saves the Version instance.
Is this reproducible?

Comment 4

4 years ago
(In reply to Wil Clouser [:clouserw] from comment #3)
> Is this reproducible?

I uploaded a packaged app and added versions to it without any issue. But I have previously seen the IOError during upload.

Comment 5

4 years ago
FYI I just uploaded v1.4.2 of my Fil@Tours app, and once again got the error. This is not intermittent at all for me, it's always there.
The file appears to be appropriately associated with the app's version, so it's not blocking. I'm going to mark as a P3.
Priority: -- → P3
v1.4.2 is live on the site so the file gets there eventually, but yeah, we shouldn't be erroring


4 years ago
Whiteboard: [incorrect_implementation]
:gerard-majax: super old issue, does this still happen for you ? I think the transaction changes made in bug 1076949 should have helped these kind of weird issues.
Flags: needinfo?(lissyx+mozillians)

Comment 9

3 years ago
I have no way to tell for now, so I'll close as WORKSFORME.
Last Resolved: 3 years ago
Flags: needinfo?(lissyx+mozillians)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.