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

Error on startup "Unhandled Exception: Bad state: No element" #21

Closed
Roms1383 opened this issue Sep 4, 2022 · 1 comment
Closed

Error on startup "Unhandled Exception: Bad state: No element" #21

Roms1383 opened this issue Sep 4, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@Roms1383
Copy link

Roms1383 commented Sep 4, 2022

Hi and thanks for this library, I've started using it a couple of days ago and it saves quite some time.
I stumbled upon a weird error on startup though :

E/flutter ( 5198): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: Bad state: No element
E/flutter ( 5198): #0      List.last (dart:core-patch/growable_array.dart:348:5)
E/flutter ( 5198): #1      RNavigatorCore.navigatePath (package:riverpod_navigator_core/src/navigator.dart:97:30)
E/flutter ( 5198): #2      RNavigatorCore.navigate (package:riverpod_navigator_core/src/navigator.dart:100:41)
E/flutter ( 5198): #3      RRouterDelegate.setNewRoutePath (package:riverpod_navigator/src/routeDelegate.dart:37:22)
E/flutter ( 5198): #4      RouterDelegate.setInitialRoutePath (package:flutter/src/widgets/router.dart:1171:12)
E/flutter ( 5198): #5      _RouterState._processParsedRouteInformation.<anonymous closure> (package:flutter/src/widgets/router.dart:636:34)
E/flutter ( 5198): #6      _RouterState._processParsedRouteInformation.<anonymous closure> (package:flutter/src/widgets/router.dart:632:12)
E/flutter ( 5198): #7      _rootRunUnary (dart:async/zone.dart:1434:47)
E/flutter ( 5198): #8      _CustomZone.runUnary (dart:async/zone.dart:1335:19)
E/flutter ( 5198): <asynchronous suspension>

I don't really know if e.g. I could have made a mistake on my providers but looking at the logs it seems that it points to riverpod_navigator, hence why I thought it might be worth reporting. Otherwise it doesn't crash the application, it just appears on every startup, so it's no really serious.

My environment

$ flutter doctor
[✓] Flutter (Channel stable, 3.0.5, on macOS 12.4 21F79 darwin-arm, locale en-TH)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.71.0)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

• No issues found!

Thanks!

@PavelPZ PavelPZ added the bug Something isn't working label Sep 16, 2022
@PavelPZ
Copy link
Owner

PavelPZ commented Sep 17, 2022

Solved

@PavelPZ PavelPZ closed this as completed Sep 17, 2022
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

2 participants