[HOLD for payment 2024-12-17] [$250] No popup to open desktop app for 'Try New Expensify' link
If you havenβt already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: v9.0.60-2 Reproducible in staging?: Y Reproducible in production?: Y Issue was found when executing this PR: https://github.com/Expensify/App/pull/52255 Email or phone of affected tester (no customers): applausetester+bp2410d@app;ause.expensifail.com Issue reported by: Applause Internal Team
Action Performed:
Precondition: user is logged in OD.
- OD: Go to Settings > Account
- Click on Credit Card Import > Import Card/Bank
- Click on Privacy at the bottom
- Go back to OD
- Click on 'Try New Expensify'
Expected Result:
User is redirected to NewDot application. Popup with suggestion to open desktop app appears.
Actual Result:
User is redirected to NewDot application. No popup with suggestion to open desktop app.
Workaround:
Unknown
Platforms:
- [ ] Android: Standalone
- [ ] Android: HybridApp
- [ ] Android: mWeb Chrome
- [ ] iOS: Standalone
- [ ] iOS: HybridApp
- [ ] iOS: mWeb Safari
- [x] MacOS: Chrome / Safari
- [x] MacOS: Desktop
Screenshots/Videos
https://github.com/user-attachments/assets/7735fcf3-75af-4a95-92de-2760f1dfa248
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021859311638145427434
- Upwork Job ID: 1859311638145427434
- Last Price Increase: 2024-11-27
Issue Owner
Current Issue Owner: @JmillsExpensify
Triggered auto assignment to @JmillsExpensify (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.
Proposal
Please re-state the problem that we are trying to solve in this issue.
There is no prompt to open in desktop app.
What is the root cause of that problem?
When we open ND from OD, the link will have a transition path. If it's a transition URL, the prompt will be pending by App.beginDeepLinkRedirectAfterTransition().
https://github.com/Expensify/App/blob/67d7299079a14ee9dc22c17a5174209b70e9e61c/src/components/DeeplinkWrapper/index.website.tsx#L19-L31
beginDeepLinkRedirectAfterTransition will only resolved after signOnTransitionToFinishPromise promise is resolved.
https://github.com/Expensify/App/blob/67d7299079a14ee9dc22c17a5174209b70e9e61c/src/libs/actions/App.ts#L501-L503
It will be resolved in setUpPoliciesAndNavigate.
https://github.com/Expensify/App/blob/67d7299079a14ee9dc22c17a5174209b70e9e61c/src/libs/actions/App.ts#L441-L447
setUpPoliciesAndNavigate is called when the AuthScreen is mounted.
https://github.com/Expensify/App/blob/67d7299079a14ee9dc22c17a5174209b70e9e61c/src/libs/Navigation/AppNavigator/AuthScreens.tsx#L303
But as seen from the code above, the promise is only resolved if exitTo param is not empty. Currently, the exitTo param from OD is empty. exitTo=. So, the promise is never resolved.
What changes do you think we should make in order to solve the problem?
Fix the OD to provide the exitTo
OR
I think we should set a fallback to the exitTo when calling navigate. If it's empty, we use HOME.
https://github.com/Expensify/App/blob/67d7299079a14ee9dc22c17a5174209b70e9e61c/src/libs/actions/App.ts#L425
Then remove the check for exitTo.
https://github.com/Expensify/App/blob/67d7299079a14ee9dc22c17a5174209b70e9e61c/src/libs/actions/App.ts#L441
https://github.com/Expensify/App/blob/67d7299079a14ee9dc22c17a5174209b70e9e61c/src/libs/actions/App.ts#L419-L421
Also, when the exitTo is empty, it will show infinite loading
It's because when we navigate to HOME, it won't go anywhere because we are already at HOME, but the transition page is still at the nav stack. https://github.com/Expensify/App/blob/67d7299079a14ee9dc22c17a5174209b70e9e61c/src/libs/actions/App.ts#L441-L446
So, we need to call Navigation.goBack too, but only if exitTo is empty because when exitTo is available, we already popped it out from LogOutPreviousUserPage. (basically we have 2 places of handling transition)
https://github.com/Expensify/App/blob/67d7299079a14ee9dc22c17a5174209b70e9e61c/src/pages/LogOutPreviousUserPage.tsx#L77-L87
if (!isLoggingInAsNewUser) {
Navigation.waitForProtectedRoutes()
.then(() => {
if (isTransitioning && !exitTo) {
Navigation.goBack();
}
Navigation.navigate(exitTo);
})
.then(endSignOnTransition);
}
OR
We can immediately call endSignOnTransition when exitTo isn't available.
https://github.com/Expensify/App/blob/67d7299079a14ee9dc22c17a5174209b70e9e61c/src/libs/actions/App.ts#L419-L421 https://github.com/Expensify/App/blob/67d7299079a14ee9dc22c17a5174209b70e9e61c/src/libs/actions/App.ts#L441-L447
if (!session || !currentUrl?.includes('exitTo')) {
endSignOnTransition();
return;
}
if (!isLoggingInAsNewUser && exitTo) {
Navigation.waitForProtectedRoutes()
.then(() => {
Navigation.navigate(exitTo);
})
.then(endSignOnTransition);
} else {
endSignOnTransition();
}
@JmillsExpensify Eep! 4 days overdue now. Issues have feelings too...
@JmillsExpensify 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
Job added to Upwork: https://www.upwork.com/jobs/~021859311638145427434
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Pujan92 (External)
Opened up to the community since we have a proposal
@JmillsExpensify, @Pujan92 Eep! 4 days overdue now. Issues have feelings too...
@Pujan92 proposal above when you have a moment.
@JmillsExpensify @Pujan92 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
I think the last option from @bernhardoj's proposal of calling endSignOnTransition when exitTo isn't available looks good to me.
πππ C+ reviewed
Triggered auto assignment to @lakchote, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Let's go with @bernhardoj's proposal, by calling endSignOnTransition when exitTo isn't available.
Will open the PR tomorrow
PR is ready
cc: @Pujan92
Reviewing label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.73-8 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pull/53331
If no regressions arise, payment will be issued on 2024-12-17. :confetti_ball:
For reference, here are some details about the assignees on this issue:
- @Pujan92 requires payment through NewDot Manual Requests
- @bernhardoj requires payment through NewDot Manual Requests
@Pujan92 @JmillsExpensify @Pujan92 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]
Payment Summary
- Reviewer: @Pujan92 owed $250 via NewDot
- Reviewer: @bernhardoj owed $250 via NewDot
BugZero Checklist (@JmillsExpensify)
- [ ] 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/1859311638145427434/hired)
- [ ] I have paid out the Upwork contracts or cancelled the ones that are incorrect
- [ ] I have verified the payment summary above is correct
BugZero Checklist:
- [X] [Contributor] Classify the bug:
Bug classification
Source of bug:
- [ ] 1a. Result of the original design (eg. a case wasn't considered)
- [X] 1b. Mistake during implementation
- [ ] 1c. Backend bug
- [ ] 1z. Other:
Where bug was reported:
- [ ] 2a. Reported on production
- [ ] 2b. Reported on staging (deploy blocker)
- [X] 2c. Reported on both staging and production
- [ ] 2d. Reported on a PR
- [ ] 2z. Other:
Who reported the bug:
- [ ] 3a. Expensify user
- [ ] 3b. Expensify employee
- [ ] 3c. Contributor
- [X] 3d. QA
- [ ] 3z. Other:
-
[X] [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/17452/files#r1889958483
-
[X] [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: N/A
-
[X] [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.
-
[ ] [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
- In OD, press on 'Try New Expensify'
- Verify when the NewDot opens, there is no infinite loading and there is a popup to open on a desktop
Do we agree π or π
@JmillsExpensify, @Pujan92, @lakchote, @bernhardoj Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Payment summary:
- Contributor: $250 @bernhardoj via New Expensify
- Reviewer: @Pujan92 $250 via New Expensify
All contributors paid via New Expensify and the payment summary is above, so I'm closing this one.
Requested in ND.
Payment summary:
- Contributor: $250 @bernhardoj via New Expensify
- Reviewer: @Pujan92 $250 via New Expensify
$250 approved for @Pujan92
$250 approved for @bernhardoj