You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use a debug build so you can see errors printed to the console
Log into an account
Log out of the account ("Choose account" > three-dots menu > "Log out")
See the following in the console:
======== Exception caught by widgets library =======================================================
The following _TypeError was thrown building _LoadingPlaceholderPage(dirty, dependencies: [_GlobalStoreInheritedWidget, _LocalizationsScope-[GlobalKey#c7674]], state: _LoadingPlaceholderPageState#4549b):
Null check operator used on a null value
The relevant error-causing widget was:
_LoadingPlaceholderPage _LoadingPlaceholderPage:file:///Users/chrisbobbe/dev/zulip-flutter/lib/widgets/home.dart:36:31
When the exception was thrown, this was the stack:
#0 _LoadingPlaceholderPageState.build (package:zulip/widgets/home.dart:184:36)
#1 StatefulElement.build (package:flutter/src/widgets/framework.dart:5841:27)
#2 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5733:15)
#3 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5892:11)
#4 Element.rebuild (package:flutter/src/widgets/framework.dart:5445:7)
#5 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5715:5)
#6 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5883:11)
#7 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5709:5)
This is a latent bug introduced in a97ac42 (fyi @PIG208). This widget shouldn't assume that an account for its accountId param exists; in particular, it won't exist in the short period after the account is removed from the database (for logout) and before routeToRemoveOnLogout is processed in a post-frame callback.
I see two plausible fixes:
Remove the accountId param and pass…hmm, I guess a realmUrl param, for the "try another account" message. Or:
Keep the accountId param but give it dartdoc with a reminder that the corresponding account might not exist, saying why.
In either case we should add a test that would fail before the fix but passes after it.
The text was updated successfully, but these errors were encountered:
To reproduce:
This is a latent bug introduced in a97ac42 (fyi @PIG208). This widget shouldn't assume that an account for its
accountId
param exists; in particular, it won't exist in the short period after the account is removed from the database (for logout) and beforerouteToRemoveOnLogout
is processed in a post-frame callback.I see two plausible fixes:
accountId
param and pass…hmm, I guess arealmUrl
param, for the "try another account" message. Or:accountId
param but give it dartdoc with a reminder that the corresponding account might not exist, saying why.In either case we should add a test that would fail before the fix but passes after it.
The text was updated successfully, but these errors were encountered: