FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
127 stars 26 forks source link

GoRouter Navigator Returning Null #3727

Closed Dev-Muhammad-Junaid closed 2 months ago

Dev-Muhammad-Junaid commented 2 months ago

Can we access your project?

Current Behavior

Tried adding a navigation and the page crashes with Unexpected Null Value, Removed the Page Parameter, Backend Queries and anything related tk backend calls, Still the page crashed.

Expected Behavior

.

Steps to Reproduce

  1. Login (email + pass provided in video)
  2. Got to 2nd Page
  3. Click to 3rd Page
  4. Error Persists

Reproducible from Blank

Bug Report Code (Required)

IT5Xz8r13ItPvsdG7ZD+KcJV9SU5Jkw4apZM0MFqEQA1F4/nPOwld87+T3BZOMu6dFZUP2GJmm0e/vOMks71EMA4BByJbN1qzrt5Fj3iIUS6RpiSEZGwYnwnO+9hf2rDzpuZghZNCPdac3wk3FOtNujISnbZJI+wIm07HvL+NtvX+ny9GB+/Gn0Jg1ZSfCvr

Visual documentation

TrustedTypes available. Creating policy: gis-dart
main.dart.js:74213 TrustedTypes available. Creating policy: flutterfire-firebase_core
 Initializing Firebase firebase_core
main.dart.js:74213 TrustedTypes available. Creating policy: flutterfire-firebase_firestore
 Initializing Firebase firebase_firestore
main.dart.js:74213 TrustedTypes available. Creating policy: flutterfire-firebase_auth
 Initializing Firebase firebase_auth
main.dart.js:74213 TrustedTypes available. Creating policy: flutterfire-firebase_performance
 Initializing Firebase firebase_performance
main.dart.js:74213 TrustedTypes available. Creating policy: flutterfire-firebase_storage
 Initializing Firebase firebase_storage
main.dart.js:47041 Null check operator used on a null value
main.dart.js:47041     at aSQ.a1 (https://storage.googleapis.com/flutterflow-io-6f20.

appspot.com/build_outputs/the-probation-app-v4-1-u2og1r/web/zjai0M7mLGSNUCahOkZa/main.dart.js:162721:3)
main.dart.js:47041     at mM.RE (https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/build_outputs/the-probation-app-v4-1-u2og1r/web/zjai0M7mLGSNUCahOkZa/main.dart.js:115172:14)
main.dart.js:47041     at mM.jh (https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/build_outputs/the-probation-app-v4-1-u2og1r/web/zjai0M7mLGSNUCahOkZa/main.dart.js:115142:6)
main.dart.js:47041     at akm.AB (https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/build_outputs/the-probation-app-v4-1-u2og1r/web/zjai0M7mLGSNUCahOkZa/main.dart.js:115008:3)
main.dart.js:47041     at akm.ic (https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/build_outputs/the-probation-app-v4-1-u2og1r/web/zjai0M7mLGSNUCahOkZa/main.dart.js:114912:16)
main.dart.js:47041     at akm.jh (https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/build_outputs/the-probation-app-v4-1-u2og1r/web/zjai0M7mLGSNUCahOkZa/main.dart.js:115296:8)
main.dart.js:47041     at a9b.AB (https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/build_outputs/the-probation-app-v4-1-u2og1r/web/zjai0M7mLGSNUCahOkZa/main.dart.js:115008:3)
main.dart.js:47041     at a9b.ic (https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/build_outputs/the-probation-app-v4-1-u2og1r/web/zjai0M7mLGSNUCahOkZa/main.dart.js:114912:16)
main.dart.js:47041     at a9b.o2 (https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/build_outputs/the-probation-app-v4-1-u2og1r/web/zjai0M7mLGSNUCahOkZa/main.dart.js:115149:31)
main.dart.js:47041     at a9b.NZ (https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/build_outputs/the-probation-app-v4-1-u2og1r/web/zjai0M7mLGSNUCahOkZa/main.dart.js:115095:10)

https://github.com/user-attachments/assets/ff964a11-276e-44ed-bea2-0957e67f6c22

Environment

- FlutterFlow v4.1.85+ released August 30, 2024
- Platform: Web, Mac
- Browser name and version: Chrome
- Operating system and version affected: MacOS

Additional Information

Tested on Both Local Run + Web and

rzambroni commented 2 months ago

Hey @Dev-Muhammad-Junaid, thanks for the report.


As far as i could see the button you are pressing doesn't have a valid navigation action attached to it. (see screenshot)

image.png

And this is confirmed by looking at the code:

image.png

Not sure how it ended up like that, but the onPressed callback is currently empty (onPressed: () async {}), which means the button isn't performing any action. This could potentially lead to issues, especially if there's an expectation for it to navigate to another screen.

Make sure to add a valid navigation action, and that should resolve the issue.

Thanks!