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
{{ message }}
Repository navigation
[Hold for payment 5/7] Blank screen after creating an account #2497
As per my comment here #2346 (comment) this was traced to a call for Navigation while the navigation component have no navigators (stacks or other) mounted. This would result in the error printed on the console "Error: The 'navigation' object hasn't been initialized yet."
This issue occurs only during initialization.
While navigation is not yet ready an incoming call can be captured and scheduled for when the navigator components mount. This would be shortly after the call. As @marcaaron suggested here: #2346 (comment)
Allow NavigationContainer to initialize with no report
React to the NavigationContainer.onReady event and perform execute any captured navigation action
The navigate function here can be stubbed while Navigation is not yet ready:
@arielgreen can we get some help creating a job here? No need to add Exported label as I've already triaged this one and @kidroca has a good solution. Thanks!
Activity
kidroca commentedon Apr 20, 2021
@marcaaron This is a follow up on the problem discovered in #2346 (comment)
Proposal
As per my comment here #2346 (comment) this was traced to a call for Navigation while the navigation component have no navigators (stacks or other) mounted. This would result in the error printed on the console "Error: The 'navigation' object hasn't been initialized yet."
This issue occurs only during initialization.
While navigation is not yet ready an incoming call can be captured and scheduled for when the navigator components mount. This would be shortly after the call. As @marcaaron suggested here: #2346 (comment)
NavigationContainerto initialize with no reportNavigationContainer.onReadyevent and perform execute any captured navigation actionThe
navigatefunction here can be stubbed while Navigation is not yet ready:https://github.com/Expensify/Expensify.cash/blob/dba06b5ced71edc7ae1663179ca808162635b0fd/src/libs/Navigation/Navigation.js#L100-L105
Navigation.js
And then we call
enableNavigationhere:https://github.com/Expensify/Expensify.cash/blob/dba06b5ced71edc7ae1663179ca808162635b0fd/src/libs/Navigation/NavigationRoot.js#L37-L45
NavigationRoot.js
A note on
exports.navigate = navigate.Changing the implementation of
navigateduring runtime saves us from:navigatecode.Alternative
A simpler alternative is to just prevent navigation while it's not yet ready.
It is suggested by react navigation as a simple solution to the problem during initialization: https://reactnavigation.org/docs/navigating-without-navigation-prop/#handling-initialization
marcaaron commentedon Apr 20, 2021
Proposed solution makes sense to me. Let's do it!
Going to assign you and hand this off to a team member.
MelvinBot commentedon Apr 20, 2021
Triggered auto assignment to @arielgreen (
External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.marcaaron commentedon Apr 20, 2021
@arielgreen can we get some help creating a job here? No need to add
Exportedlabel as I've already triaged this one and @kidroca has a good solution. Thanks!kidroca commentedon Apr 22, 2021
Bump, I haven't started working on this as I'm not yet hired on Upwork
roryabraham commentedon Apr 23, 2021
Adding the
DeployBlockerCashlabel to this, @marcaaron if you disagree please remove the label.@arielgreen Making this a daily since it's preventing E.cash production deploy.
arielgreen commentedon Apr 23, 2021
Thanks @roryabraham!
@kidroca, I've just sent over an invite to the Upwork job.
kidroca commentedon Apr 23, 2021
@arielgreen
I've got nothing new in Upwork, are you sure you have the correct profile? This is it: https://www.upwork.com/o/profiles/users/~01afad6ac000e0322f/
arielgreen commentedon Apr 23, 2021
@kidroca yep, correct profile. Can you see this job?
[-]Blanks screen after creating an account[/-][+]Blank screen after creating an account[/+]marcaaron commentedon Apr 30, 2021
Not a blocker but left a comment as I think it's something we should follow up on before considering this issue "closed".
#2575 (comment)
[-]Blank screen after creating an account[/-][+][Hold for payment 5/7] Blank screen after creating an account[/+]arielgreen commentedon May 3, 2021
Reopening, will close upon payment 5/7.
arielgreen commentedon May 10, 2021
Paid contract + bonus for proposing the issue. Thanks @kidroca.