Skip to content

[Hold for payment 5/7] Blank screen after creating an account #2497

Description

@kidroca

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Expected Result:

User proceeds to expensify.cash chat list

Actual Result:

User is redirected to a blank screen and a JS error can be seen in the console

Action Performed:

  1. Start from logged out state and proceed to create a new account
  2. While logged out, type and login with brand new email address so it can trigger sign up flow
  3. Get validation link from e-mail. On dev I'm copying the email link and appending it to localhost - e.g. http://localhost:8080/setpassword/10024706/EHOHMPGWM
  4. Type new password and click "set password"
  5. User is redirected to a blank screen and a JS error can be seen in the console

Workaround:

Refreshing the page manually would fix the issue and the chat list would load

Platform:

Where is this issue occurring?
The issue is confirmed in:

Web ✔️
Android ✔️
iOS
Desktop App
Mobile Web

The other environments are probably affected as well

Version Number: 1.0.21-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Bug5020701_video.mp4

Expensify/Expensify Issue URL:

View all open jobs on Upwork

Activity

  1. kidroca commented on Apr 20, 2021

    @kidroca
    ContributorAuthor

    @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)

    1. Allow NavigationContainer to initialize with no report
    2. 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:

    https://github.com/Expensify/Expensify.cash/blob/dba06b5ced71edc7ae1663179ca808162635b0fd/src/libs/Navigation/Navigation.js#L100-L105

    Navigation.js
    let lastAttemptedRoute;
    
    function navigate(route) {
     // unmodified
    }
    
    function navigateLater(route) {
      lastAttemptedRoute = route;
    }
    
    function enableNavigation() {
      if (lastAttemptedRoute) navigate(lastAttemptedRoute);
        exports.navigate = navigate;
    }
    
    const exports = {
      navigate: navigateLater,
      enableNavigation,
    };
    
    export default exports;

    And then we call enableNavigation here:

    https://github.com/Expensify/Expensify.cash/blob/dba06b5ced71edc7ae1663179ca808162635b0fd/src/libs/Navigation/NavigationRoot.js#L37-L45

    NavigationRoot.js
    <NavigationContainer
        onReady={enableNavigation} 
        ...
    />

    A note on exports.navigate = navigate.

    Changing the implementation of navigate during runtime saves us from:

    • dirtying up the actual navigate code.
    • introducing bugs there
    • make a needles check for the lifetime of the navigation

    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

  2. marcaaron commented on Apr 20, 2021

    @marcaaron
    Contributor

    Proposed solution makes sense to me. Let's do it!
    Going to assign you and hand this off to a team member.

  3. added
    External
    on Apr 20, 2021
  4. MelvinBot commented on Apr 20, 2021

    @MelvinBot
    Contributor

    Triggered auto assignment to @arielgreen (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

  5. marcaaron commented on Apr 20, 2021

    @marcaaron
    Contributor

    @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!

  6. kidroca commented on Apr 22, 2021

    @kidroca
    ContributorAuthor

    Bump, I haven't started working on this as I'm not yet hired on Upwork

  7. added
    DeployBlockerCash
    Daily
    on Apr 23, 2021
  8. roryabraham commented on Apr 23, 2021

    @roryabraham
    Contributor

    Adding the DeployBlockerCash label to this, @marcaaron if you disagree please remove the label.

    @arielgreen Making this a daily since it's preventing E.cash production deploy.

  9. arielgreen commented on Apr 23, 2021

    @arielgreen
    Contributor

    Thanks @roryabraham!

    @kidroca, I've just sent over an invite to the Upwork job.

  10. kidroca commented on Apr 23, 2021

    @kidroca
    ContributorAuthor

    @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/

  11. arielgreen commented on Apr 23, 2021

    @arielgreen
    Contributor

    @kidroca yep, correct profile. Can you see this job?

  12. changed the title [-]Blanks screen after creating an account[/-] [+]Blank screen after creating an account[/+] on Apr 26, 2021
  13. removed
    DeployBlockerCash
    on Apr 29, 2021
  14. marcaaron commented on Apr 30, 2021

    @marcaaron
    Contributor

    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)

  15. changed the title [-]Blank screen after creating an account[/-] [+][Hold for payment 5/7] Blank screen after creating an account[/+] on May 3, 2021
  16. arielgreen commented on May 3, 2021

    @arielgreen
    Contributor

    Reopening, will close upon payment 5/7.

  17. arielgreen commented on May 10, 2021

    @arielgreen
    Contributor

    Paid contract + bonus for proposing the issue. Thanks @kidroca.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

DailyExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions