-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[CP Staging] Add logs to OpenApp flow #42168
Conversation
@@ -202,6 +202,7 @@ function getPolicyParamsForOpenOrReconnect(): Promise<PolicyParamsForOpenOrRecon | |||
resolve({policyIDList: getNonOptimisticPolicyIDs(policies)}); | |||
}, | |||
}); | |||
Log.info('[getPolicyParamsForOpenOrReconnect] isReadyToOpenApp resolved', true, {policyIDListConnectionID: connectionID}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really sure why I'm logging the connectionID, I guess in case we find that the policyIDList promise isn't resolving we can see what's going on with that connection? Don't really know how to check that though, feedback would be greatly appreciated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it will help. The connectionIDs would only help you see the connection in the Onyx mapping - which doesn't really do much except hold the callback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe put this log above the Onyx.connect()
call.
@@ -254,6 +255,7 @@ function getOnyxDataForOpenOrReconnect(isOpenApp = false): OnyxData { | |||
*/ | |||
function openApp() { | |||
getPolicyParamsForOpenOrReconnect().then((policyParams: PolicyParamsForOpenOrReconnect) => { | |||
Log.info('[openApp] getPolicyParamsForOpenOrReconnect resolved: ', true, policyParams); | |||
const params: OpenAppParams = {enablePriorityModeFilter: true, ...policyParams}; | |||
|
|||
API.write(WRITE_COMMANDS.OPEN_APP, params, getOnyxDataForOpenOrReconnect(true)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My initial experience of this bug was that it looked like API.write()
did get called, but we end up just stuck in the queue so the request never happens. It feels like maybe some kind of network request is happening that causes the queue to get blocked.
Details
Adds some logs to the OpenApp flow to help with debuggin
Fixed Issues
Related to #42063
PROPOSAL:
Tests
Offline tests
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 methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop