-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$1000] Deeplink - No prompt to open in app when navigating to deep link as logged-out web user #25790
Comments
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
|
Triggered auto assignment to @yuwenmemon ( |
I QA'd #24638 - it worked fine and I don't believe what we're seeing here is a deploy blocker. I'm going to reassign this to the bug zero team for triage. |
Triggered auto assignment to @joekaufmanexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
Confirmed this works right now on production when signed in or out. It's only on staging that we don't prompt to open the desktop app when deeplinking while signed out. |
Job added to Upwork: https://www.upwork.com/jobs/~01f534d2e9aa904030 |
Current assignee @joekaufmanexpensify is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ArekChr ( |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
@ArekChr I would think we wouldn't want to close this, no? It seems like a bug that we're not triggering the desktop prompt when logged out on staging. |
Sure, I thought that was intentional. |
ProposalPlease re-state the problem that we are trying to solve in this issue.When a user is signed out on the web and attempts to navigate to a deep link, there is no prompt to open the link in the desktop app. What is the root cause of that problem?The root cause of this problem is that we are not handling deep links when users are logged out. App/src/components/DeeplinkWrapper/index.website.js Lines 78 to 94 in 34d4e54
What changes do you think we should make in order to solve the problem?To address this issue, I recommend the following changes:
App/src/components/DeeplinkWrapper/index.website.js Lines 87 to 88 in 34d4e54
Line 444 in 34d4e54
This modification ensures proper handling of the prompt prevention based on the conditions mentioned. What alternative solutions did you explore? (Optional)We can remove P.S.The existing solution has a potential problem of causing an infinite loop due to a specific section of code. This issue arises from the usage of the useEffect hooks in certain parts of the codebase, where each hook has a dependency on the hasShownPrompt variable. Consequently, when any of these dependencies change, it triggers the useEffect hooks and leads to an infinite loop. App/src/components/DeeplinkWrapper/index.website.js Lines 44 to 95 in 34d4e54
To address this problem, two potential solutions have been identified:
Result: expensify.issue.1.mp4
Result: expensify.issue.2.mp4Ultimately, the chosen option will depend on the priorities of the project and the desired behavior of the application. |
ProposalPlease re-state the problem that we are trying to solve in this issue.No prompt to open in app when navigating to deep link as logged-out web user What is the root cause of that problem?
Both places we are blocking for non-auth people This Pr is add this #23673 when social sign-in is enabled What changes do you think we should make in order to solve the problem?we should remove
and
+ if (!hasShownPrompt) { // update this one
- setHasShownPrompt(false); and remove this
Navigation.isNavigationReady().then(() => {
// Get initial route
const initialRoute = navigationRef.current.getCurrentRoute();
setCurrentScreen(initialRoute.name);
removeListener.current = navigationRef.current.addListener('state', (event) => {
setCurrentScreen(Navigation.getRouteNameFromStateEvent(event));
});
});
}
because when ever hasShownPrompt changes and isAuthenticated === false means it will update again hasShownPrompt as false and again it will ask the popup to open desktop so it will goes to loop.
|
@ArekChr did you see discussion that said this somewhere? The reason I thought this was not intentional is that when I was testing it the other day, we were not showing the "switch to desktop" prompt to non-authenticated users on staging, but we were on production. That inconsistency made me think this was likely a regression introduced at recently (unless we made the active decision to change this somewhere). |
Not overdue |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Still pending C+ review |
@joekaufmanexpensify It Looks like this functionality is intended. There were discussions about not prompting redirects when users are logged out on the web app, a related thread here |
Ah cool. Yep, confirmed here. Closing as this is intended! |
Hi @kbecciv I see you linked to this comment from here, mentioning that the PR wasn't passing tests. I think we are good now, but could you please just take a look to confirm? thanks! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Issue found when executing PR #24638
Action Performed:
Expected Result:
Whether user is signed in or signed out on web browser, navigate to new expensify deeplink on web should show a prompt to open ND in app
Actual Result:
When user is signed out on web and navigates to deep link, there is no prompt to open in desktop app
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.56-18
Reproducible in staging?: Yes
Reproducible in production?: No
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
Notes/Photos/Videos: Any additional supporting documentation
Bug6174773_20230823_221451.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: