-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix - Workspace - Currencies do not load after transition from OldDot when other user logged in ND #31789 #32245
Conversation
@cubuspl42 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Note: I have considered the use of union type as suggested but upon looking into it, changing authToken into a union type will mean that there will be changes needed accross multiple areas of the app because the use of authToken would change and typescript will throw errors otherwise. So this made me wonder, is it worth making changes in the current code and future code whenever authToken is used just for the sake of this somewhat edgecase localized issue we are trying to solve? let me know your thoughts on this. |
I don't think this union was a good idea anymore. You're right, let's keep this as is. |
Relating to QA Steps. First, use "OldDot" and "NewDot", don't confuse new people in the project too much (these terms are already cryptic for newcomers)
It doesn't seem to be necessary: (video) Replace "OD" with "OldDot (staging)" in the beginning and we should be good |
On it, I will fix that QA and fix a lint issue right away |
In "Tests", would you specify what exact steps did you follow on non-Web platforms? Including any tricks and shell commands. |
@cubuspl42 I've added steps for other platforms, let me know how it looks |
I have this issue: launching-loop.mp4 |
@cubuspl42 from the video it seem like you are getting an API error trying to open the workspace from OD before you even try using it on the native app correct? are you sure it's related to our PR here? because in the video it seem like the issue is happening on your end between OD and ND production? |
Okay I managed to reproduce the issue you are having on my physical android device, but I have noticed the issue happens with or without the changes we made in this PR so it must be an Android issue that was always there, either way I will look into the cause and let you know what I find. |
@cubuspl42 This issue seem to be more about Android security features, I've been doing some tests and it seem like clicking a workspace in OD, whether it's from OD app or website, will not redirect to the native app in the normal natural flow because clicking it will always open ND in a browser so do we really need to worry about this? is there any case at all where clicking workspace from OD would open up the native app? |
I'm just trying to ensure we test the Android platform properly!
I just investigated it. It shouldn't open directly. https://new.expensify.com/.well-known/assetlinks.json App/android/app/src/main/AndroidManifest.xml Lines 58 to 74 in fe6a2cb
|
It's not an API error, I think, I just aborted all requests as soon as possible. |
@cubuspl42 Got you, what would you like to do about this? do I dive into this and investigate why Android is rejecting |
I'm just trying to ensure we properly test the Android flow, so no regressions arise. I don't have any greater ambitions here. How did you figure out that the exact form of the |
@cubuspl42 I actually didn't figure it out myself, that was something I found out in the slack channel where a c+ mentioned this link, if you want I can link you that discussion |
Sure, share it please |
I tried inspecting the console / network logs for Chrome on macOS does, though. The link has different form from what we were testing. Conclusions: I don't think our Android test is actually testing anything. It this flow ever supposed to be handled by the mobile app? Have you checked this on prod (prod OldDot, prod NewDot, prod Google Play Android app)? |
@cubuspl42 I actually did test and I could not get the deeplinking from OD to ever open ND, I tried production apps both OD and ND and OD app will always open up the browser, same with OD in the browser, it never attempts to launch the native app, so you are correct in saying that the android test is actually testing nothing because it doesn't seem like this issue we are working on would ever occur in native apps anyway unless we make changes that promts OD links to open in the native ND, which I don't know if it will ever happen since commonly apps will open links in the browser anyway. |
@cubuspl42 any updates? should we remove the native tests and state the bug/fix is not applicable to native app? or should we ask on slack? |
Let's add "N/A" in the Android / iOS "Screenshots/Videos" sections and add a short description of our findings in the "Details" section. I'll proceed with testing in this manner. |
This is an important line: App/src/libs/Browser/index.website.ts Line 77 in 820fb32
It's a desktop-only logic, which might suggest we're observing the expected behavior |
You are correct, I've looked at |
@cubuspl42 I have removed the test steps for Android/iOS and removed the video for them as well, also I've added a brief explanation in the Details section. |
Thank you very much! I'll get back to this tomorrow. I had some high-priority things in my queue today, and it's already evening here. |
@cubuspl42 When you have time to look at this again, since you have a physical iphone from what I remember, can you please test opening the URL from iCloud notes? I've seen this issue post about iCloud notes and opening URLs from there into the iOS app and it made me a little bit worried since I've stated there is no natural workflow for deep linking into the iOS app but maybe there is? Thank you! |
Reviewer Checklist
Screenshots/VideosWebold-dot-transition-web.mp4Mobile Web - ChromeN/A Mobile Web - SafariN/A Desktopold-dot-transition-desktop.mp4iOSN/A AndroidN/A |
The flow we're modifying isn't expected to be handled on mobile native variants of Expensify (iOS / Android). There are no defined deep links for this functionality. |
@francoisl @cubuspl42 The code now resets with |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/francoisl in version: 1.4.14-0 🚀
|
🚀 Deployed to staging by https://github.com/francoisl in version: 1.4.14-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.4.14-6 🚀
|
Details
We are adding a check for when the user uses short lived token while deeplinking from OD, this is to solve the issue where currencies don't load in these cases.
As per the discussion in the PR, we have come to the conclusion that this bug is not reproducible on Android/iOS native in any typical workflow. This is evident in the component App.ts, where the beginDeepLinkRedirect function explicitly calls Browser.openRouteInDesktopApp. This suggests that there is no natural workflow where deep link redirection could result in the URL opening in the Android/iOS native app.
Fixed Issues
$ #31789
PROPOSAL: #31789 (comment)
Tests
For web/mweb:
For MacOS Desktop:
Offline tests
No offline test
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
N/A
Android: mWeb Chrome
mweb-chrome.mov
iOS: Native
N/A
iOS: mWeb Safari
mweb-safari.2.mov
MacOS: Chrome / Safari
web-chrome.mov
MacOS: Desktop
mac-desktop.mov