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] Unhandled arguments cause program to fail on launch #42

Closed
NICHOLAS85 opened this issue Jul 1, 2021 · 2 comments
Closed

[BUG] Unhandled arguments cause program to fail on launch #42

NICHOLAS85 opened this issue Jul 1, 2021 · 2 comments
Labels
bug Something isn't working confirmed This bug is confirmed as an issue in Nyrna

Comments

@NICHOLAS85
Copy link

Describe the bug
If you were to pass an argument that isn't currently handled by Nyrna you'll end up with a blank application window and an error in your console.

To Reproduce
Pass an argument to Nyrna and view its output. For example nyrna --help

Expected behavior
For Nyrna to exit gracefully with an error message indicating that argument is unknown

Screenshots
image

$ ./Nyrna-latest-x86_64.AppImage --help
Gtk-Message: 10:31:34.778: Failed to load module "colorreload-gtk-module"
Gtk-Message: 10:31:34.778: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 10:31:34.779: Failed to load module "appmenu-gtk-module"
flutter: Unknown argument: FormatException: Could not find an option named "help".
[ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: NoSuchMethodError: The method 'wasParsed' was called on null.
Receiver: null
Tried calling: wasParsed()
#0      ArgumentParser._checkToggleFlag (package:nyrna/arguments/argument_parser.dart:61)
#1      ArgumentParser._parse (package:nyrna/arguments/argument_parser.dart:46)
#2      ArgumentParser.init (package:nyrna/arguments/argument_parser.dart:21)
#3      parseArgs (package:nyrna/main.dart:34)
#4      main (package:nyrna/main.dart:19)
#5      _runMainZoned.<anonymous closure>.<anonymous closure> (dart:ui/hooks.dart:140)
#6      _rootRun (dart:async/zone.dart:1354)
#7      _CustomZone.run (dart:async/zone.dart:1258)
#8      _runZoned (dart:async/zone.dart:1789)
#9      runZonedGuarded (dart:async/zone.dart:1777)
#10     _runMainZoned.<anonymous closure> (dart:ui/hooks.dart:138)
#11     _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:283)
#12     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184)

Software (please complete the following information):

  • OS: Bedrock Linux 0.7.20 Poki, Arch and Debian strata
  • Destop Environment: KDE 5.20.5

Great work on Nyrna btw! Quite a handy tool

@Merrit
Copy link
Owner

Merrit commented Jul 1, 2021

Thanks for the issue! Can confirm on my end & will queue for a fix 👍

@Merrit Merrit added bug Something isn't working confirmed This bug is confirmed as an issue in Nyrna labels Jul 1, 2021
@Merrit
Copy link
Owner

Merrit commented Jul 20, 2021

Thanks again for the report 😄

This is fixed with b1db01a

The fix is available as a pre-release https://github.com/Merrit/nyrna/releases/tag/v2.1.0-beta.3

@Merrit Merrit closed this as completed Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed This bug is confirmed as an issue in Nyrna
Projects
None yet
Development

No branches or pull requests

2 participants