Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] RangeError (end): Invalid value: Not in inclusive range 0..1: -3 #203

Closed
gslender opened this issue Jun 3, 2023 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@gslender
Copy link

gslender commented Jun 3, 2023

Running msix 3.14.0 on a cmd line I get this... ??

But I think this is because I have fvm folder present in the project, but the windows host isn't configured (yet) for fvm. I wasn't actually planning to use it that way as its the CI/CD machine that doesn't need to switch flutter versions all the time - so fvm isn't installed. If that's the reason for the below error, is it possible to add a --ignore_fvm switch to allow the library to run / build without following the .fvm folder configurations?

Building package executable... (3.5s)
Built msix:create.
Unhandled exception:
RangeError (end): Invalid value: Not in inclusive range 0..1: -3
#0      RangeError.checkValidRange (dart:core/errors.dart:365:9)
#1      List.sublist (dart:core-patch/growable_array.dart:84:38)
#2      WindowsBuild.build (package:msix/src/windows_build.dart:27:19)
#3      Msix._buildMsixFiles (package:msix/msix.dart:103:52)
#4      Msix._createMsix (package:msix/msix.dart:98:11)
#5      Msix.create (package:msix/msix.dart:57:11)
<asynchronous suspension>
#6      main (file:///C:/Users/gslen/AppData/Local/Pub/Cache/hosted/pub.dev/msix-3.14.0/bin/create.dart:4:3)
<asynchronous suspension>
The system cannot find the path specified.
@YehudaKremer
Copy link
Owner

Hello @gslender

Tanks you for reporting this bug 👍

I published new version (3.14.1) with a fix,
please see if its solve the problem.

@YehudaKremer YehudaKremer reopened this Jun 3, 2023
@YehudaKremer YehudaKremer added the bug Something isn't working label Jun 3, 2023
@YehudaKremer
Copy link
Owner

@Tienisto hey 😄

Maybe on CI/CD machines sometime the Dart and Flutter are positioned is unexpected locations.

I added a fallback and validation to the Flutter path resolution here: 7e92155#diff-d8263713a1bc11d9abc4d48bcd3ae36df8d88dcd470930b4af97433eefa03166

Please take a look if you have time,
Thanks 🙏

@Tienisto
Copy link
Contributor

Tienisto commented Jun 3, 2023

Alright, your proposed fix looks good 👍

@YehudaKremer
Copy link
Owner

Hello @gslender

We publish a fix in version 3.14.1, please update if the problem reproduces.

Thank you 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants