You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can reproduce. The IOU is being created, but a network request is failing, bizarre that it only occurs on Android
[API] Handled error when making request TypeError: Network request failed
at fetch.umd.js:527
at JSTimers.js:235
at _callTimer (JSTimers.js:130)
at Object.callTimers (JSTimers.js:383)
at MessageQueue.__callFunction (MessageQueue.js:416)
at MessageQueue.js:109
at MessageQueue.__guard (MessageQueue.js:364)
at MessageQueue.callFunctionReturnFlushedQueue (MessageQueue.js:108)
at debuggerWorker.aca173c4.js:4
I'm able to reproduce as well, looks like the request that's causing the Network request failed is one of the Get rvl=reportStuff shouldLoadOptionalKeys=true includePinnedReports=true requests, though there's no errors in the API logs. Tracing where it comes from exactly.
doesn't work - we don't pass a reportIDList to the API, and it returns a blank response. I don't know if we can ever have more than 1 IOU transaction returned by the API in this function?
Also I'm surprised that it worked on other platforms, since we're passing the wrong data to the API all the time 🤔
An array makes sense, that line should get the reportID property of each of the elements in the array... was the array empty or did it contain objects with no reportID set?
I know, me too! I retested from main on web and iOS after doing the fix yesterday, thinking that it couldn't actually work but... it did. I didn't dig deeper than this cause I had a bunch of other stuff to take care of, but I'll try to investigate again today.
In the meantime, anyone feel free to take over the PR if it's urgent.
Activity
MelvinBot commentedon May 19, 2021
Triggered auto assignment to @trjExpensify (
AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.roryabraham commentedon May 19, 2021
In my opinion this should not be a deploy blocker since the IOU flow is still hidden behind a beta.
Julesssss commentedon May 19, 2021
Can reproduce. The IOU is being created, but a network request is failing, bizarre that it only occurs on Android
trjExpensify commentedon May 19, 2021
Cool, getting this over to engineering and I'll add it the IOU parent issue as a regression to fix for N5.
MelvinBot commentedon May 19, 2021
Triggered auto assignment to @francoisl (
Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.francoisl commentedon May 19, 2021
I'm able to reproduce as well, looks like the request that's causing the
Network request failedis one of theGet rvl=reportStuff shouldLoadOptionalKeys=true includePinnedReports=truerequests, though there's no errors in the API logs. Tracing where it comes from exactly.francoisl commentedon May 19, 2021
Ok I see the error. After creating the IOU expense, we call
getIOUReportsForNewTransactionbut the params passed is an array, so for this linehttps://github.com/Expensify/Expensify.cash/blob/85b084c0d2c79c08d6e6fad7eea08e00ca0c8a85/src/libs/actions/IOU.js#L29
doesn't work - we don't pass a reportIDList to the API, and it returns a blank response. I don't know if we can ever have more than 1 IOU transaction returned by the API in this function?
Also I'm surprised that it worked on other platforms, since we're passing the wrong data to the API all the time 🤔
iwiznia commentedon May 19, 2021
An array makes sense, that line should get the
reportIDproperty of each of the elements in the array... was the array empty or did it contain objects with no reportID set?francoisl commentedon May 19, 2021
The array contains regular-looking objects:
[{ "accountID": 5, "authToken": "XXX", "chatReportID": 203, "email": "francois+dev@expensify.com", "httpCode": 200, "jsonCode": 200, "reportID": 202, "requestID": "lxSyxm", "transactionID": "17179869247" }]I'm thinking just looping over every object and join the
reportIDs with a comma?francoisl commentedon May 19, 2021
Oh waiiit now I'm thinking, that
pluckline should work actually? It's not passing a reportIDList though, maybe I'm looking at the wrong thing.iwiznia commentedon May 19, 2021
Maybe it is missing a
.join(',')?francoisl commentedon May 19, 2021
Yes was literally just thinking of doing that ^^
francoisl commentedon May 19, 2021
Yeah it works, going to prepare PR and test the other platforms.
iwiznia commentedon May 19, 2021
I am still very confused how this only happened in android 😕
Julesssss commentedon May 20, 2021
Nice find, would love to know why only Android has this issue 🤷♂️.
francoisl commentedon May 20, 2021
I know, me too! I retested from
mainon web and iOS after doing the fix yesterday, thinking that it couldn't actually work but... it did. I didn't dig deeper than this cause I had a bunch of other stuff to take care of, but I'll try to investigate again today.In the meantime, anyone feel free to take over the PR if it's urgent.
trjExpensify commentedon May 20, 2021
Thank yah, Franc. ❤️