Skip to content

[HOLD for payment 2025-01-18] [HOLD for payment 2025-01-17] [$250] A blank white screen appears when a new user clicks on the workspace invite email link. #54174

Description

@m-natarajan

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


Version Number: 9.0.76-6
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @quinthar
Slack conversation (hyperlinked to channel name): convert

Action Performed:

  1. Create a new workspace
  2. Invite a new user as member to workspace
  3. As new user click the link received in the email (Click the link in Reply to this message or respond at [new.expensify.com]

Expected Result:

The invite link should direct the user to the workspace setup or login page, allowing them to join the workspace.

Actual Result:

White blank screen displayed

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

image (7)

image (8)

Recording.849.mp4
thirdPartyScripts.js loaded
index.ts:177 [OnyxUpdateManager] Listening for updates from the server
Log.ts:76 [info] [Onyx] set called for key: logs properties:  hasChanged: true - "" 
Log.ts:76 [info] Found existing deviceID - "9958aebb-d2ab-d2e1-ddd6-7ac6af890ad8" 
Timing.ts:54 Timing:staging.new.expensify.trie_initialization 19
Log.ts:76 [info] [API] Called API.read - {"command":"SendPerformanceTiming","name":"staging.new.expensify.trie_initialization","value":19,"platform":"web"} 
Log.ts:76 [info] [API] Preparing request - {"command":"SendPerformanceTiming","type":"read"} 
Log.ts:76 [info] [Network] Making API request - {"command":"SendPerformanceTiming"} {request: {…}, response: undefined}
Log.ts:76 [info] [Onyx] set called for key: activeClients properties: 0 hasChanged: true - "" 
Log.ts:76 [info] [NetworkConnection] NetInfo state change - {"isInternetReachable":null,"isConnected":true,"type":"other","details":{"isConnectionExpensive":false}} 
Log.ts:76 [info] [Network] Client is back online because: NetInfo received a state change event - "" 
Log.ts:76 [info] [NetworkStatus] NetInfo.addEventListener event coming, setting "offlineStatus" to false with network state: {"isInternetReachable":null,"isConnected":true,"type":"other","details":{"isConnectionExpensive":false}} - "" 
Log.ts:76 [info] [NetworkConnection] NetInfo state change - {"isInternetReachable":null,"isConnected":true,"type":"other","details":{"isConnectionExpensive":false}} 
Log.ts:76 [info] [Network] Client is back online because: NetInfo received a state change event - "" 
Log.ts:76 [info] [NetworkStatus] NetInfo.addEventListener event coming, setting "offlineStatus" to false with network state: {"isInternetReachable":null,"isConnected":true,"type":"other","details":{"isConnectionExpensive":false}} - "" 
Log.ts:76 [info] [Onyx] merge called for key: network properties: isOffline,networkStatus hasChanged: true - "" 
Log.ts:76 [info] [NetworkConnection] NetInfo state change - {"isInternetReachable":null,"isConnected":true,"type":"other","details":{"isConnectionExpensive":false}} 
Log.ts:76 [info] [Network] Client is back online because: NetInfo received a state change event - "" 
Log.ts:76 [info] [NetworkStatus] NetInfo.addEventListener event coming, setting "offlineStatus" to false with network state: {"isInternetReachable":null,"isConnected":true,"type":"other","details":{"isConnectionExpensive":false}} - "" 
Log.ts:76 [info] [Onyx] merge called for key: network properties: isOffline,networkStatus hasChanged: false - "" 
Log.ts:76 [info] [PersistedRequests] hit Onyx connect callback - {"isValNullish":true} 
Log.ts:76 [info] App launched - {"Platform":{"OS":"web","isTesting":false},"CONFIG":{"default":{"APP_NAME":"NewExpensify","AUTH_TOKEN_EXPIRATION_TIME":5400000,"ENVIRONMENT":"staging","EXPENSIFY":{"EXPENSIFY_URL":"https://www.expensify.com/","SECURE_EXPENSIFY_URL":"https://secure.expensify.com/","NEW_EXPENSIFY_URL":"https://staging.new.expensify.com/","DEFAULT_API_ROOT":"https://www.expensify.com/","DEFAULT_SECURE_API_ROOT":"https://secure.expensify.com/","STAGING_API_ROOT":"https://staging.expensify.com/","STAGING_SECURE_API_ROOT":"https://staging-secure.expensify.com/","PARTNER_NAME":"chat-expensify-com","PARTNER_PASSWORD":"e21965746fd75f82bb66","EXPENSIFY_CASH_REFERER":"ecash","CONCIERGE_URL_PATHNAME":"concierge/","DEVPORTAL_URL_PATHNAME":"_devportal/","CONCIERGE_URL":"https://www.expensify.com/concierge/","SAML_URL":"https://www.expensify.com/authentication/saml/login"},"IS_IN_PRODUCTION":true,"IS_IN_STAGING":true,"IS_USING_LOCAL_WEB":false,"PUSHER":{"APP_KEY":"268df511a204fbb60884","SUFFIX":"","CLUSTER":"mt1"},"SITE_TITLE":"New Expensify","FAVICON":{"DEFAULT":"/favicon.png","UNREAD":"/favicon-unread.png"},"CAPTURE_METRICS":false,"ONYX_METRICS":false,"DEV_PORT":8082,"E2E_TESTING":false,"SEND_CRASH_REPORTS":true,"IS_USING_WEB_PROXY":false,"APPLE_SIGN_IN":{"SERVICE_ID":"com.chat.expensify.chat.AppleSignIn","REDIRECT_URI":"https://staging.new.expensify.com/appleauth"},"GOOGLE_SIGN_IN":{"WEB_CLIENT_ID":"921154746561-gpsoaqgqfuqrfsjdf8l7vohfkfj7b9up.apps.googleusercontent.com","IOS_CLIENT_ID":"921154746561-s3uqn2oe4m85tufi6mqflbfbuajrm2i3.apps.googleusercontent.com"},"GCP_GEOLOCATION_API_KEY":"","FIREBASE_WEB_CONFIG":{"apiKey":"AIzaSyBrLKgCuo6Vem6Xi5RPokdumssW8HaWBow","appId":"1:1008697809946:web:ca25268d2645fc285445a3","projectId":"expensify-mobile-app"},"USE_REACT_STRICT_MODE_IN_DEV":false,"ELECTRON_DISABLE_SECURITY_WARNINGS":"true"}}} 
Log.ts:76 [info] [Migrate Onyx] start - "" 
Log.ts:76 [info] [Onyx] set called for key: isCheckingPublicRoom hasChanged: true - "" 
Log.ts:76 [info] [Migrate Onyx] Skipped migration RenameCardIsVirtual because there are no cards linked to the account - "" 
Log.ts:76 [info] [Migrate Onyx] Skipped migration RenameReceiptFilename because there are no transactions - "" 
Log.ts:76 [info] [Migrate Onyx] Skipped migration KeyReportActionsDraftByReportActionID because there were no reportActionsDrafts - "" 
Log.ts:76 [info] [Migrate Onyx] Skipped TransactionBackupsToCollection migration because there are no transactions - "" 
Log.ts:76 [info] [Migrate Onyx] Skipped migration RemoveEmptyReportActionsDrafts because there were no reportActionsDrafts - "" 
Log.ts:76 [info] [Migrate Onyx] Skipping migration MoveIsOptimisticReportToMetadata because there are no reports - "" 
Log.ts:76 [info] [Migrate Onyx] finished in 4ms - "" 
Log.ts:76 [info] [SequentialQueue] Unable to flush. No requests or queued Onyx updates to process. - "" 
Log.ts:76 [info] [BootSplash] hiding splash screen - "" 
2Log.ts:76 [info] [Onyx] merge called for key: modal properties: willAlertModalBecomeVisible,isPopover hasChanged: false - "" 
Log.ts:76 [info] [Onyx] merge called for key: session properties: autoAuthState hasChanged: false - "" 
Log.ts:76 [info] Navigating to route - {"path":"/v/18841593/RHLYYPCHB?exitTo=%2Fr%2F440794276023852"} 
fs.js:4 [GSI_LOGGER]: Failed to render button because there is no parent or options set.
e @ fs.js:4
_.O @ client:172
hr @ client:278
g @ index.tsx:49
c @ rocket-loader.min.js:1
load
t.addEventListener @ rocket-loader.min.js:1
p @ index.tsx:62
rs @ react-dom.production.min.js:243
vl @ react-dom.production.min.js:285
sl @ react-dom.production.min.js:272
Ui @ react-dom.production.min.js:127
(anonymous) @ react-dom.production.min.js:282
yl @ react-dom.production.min.js:280
il @ react-dom.production.min.js:269
v @ scheduler.production.min.js:13
k @ scheduler.production.min.js:14
e.exports @ _invoke.js:5
f.<computed> @ _task.js:35
I @ _task.js:21
E @ _task.js:25Understand this warningAI
Log.ts:76 [info] [Network] Finished API request in 232ms - {"command":"SendPerformanceTiming","jsonCode":200,"requestID":"8f2976189920f8dd-SEA"} {request: {…}, response: {…}}
OnyxUpdates.ts:31 [OnyxUpdateManager] Applying https update
Log.ts:76 [info] [OnyxUpdateManager] Applying update type: https with lastUpdateID: 0 - {"command":"SendPerformanceTiming"} 
OnyxUpdates.ts:67 [OnyxUpdateManager] Done applying HTTPS update
Log.ts:76 [info] [NetworkConnection] NetInfo state change - {"isInternetReachable":true,"isConnected":true,"type":"other","details":{"isConnectionExpensive":false}} 
Log.ts:76 [info] [Network] Client is back online because: NetInfo received a state change event - "" 
Log.ts:76 [info] [NetworkStatus] NetInfo.addEventListener event coming, setting "offlineStatus" to true with network state: {"isInternetReachable":true,"isConnected":true,"type":"other","details":{"isConnectionExpensive":false}} - "" 
Log.ts:76 [info] [Onyx] merge called for key: network properties: isOffline,networkStatus hasChanged: true - "" 
Log.ts:76 [info] [Onyx] set called for key: currentDate hasChanged: false - ""

image (9)

image (10)

Screen.Recording.2024-12-15.at.1.20.24.PM.mov

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021869401988531631098
  • Upwork Job ID: 1869401988531631098
  • Last Price Increase: 2024-12-18
Issue OwnerCurrent Issue Owner: @abekkala

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 15, 2024
  2. melvin-bot commented on Dec 15, 2024

    @melvin-bot

    Triggered auto assignment to @abekkala (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. bernhardoj commented on Dec 16, 2024

    @bernhardoj
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    A blank screen shown when using the workspace invite email link.

    What is the root cause of that problem?

    There are 2 problems here. First, the magic code from the magic link is wrong. The format of a magic code should be a number, but on the OP screenshot, it's a character combination that can only be solved on the BE.

    The second issue is, that since the magic code is invalid, we return here early and don't make any request to the BE.

    if (!ValidationUtils.isValidValidateCode(validateCode)) {
    return;
    }
    // The user has initiated the sign in process on the same browser, in another tab.
    Session.signInWithValidateCode(Number(accountID), validateCode);

    So, the state is always NOT_STARTED. A not found page is supposed to show inside ValidateCodeModal if it's an invalid code, but since we only show it if there is no exitTo, then it's never shown because the link contains exitTo.

    {(!autoAuthState ? !shouldStartSignInWithValidateCode : autoAuthStateWithDefault === CONST.AUTO_AUTH_STATE.NOT_STARTED) && !exitTo && (
    <ValidateCodeModal
    accountID={Number(accountID)}
    code={validateCode}
    />
    )}

    What changes do you think we should make in order to solve the problem?

    Why do we only show the ValidateCodeModal component if there is no exitTo? It's to solve this issue based on this comment. The issue is that the "here is your magic code" is shown briefly before navigating to the exitTo. This happens when the user is already signed in.

    If the user is already signed in, then there won't be a magic code sign in request,

    const shouldStartSignInWithValidateCode = !isUserClickedSignIn && !isSignedIn && (!!login || !!exitTo);
    useEffect(() => {
    if (isUserClickedSignIn) {
    // The user clicked the option to sign in the current tab
    Navigation.isNavigationReady().then(() => {
    Navigation.goBack();
    });
    return;
    }
    Session.initAutoAuthState(autoAuthStateWithDefault);
    if (!shouldStartSignInWithValidateCode) {
    if (exitTo) {
    Session.handleExitToNavigation(exitTo);
    }
    return;
    }

    so shouldStartSignInWithValidateCode is false and auto auth state is NOT_STARTED.

    {(!autoAuthState ? !shouldStartSignInWithValidateCode : autoAuthStateWithDefault === CONST.AUTO_AUTH_STATE.NOT_STARTED) && !exitTo && (
    <ValidateCodeModal
    accountID={Number(accountID)}
    code={validateCode}
    />
    )}
    {(!autoAuthState ? shouldStartSignInWithValidateCode : autoAuthStateWithDefault === CONST.AUTO_AUTH_STATE.SIGNING_IN) && <FullScreenLoadingIndicator />}

    This works fine when the user is logged in, but not when the user is logged out, because exitTo is only executed after the user is logged in (handled by handleExitToNavigation).

    To solve this, we can improve the condition to prevent the "here is your magic code" to show if there is an exitTo and only if the user is logged in.

    const isNavigatingToExitTo = isSignedIn && exitTo;
    
    {(!autoAuthState ? !shouldStartSignInWithValidateCode : autoAuthStateWithDefault === CONST.AUTO_AUTH_STATE.NOT_STARTED) && !isNavigatingToExitTo && (
    

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    I think we can test 2 cases, 1 when the user is logged in and there is an exitTo, the ValidateCodeModal shouldn't be rendered briefly. The 2nd case is this issue, where the user is logged out and there is an exitTo with an invalid magic code, the ValidateCodeModal should be rendered showing the not found page.

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Dec 18, 2024
  5. changed the title [-]A blank white screen appears when a new user clicks on the workspace invite email link.[/-] [+][$250] A blank white screen appears when a new user clicks on the workspace invite email link.[/+] on Dec 18, 2024
  6. melvin-bot commented on Dec 18, 2024

    @melvin-bot
  7. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Dec 18, 2024
  8. melvin-bot commented on Dec 18, 2024

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (External)

  9. abekkala commented on Dec 18, 2024

    @abekkala
    Contributor

    @rushatgabhane can you review the proposal above? Thanks!

  10. 43 remaining items

  11. melvin-bot commented on Jan 27, 2025

    @melvin-bot

    @abekkala, @blimpich, @rushatgabhane, @bernhardoj Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  12. abekkala commented on Jan 27, 2025

    @abekkala
    Contributor

    bumped @rushatgabhane in slack

  13. garrettmknight commented on Jan 29, 2025

    @garrettmknight
    Contributor

    @rushatgabhane please complete the checklist

  14. abekkala commented on Jan 30, 2025

    @abekkala
    Contributor

    Bumped @rushatgabhane in Slack once more

  15. rushatgabhane commented on Feb 2, 2025

    @rushatgabhane
    Member

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: https://github.com/Expensify/App/pull/53756/files#r1938601404

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: Not critical

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal Template
    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    Test:

    1. Open a magic link with an invalid magic code and exitTo param (e.g., staging.new.expensify.com/v/1/123?exitTo=/concierge)
    2. For web/mWeb, verify a not found view is shown instead of blank screen
    3. For android/iOS, verify the login screen is shown with an error message

    Do we agree 👍 or 👎

  16. melvin-bot commented on Feb 3, 2025

    @melvin-bot

    @abekkala, @blimpich, @rushatgabhane, @bernhardoj Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  17. garrettmknight commented on Feb 3, 2025

    @garrettmknight
    Contributor

    $250 approved for @rushatgabhane

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions