Snap fails to build for store because of dirty builds

My snap builds fine with a clean build, but the store tries to build a non clean version it looks like from the logs.

Can I force clean builds?

For more details, my snap fails to build unless clean because of this issue on snapcraft:

The snap with the issue is:

When you say the store, do you mean If so, that always performs builds in a clean environment. Can you link to a build log that shows the issue?

Yeah, I mean I wasn’t sure which category was right for my issue.

It seems the build is using a build artifact from a previous build. Maybe I’m missing something. Locally, if I do a snapcraft clean and then snapcraft I don’t get any errors and the build produces a working snap.

Here is the build link and the error I’m seeing.

Fetched 0 B in 0s (0 B/s)
Updating pull step for joinmarket (source changed)
Obtaining file:///build/joinmarket/jmbase (from -r /build/joinmarket/parts/joinmarket/build/requirements/base.txt (line 1))
The file ./parts/joinmarket/python-packages/ exists. (i)gnore, (w)ipe, (b)ackup, (a)bort ERROR: Exception:
Traceback (most recent call last):
  File "/build/joinmarket/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/cli/", line 186, in _main
    status =, args)
  File "/build/joinmarket/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/commands/", line 135, in run
  File "/build/joinmarket/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/", line 177, in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set, req))
  File "/build/joinmarket/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/", line 333, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/build/joinmarket/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/", line 265, in _get_abstract_dist_for
    return self.preparer.prepare_editable_requirement(req)
  File "/build/joinmarket/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/operations/", line 559, in prepare_editable_requirement
  File "/build/joinmarket/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/req/", line 721, in archive
    display_path(archive_path), ('i', 'w', 'b', 'a'))
  File "/build/joinmarket/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/utils/", line 223, in ask_path_exists
    return ask(message, options)
  File "/build/joinmarket/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/utils/", line 241, in ask
    response = input(message)
EOFError: EOF when reading a line
Failed to run '/build/joinmarket/stage/usr/bin/python3 -m pip download --disable-pip-version-check --dest /build/joinmarket/parts/joinmarket/python-packages --requirement /build/joinmarket/parts/joinmarket/build/requirements/gui.txt': Exited with code 2.
Build failed
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/", line 266, in run
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/", line 255, in build
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/", line 102, in run_build_command
    return, env=full_env, **kwargs)
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/", line 536, in run
    subprocess.check_call(cmd, **kwargs)
  File "/usr/lib/python2.7/", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['lxc', 'exec', 'lp-bionic-amd64', '--env', 'LANG=C.UTF-8', '--env', 'SHELL=/bin/sh', '--env', 'SNAPCRAFT_BUILD_INFO=1', '--env', 'SNAPCRAFT_IMAGE_INFO={"build-request-id": "lp-55096213", "build-request-timestamp": "2020-03-14T23:38:19Z", "build_url": ""}', '--env', 'SNAPCRAFT_BUILD_ENVIRONMENT=host', '--env', 'http_proxy=', '--env', 'https_proxy=', '--env', 'GIT_PROXY_COMMAND=/usr/local/bin/snap-git-proxy', '--', '/bin/sh', '-c', 'cd /build/joinmarket && linux64 snapcraft']' returned non-zero exit status 2
Revoking proxy token...
RUN: /usr/share/launchpad-buildd/bin/in-target scan-for-processes --backend=lxd --series=bionic --arch=amd64 SNAPBUILD-868774
Scanning for processes to kill in build SNAPBUILD-868774

The main relevant difference between what does and what running plain snapcraft does it that runs the pull phase separately before the rest of the build. Does running snapcraft pull before snapcraft reproduce the issue locally?

snapcraft pull works. snapcraft prompts with the following:

Updating pull step for joinmarket-requirements (source changed)
Obtaining file:///root/project/jmbase (from -r /root/parts/joinmarket-requirements/build/requirements/base.txt (line 1))
The file /root/parts/joinmarket-requirements/python-packages/ exists. (i)gnore, (w)ipe, (b)ackup, (a)bort

Obviously, the automated build cannot accept input. Is there a way to suppress the prompt?

have the exact same issue, I did a major update on my code and now I can’t build using git, how the heck do we force to always build clean?