Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[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

Closed
1 of 8 tasks
m-natarajan opened this issue Dec 15, 2024 · 34 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@m-natarajan
Copy link

m-natarajan commented Dec 15, 2024

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
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 15, 2024
Copy link

melvin-bot bot commented Dec 15, 2024

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.

@bernhardoj
Copy link
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.

@melvin-bot melvin-bot bot added the Overdue label Dec 18, 2024
@abekkala abekkala added the External Added to denote the issue can be worked on by a contributor label Dec 18, 2024
@melvin-bot melvin-bot bot 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. Dec 18, 2024
Copy link

melvin-bot bot commented Dec 18, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021869401988531631098

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 18, 2024
Copy link

melvin-bot bot commented Dec 18, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Dec 18, 2024
@abekkala
Copy link
Contributor

@rushatgabhane can you review the proposal above? Thanks!

@rushatgabhane
Copy link
Member

🎀👀🎀

#54174 (comment)

LGTM

Copy link

melvin-bot bot commented Dec 18, 2024

Triggered auto assignment to @blimpich, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 18, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Dec 19, 2024
@bernhardoj
Copy link
Contributor

PR is ready

cc: @rushatgabhane

@trjExpensify
Copy link
Contributor

Commented in the PR, but I don't think that PR that hit staging has solved the core part of this bug report: #54347 (comment)

Copy link

melvin-bot bot commented Jan 11, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.83-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2025-01-18. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Jan 11, 2025

@rushatgabhane @abekkala @rushatgabhane The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jan 16, 2025
@abekkala
Copy link
Contributor

@rushatgabhane can you please complete the checklist so we can move to payments?
Thanks!

@abekkala
Copy link
Contributor

PAYMENT SUMMARY:

@bernhardoj
Copy link
Contributor

Requested in ND.

Copy link

melvin-bot bot commented Jan 18, 2025

Payment Summary

Upwork Job

BugZero Checklist (@abekkala)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1869401988531631098/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@melvin-bot melvin-bot bot added the Overdue label Jan 20, 2025
Copy link

melvin-bot bot commented Jan 21, 2025

@abekkala, @blimpich, @rushatgabhane, @bernhardoj Whoops! This issue is 2 days overdue. Let's get this updated quick!

@abekkala
Copy link
Contributor

@rushatgabhane can you complete the checklist

@melvin-bot melvin-bot bot removed the Overdue label Jan 21, 2025
@JmillsExpensify
Copy link

$250 approved for @bernhardoj

@abekkala
Copy link
Contributor

@rushatgabhane bumping the checklist again - then we can move to payment! thanks!

@melvin-bot melvin-bot bot added the Overdue label Jan 27, 2025
Copy link

melvin-bot bot commented Jan 27, 2025

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

@abekkala
Copy link
Contributor

bumped @rushatgabhane in slack

@melvin-bot melvin-bot bot removed the Overdue label Jan 27, 2025
@garrettmknight
Copy link
Contributor

@rushatgabhane please complete the checklist

@melvin-bot melvin-bot bot added the Overdue label Jan 29, 2025
@abekkala
Copy link
Contributor

Bumped @rushatgabhane in Slack once more

@rushatgabhane
Copy link
Member

rushatgabhane commented Feb 2, 2025

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 👎

@melvin-bot melvin-bot bot added the Overdue label Feb 2, 2025
Copy link

melvin-bot bot commented Feb 3, 2025

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

@garrettmknight
Copy link
Contributor

$250 approved for @rushatgabhane

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
Development

No branches or pull requests

9 participants