Snapcraft upload error

Snapcraft upload fails with an unknown error:

$ snapcraft upload --release=stable argos-translate_1.6.1_amd64.snap
Preparing to upload 'argos-translate_1.6.1_amd64.snap'.
After uploading, the resulting snap revision will be released to 'stable' when it passes the Snap Store review.
Running the review tools before pushing this snap to the Snap Store.
Sorry, an error occurred in Snapcraft:
Command '['/snap/bin/review-tools.snap-review', PosixPath('/home/argosopentech/snap/review-tools/common/argos-translate_1.6.1_amd64.snap'), '--json', '--allow-classic']' returned non-zero exit status 1.
We would appreciate it if you anonymously reported this issue.
No other data than the traceback and the version of snapcraft in use will be sent.
Would you like to send this error data? (Yes/No/Always/View) [no]: 
You can find the traceback in file '/tmp/tmp9u_5aub3/trace.txt'.
$ cat /tmp/tmp9u_5aub3/trace.txt
Traceback (most recent call last):
  File "/snap/snapcraft/7010/bin/snapcraft", line 8, in <module>
    sys.exit(run())
  File "/snap/snapcraft/7010/lib/python3.8/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/snap/snapcraft/7010/lib/python3.8/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/snap/snapcraft/7010/lib/python3.8/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/snap/snapcraft/7010/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/snap/snapcraft/7010/lib/python3.8/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/snap/snapcraft/7010/lib/python3.8/site-packages/snapcraft/cli/store.py", line 179, in upload
    review_snap(snap_file=snap_file)
  File "/snap/snapcraft/7010/lib/python3.8/site-packages/snapcraft/cli/_review.py", line 34, in review_snap
    review_tools.run(snap_filename=snap_file)
  File "/snap/snapcraft/7010/lib/python3.8/site-packages/snapcraft/internal/review_tools/_runner.py", line 47, in common_decorator
    method(snap_filename=snap_filename_common_path)
  File "/snap/snapcraft/7010/lib/python3.8/site-packages/snapcraft/internal/review_tools/_runner.py", line 68, in run
    subprocess.check_output(command, stderr=subprocess.STDOUT, env=env)
  File "/snap/snapcraft/7010/usr/lib/python3.8/subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/snap/snapcraft/7010/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/snap/bin/review-tools.snap-review', PosixPath('/home/argosopentech/snap/review-tools/common/argos-translate_1.6.1_amd64.snap'), '--json', '--allow-classic']' returned non-zero exit status 1.

I think this was caused by not incrementing the version number in snapcraft.yaml and attempting to upload a version that already existed.

This is likely the same issue as I fixed here

Autotools Plugin (v1): Fix fatal crash when running autogen.sh or bootstrap by diddledani · Pull Request #3628 · snapcore/snapcraft (github.com)

cc: @cmatsuoka @sergiusens

1 Like