Open jtdLab opened 1 year ago
Hi @jtdLab 👋 Thanks for opening an issue!
What is the value of the foo
variable in this case? Can you please provide a link to a minimal reproduction sample? Thanks!
Checkout the repo:
https://github.com/jtdLab/mason_windows_failure
Hint: the repo contains a github action run which illustrates the problem (mason generation fails on windows and completes on linux.)
Hope that helps
@felangel
@felangel facing the same problem on Windows 10.
FileSystemException: Directory listing failed, path = 'C:/Users/Stefan/AppData/Local/Mason/Cache/git/mason_bricks_aHR0cHM6Ly9naXRodWIuY29tL2thY2l1bGEvbWFzb25fYnJpY2tz_b7a40356a469ad04579114864c70650cd4f12a50/app\__brick__\{{ projectName.lowerCase() }}\lib\features\common\data\local\{{#useHive}}locvbWFzb25fYnJpY2tz_b7a40356a469ad04579114864c70650cd4f12a50/app\__brical_store.dart{{\*' (OS Error: The system cannot find the path specified. ied. , errno = 3)
@jtdLab @stcojo sorry for the delay (I was not able to get to this during the holiday break). I'm planning to take a closer look later today and hopefully get a fix for this very soon. Sorry for the inconvenience!
@jtdLab can you re-test using the master branch of mason and regenerate the bundle?
@felangel im sry but looks like the error seems to be still around after regenerating the bundle.
@felangel I think the error is caused by the Maximum Path Length Limitation in the Windows API
@jtdLab apologies for the delay. I finally tried to reproduce the issue on a windows machine and was not able to reproduce using the latest version of mason. Can you please re-test using the latest version and let me know if this is still an issue for you? Thanks!
@felangel i simplified the example at https://github.com/jtdLab/mason_windows_failure the action run illustrates the problem.
@felangel Problem still persists after updating to Updated to 0.1.0-dev.50
@felangel any updates on this?
@jtdLab apologies for the delay! I need to get my hands on a windows machine (should hopefully be able to pick one up this weekend).
@felangel I think the error is caused by the Maximum Path Length Limitation in the Windows API
@felangel This might help.
I'm facing a similar issue on Windows 10. I'm using mason's version 0.1.0-dev.50.
I just got a windows machine yesterday so I will finally look at this more closely later today. Sorry for the inconvenience!
@felangel Doesn't path
package resolve this issue?
Any updates on this @felangel ? thanks
I was facing the same issue
The odd thing was that the paths were not congruent
After debugging the mason_cli
locally, I found that the root cause is related to the cache.
In my case, this bug seemed to be triggered when I moved the brick directory to another nested location.
Since I was working on a globally added local brick, I just run mason remove -g <my_brick>
and I didn't struggle with the issue again. I guess the same applies to mason cache clear
.
Alright I think we have a related ticket on very_good_flutter_plugin
that can quickly reproduce the issue. For all the details take a look at https://github.com/VeryGoodOpenSource/very_good_flutter_plugin/issues/144
Steps to Reproduce
dart pub global activate very_good_cli
dart pub global activate mason_cli
mason add -g very_good_flutter_plugin
Pretty quickly you get the same error message
PathNotFoundException: Directory listing failed, path = 'C:/Users/Tom Arra/AppData/Local/Mason/Cache/hosted/registry.brickhub.dev/very_good_flutter_plugin_0.6.0\__brick__\{{project_name.snakeCase()}}\{{project_name.snakeCase()}}\example\{{#android}}android{{\android}}\app\src\main\kotlin\com\example\{{project_name.snakeCase()}}\*' (OS Error: The system cannot find the path specified.
Alright I think we have a related ticket on
very_good_flutter_plugin
that can quickly reproduce the issue. For all the details take a look at VeryGoodOpenSource/very_good_flutter_plugin#144Steps to Reproduce
dart pub global activate very_good_cli
dart pub global activate mason_cli
mason add -g very_good_flutter_plugin
Pretty quickly you get the same error message
PathNotFoundException: Directory listing failed, path = 'C:/Users/Tom Arra/AppData/Local/Mason/Cache/hosted/registry.brickhub.dev/very_good_flutter_plugin_0.6.0\__brick__\{{project_name.snakeCase()}}\{{project_name.snakeCase()}}\example\{{#android}}android{{\android}}\app\src\main\kotlin\com\example\{{project_name.snakeCase()}}\*' (OS Error: The system cannot find the path specified.
Awesome I’ll have a look asap, thanks!
any progress on this? I am facing this issue on Windows 11. This is keeping us from using mason to install new bricks from github
Description
/
that are part of the closing tokens aka{{/foo}}
get converted to a\
on windows when used in path.Steps To Reproduce
__brick__/{{#foo}}boom/baam/booz{{/foo}}/README.md
Expected Behavior README.md should be generated at location
boom\baam\booz\
if foo is trueBut instead the
/
from{{/foo}}
gets convertet to a\
and leads to an errorOS Error: The system cannot find the path specified