Unexpected null value in HomeWidget / firebase_auth_manager.dart after navigating back from external payment (Mercado Pago) โ€” only on Web

Troubleshooting

I have a purchase flow where the user pays externally via Mercado Pago (opened with Launch URL), lands on a "PaymentSuccess" page, and on tapping "Accept" the app clears some App State values and navigates to Home (Logged In Page) using Navigate To with Replace Route.

The error:

Unexpected null value.
The relevant error-causing widget was: HomeWidget
Stack trace:
...
nullCheck
package:[my_app]/auth/firebase_auth/firebase_auth_manager.dart ... build
package:flutter/src/widgets/unique_widget.dart.js ... build/performRebuild/rebuild/update/updateChild
...
What have you tried so far?
  • Home loads perfectly fine under normal navigation (menu, back button) โ€” it only crashes after this specific external-payment round trip.

  • The crash happens both in FlutterFlow Test Mode and in the published production build (production console shows the generic minified version: Null check operator used on a null value).

  • Not caused by App State clearing (Clear Value on non-nullable fields) โ€” ruled out, values are nullable and correctly typed.

  • Not caused by a forced "Rebuild Current Page" update type stacking with navigation โ€” removed it, crash persisted.

  • Not caused by stale navigation stack โ€” turned on Replace Route on the navigation into PaymentSuccess, crash persisted.

  • Not caused by a Custom Action / component with unset parameters โ€” checked the only relevant component instance on Home, parameters are correctly set.

  • A fixed 2-second Wait before navigating to Home did NOT fix it, which argues against a simple auth-token-refresh timing race, though the stack trace still consistently points to firebase_auth_manager.dart's nullCheck during HomeWidget's build.

Did you check FlutterFlow's Documentation for this topic?
No
1
2 replies