[CP Staging] chore: attempt at fixing infinite loading on android#62827
Conversation
|
@Beamanator @marcaaron @mountiny Can someone trigger an ADHOC build for this PR? I'm currently unable to test my solution with a local production build |
|
triggered |
|
Welp it looks like web may have succeeded, but it didn't get posted cuz a few of the actions failed 🤔 - https://github.com/Expensify/App/actions/runs/15261583814 |
|
🚧 @Beamanator has triggered a test app build. You can view the workflow run here. |
|
ok that should work lol 🙃 |
…ads-infinitely-after-submitting-email
This comment has been minimized.
This comment has been minimized.
|
@Beamanator testing now! |
|
@Beamanator the fix attempt doesn't work. I'll try another idea |
|
darn ok thanks for the update! |
…ads-infinitely-after-submitting-email
|
@Beamanator can you trigger another adhoc build, please? 😄 |
|
Sorry for the delay! Yes will do very soon!
…On Mon, May 26, 2025 at 5:06 PM Pedro Guerreiro ***@***.***> wrote:
*pac-guerreiro* left a comment (Expensify/App#62827)
<#62827 (comment)>
@Beamanator <https://github.com/Beamanator> can you trigger another adhoc
build, please? 😄
—
Reply to this email directly, view it on GitHub
<#62827 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA5UTP6LJ4KLE4SGRBZBIYD3AOM7DAVCNFSM6AAAAAB56LIDYSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMJQG42DANRWGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
🚧 @Beamanator has triggered a test app build. You can view the workflow run here. |
| import CONST from '@src/CONST'; | ||
|
|
||
| function getFileURL(asset: Asset, assetExtension: AssetExtension) { | ||
| const source = Image.resolveAssetSource(asset).uri; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
…ltip not responding
…ads-infinitely-after-submitting-email
|
@Beamanator I was able to create a local release build using Screen.Recording.2025-05-27.at.06.44.15.movcc @fabioh8010 @linhvovan29546 I'm using react-native-fs copyFileRes and it worked! In the screen recording above you can observe that I was able to submit the receipt to Manager McTest 😄 |
|
I updated the PR checklist, added a proposal, testing steps and screen recording for android native |
@pac-guerreiro Yeah, I previously tried that solution #62213 (comment), but it didn’t work. I might have passed the wrong value, so I ended up using a different approach. |
fabioh8010
left a comment
There was a problem hiding this comment.
Looks really good! I will make some testing today too.
There was a problem hiding this comment.
I suggest a few changes to getFile:
- Create a
types.tsfile to storegetFiletypes according to our guidelines. - Add comment explaining why we have to do this different code in Android.
| type SetTestReceipt = (asset: ImageSourcePropType, assetExtension: ReceiptExtension, onFileRead: OnFileRead) => void; | ||
| type AssetExtension = 'jpg' | 'png'; | ||
|
|
||
| type Asset = ImageSourcePropType; |
There was a problem hiding this comment.
| type Asset = ImageSourcePropType; |
Doesn't seem necessary
|
|
||
| type SetTestReceipt = (asset: Asset, assetExtension: AssetExtension, onFileRead: OnFileRead, onFileError?: OnFileError) => void; | ||
|
|
||
| // eslint-disable-next-line import/prefer-default-export |
There was a problem hiding this comment.
| // eslint-disable-next-line import/prefer-default-export |
|
Are the iOS/Android adhoc builds crashing for anyone else? |
|
@Ollyws I'm unable to install iOS adhoc build on my physical iPhone 14 Plus. It says that the app integrity could not be verified. I guess this is due to the fact that my device is not registered |
|
@pac-guerreiro is the Android adhoc working for you? My release build is taking forever. |
|
@Ollyws I'll give it a try and let you know |
|
@Ollyws @pac-guerreiro Tested on my emulator and having crashes too (after I tried to sign in). Not sure what's happening but this PR isn't doing anything that could explain such crash. Screen.Recording.2025-05-27.at.17.08.59.mov |
|
@fabioh8010 damn 🫨 I confirm that the android app is crashing on my emulator also |
|
🚧 @Beamanator has triggered a test app build. You can view the workflow run here. |
…ads-infinitely-after-submitting-email
This comment was marked as outdated.
This comment was marked as outdated.
|
It's crashing for me on that build too. |
…ads-infinitely-after-submitting-email
|
🚧 @marcaaron has triggered a test app build. You can view the workflow run here. |
|
Going to do one more test on a few Android devices in browser stack to confirm there are no more crashes then will merge and CP this change. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp01_Android_Native.mp4Android: mWeb Chrome02_Android_Chrome.mp4iOS: HybridApp03_iOS_Native.mp4iOS: mWeb Safari04_iOS_Safari.mp4MacOS: Chrome / Safari05_MacOS_Chrome.mp4MacOS: Desktop06_MacOS_Desktop.mp4 |
|
Tested this via BrowserStack and was able to get through the flow 🎉 |
…2688-test-drive-button-loads-infinitely-after-submitting-email chore: attempt at fixing infinite loading on android (cherry picked from commit 5cf5257) (cherry-picked to staging by marcaaron)
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Cherry-picked to staging by https://github.com/marcaaron in version: 9.1.51-10 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.1.52-0 🚀
|
Explanation of Change
Fixed Issues
$#62688
PROPOSAL:
The cause for the infinite loading state on Android is due to bad error handling while reading test receipt asset file.
During our test we detected that, on release android builds, the app is unable to open the test receipt file due to a malformed url. This was not detected on debug android builds, since the test receipt file would be fetched from metro bundler. But on release android builds, the image assets are stored in
res/drawablefolder.I tried using
react-native-blob-utilasset method but it didn't work.I also tried using
file://protocol but it's not allowed.I was able to fix this using
react-native-fscopyFileRes method on release android builds, to copy the test receipt file fromres/drawableandroid folder to our cache folder under a new filename.Tests
Manage my team's expensesOffline tests
QA Steps
Manage my team's expensesPR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2025-05-27.at.06.44.15.mov
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop