Snapcraft clean failing

I am trying to clean a part with python2 plugin which is failing with FileNotFoundError for random files. The whole chain was working fine earlier but with the latest versions of snapcraft and snadp I am facing this issue. Running snapcraft clean works fine but if I run snapcraft clean <par> -s <step> fails.

$ snapcraft clean -s pull mysnap-part
Cleaning priming area for mysnap-part
Sorry, Snapcraft ran into an error when trying to running through its
lifecycle that generated the following traceback:
Traceback (most recent call last):
 File "/usr/bin/snapcraft", line 9, in <module>
   load_entry_point('snapcraft==2.42.1', 'console_scripts', 'snapcraft')()
 File "/usr/lib/python3/dist-packages/click/core.py", line 716, in __call__
   return self.main(*args, **kwargs)
 File "/usr/lib/python3/dist-packages/click/core.py", line 696, in main
   rv = self.invoke(ctx)
 File "/usr/lib/python3/dist-packages/click/core.py", line 1060, in invoke
   return _process_result(sub_ctx.command.invoke(sub_ctx))
 File "/usr/lib/python3/dist-packages/click/core.py", line 889, in invoke
   return ctx.invoke(self.callback, **ctx.params)
 File "/usr/lib/python3/dist-packages/click/core.py", line 534, in invoke
   return callback(*args, **kwargs)
 File "/usr/lib/python3/dist-packages/snapcraft/cli/lifecycle.py", line 183, in clean
   lifecycle.clean(project_options, parts, step)
 File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle/_clean.py", line 195, in clean
   _clean_parts(parts, step, config, staged_state, primed_state)
 File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle/_clean.py", line 87, in _clean_parts
   part_name, step, config, staged_state, primed_state)
 File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle/_clean.py", line 50, in _clean_part_and_all_dependents
   config.parts.clean_part(part_name, staged_state, primed_state, step)
 File "/usr/lib/python3/dist-packages/snapcraft/internal/project_loader/_parts_config.py", line 153, in clean_part
   part.clean(staged_state, primed_state, step)
 File "/usr/lib/python3/dist-packages/snapcraft/internal/pluginhandler/__init__.py", line 758, in clean
   step, hint)
 File "/usr/lib/python3/dist-packages/snapcraft/internal/pluginhandler/__init__.py", line 790, in _clean_steps
   self.clean_prime(project_primed_state, hint)
 File "/usr/lib/python3/dist-packages/snapcraft/internal/pluginhandler/__init__.py", line 677, in clean_prime
   project_primed_state)
 File "/usr/lib/python3/dist-packages/snapcraft/internal/pluginhandler/__init__.py", line 699, in _clean_shared_area
   shared_directory)
 File "/usr/lib/python3/dist-packages/snapcraft/internal/pluginhandler/__init__.py", line 955, in _clean_migrated_files
   os.remove(os.path.join(directory, snap_file))
FileNotFoundError: [Errno 2] No such file or directory:
 $ snap version
snap    2.34.2
snapd   2.34.2
series  16
ubuntu  16.04
kernel  4.4.0-131-generic

$snapcraft --version
snapcraft, version 2.42.1

there seems to be the last line missing from your paste … that should technically point to the file it tries to delete and can not…

That line is points to different file everytime the command is run.

Do the files it complains about exist?

It should ,for those are the files that are installed previously by snapcraft command. I will confirm in any case.