Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

fix: making the plugin in Windows 11 fails with due to an unhandled exception #144

Closed
rekire opened this issue Jan 12, 2024 · 5 comments
Closed
Labels
bug Something isn't working as expected

Comments

@rekire
Copy link

rekire commented Jan 12, 2024

Description

I'm trying to use this brick(? I still doesn't get the naming) and I failed hard.

Steps To Reproduce

  1. I installed your cli with dart pub global activate very_good_cli
  2. I added as suggested the bin path to the PATH environment variable
  3. I installed that manson with dart pub global activate mason_cli (I have still no clue what this is or why I need it, you should explain it in the readme.md!)
  4. I tried to install your brick with mason add -g very_good_flutter_plugin which failed with the error at the screenshot section

Expected Behavior

That I can use your template without errors.

Screenshots

PathNotFoundException: Directory listing failed, path = 'C:\Users\<me>\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: Das System kann den angegebenen Pfad nicht finden.
, errno = 3)

The German error text is basically a 404: File not found.

Additional Context

I want to start over an OSS project with a clean federated plugin structure. The setup failed and is quiet bad (not very good). I ran the commands on Windows 11. I'm also quiet sure that "Make a new Wear OS app" is wrong I think it should be make a new flutter plugin or something similar. Does that brick creation step ask for the plugin name?

@rekire rekire added the bug Something isn't working as expected label Jan 12, 2024
@alestiago
Copy link
Contributor

Hi @rekire ! Thanks for making an issue.

The typo you mention in the README has now a matching Pull Request #145 that has been merged.

Regarding using this template I recommend using Very Good CLI, there are some docs to generate a Very Good Flutter Plugin with it.

I tried on MacOs and I was able to generate it successfully by:

very_good create flutter_plugin my_plugin

When you run the above using Windows does it fail?

Let me know if this helps 🙌

@rekire
Copy link
Author

rekire commented Jan 12, 2024

Hi @alestiago that also fails:

Unhandled exception:
PathNotFoundException: Directory listing failed, path = 'C:\Users\<me>\AppData\Local\Mason\Cache\bundled\very_good_flutter_plugin_0.6.0_93d44d76f01e4a6261badcd81162e13a0a619d47\__brick__\{{project_name.snakeCase()}}\{{#android}}{{project_name.snakeCase()}}_android{{\android}}\android\src\main\kotlin\{{org_name.pathCase()}}\*' (OS Error: Das System kann den angegebenen Pfad nicht finden.
, errno = 3)
#0      _Directory._fillWithDirectoryListing (dart:io-patch/directory_patch.dart:42:24)
#1      _Directory.listSync (dart:io/directory_impl.dart:233:5)
#2      MasonGenerator._fromBrick (package:mason/src/generator.dart:91:14)
#3      MasonGenerator.fromBundle (package:mason/src/generator.dart:70:27)
<asynchronous suspension>
#4      CreateSubCommand.run (package:very_good_cli/src/commands/create/commands/create_subcommand.dart:193:23)
<asynchronous suspension>
#5      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#6      VeryGoodCommandRunner.runCommand (package:very_good_cli/src/command_runner.dart:126:18)
<asynchronous suspension>
#7      VeryGoodCommandRunner.run (package:very_good_cli/src/command_runner.dart:72:14)
<asynchronous suspension>
#8      main (file:///C:/Users/<me>/AppData/Local/Pub/Cache/hosted/pub.dev/very_good_cli-0.19.1/bin/very_good.dart:5:24)
<asynchronous suspension>
Unhandled exception:
PathNotFoundException: Directory listing failed, path = 'C:\Users\<me>\AppData\Local\Mason\Cache\bundled\very_good_flutter_plugin_0.6.0_93d44d76f01e4a6261badcd81162e13a0a619d47\__brick__\{{project_name.snakeCase()}}\{{#android}}{{project_name.snakeCase()}}_android{{\android}}\android\src\main\kotlin\{{org_name.pathCase()}}\*' (OS Error: Das System kann den angegebenen Pfad nicht finden.
, errno = 3)
#0      _Directory._fillWithDirectoryListing (dart:io-patch/directory_patch.dart:42:24)
#1      _Directory.listSync (dart:io/directory_impl.dart:233:5)
#2      MasonGenerator._fromBrick (package:mason/src/generator.dart:91:14)
#3      MasonGenerator.fromBundle (package:mason/src/generator.dart:70:27)
<asynchronous suspension>
#4      CreateSubCommand.run (package:very_good_cli/src/commands/create/commands/create_subcommand.dart:193:23)
<asynchronous suspension>
#5      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#6      VeryGoodCommandRunner.runCommand (package:very_good_cli/src/command_runner.dart:126:18)
<asynchronous suspension>
#7      VeryGoodCommandRunner.run (package:very_good_cli/src/command_runner.dart:72:14)
<asynchronous suspension>
#8      main (file:///C:/Users/<me>/AppData/Local/Pub/Cache/hosted/pub.dev/very_good_cli-0.19.1/bin/very_good.dart:5:24)
<asynchronous suspension>

But I can confirm that this works on MacOS

@alestiago alestiago changed the title Cannot use this repo/plugin/template/brick fix: making the plugin in Windows 11 fails with due to an unhandled exception Jan 15, 2024
@alestiago
Copy link
Contributor

I think this is related to VeryGoodOpenSource/very_good_cli#728

@tomarra
Copy link
Contributor

tomarra commented Jan 29, 2024

Hi @rekire 👋 Thanks for opening this issue.

I was able to reproduce this on my Windows 11 install as well and @alestiago is correct but this is actually rooted in an issue on the Mason tool itself which seems to be tracked here felangel/mason#676

I'm going to keep this ticket open but move it to a Blocked status as this is something that we need Mason to fix so we can then unblock a few tickets on separate tools.

@alestiago
Copy link
Contributor

Hi @rekire 👋 ! Thanks for opening this issue 💙

We're moving this repository to Very Good Templates. Hence, I'm closing this issue. Could you open this new issue there? Otherwise, once we get to this and( if it still is a valid issue) we'll move the issue over for you.

@alestiago alestiago closed this as not planned Won't fix, can't repro, duplicate, stale Feb 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working as expected
Projects
Development

No branches or pull requests

3 participants