For assets that have their corresponding 2.0x/ variant, the transformer fails.
This may have something to do with the fact, that input and output paths is the same for all the resolution-aware variant files, command was ran with these params for logo_dark.png, 2.0x/logo_dark.png, and 3.0x/logo_dark.png:
Change transformer args in example/pubspec.yaml to '--z=9', '--from_path' (so that the transformation takes enough time for the bug to occur.
When created an 2.0x/example_image.png in the example project inside this repository and building Web, this is the error output:
Target web_release_bundle failed: PathNotFoundException: Cannot copy file to 'build/web/assets/assets/images/2.0x/example_image.png', path = '/var/folders/mh/n8gr4_w94sndpqg3619xhxxh0000gn/T/flutter_tools.81PVsJ/example_image.png-transformOutput1.png' (OS Error: No such file or
directory, errno = 2)
So because the source and output files are the same, Flutter CLI also tries to copy the same file more than once which fails for all attempts except for the first one.
For assets that have their corresponding
2.0x/
variant, the transformer fails.This may have something to do with the fact, that input and output paths is the same for all the resolution-aware variant files, command was ran with these params for
logo_dark.png
,2.0x/logo_dark.png
, and3.0x/logo_dark.png
:Reproduce
Change transformer args in
example/pubspec.yaml
to'--z=9', '--from_path'
(so that the transformation takes enough time for the bug to occur.When created an
2.0x/example_image.png
in theexample
project inside this repository and building Web, this is the error output:So because the source and output files are the same, Flutter CLI also tries to copy the same file more than once which fails for all attempts except for the first one.