fix: the tooltip button is not functional on android#62213
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-05-18.at.22.18.13.movAndroid: mWeb ChromeScreen.Recording.2025-05-18.at.23.03.17.moviOS: HybridAppScreen.Recording.2025-05-18.at.23.16.57.moviOS: mWeb SafariScreen.Recording.2025-05-18.at.23.16.57.movMacOS: Chrome / SafariScreen.Recording.2025-05-18.at.23.08.35.movMacOS: DesktopScreen.Recording.2025-05-18.at.23.13.47.mov |
|
🚧 @MonilBhavsar has triggered a test app build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
|
@jponikarchuk Could you please help verify the ad-hoc build on your device? The current changes still don't work with the hybrid app on my device (Sony Xperia 5 / Android 11), although it work fine in the standalone version If the current work works on your tested device, we can proceed with this change. standalone versionScreen.Recording.2025-05-18.at.22.18.13.movhibrid version-928089560137296765screen-20250519-171324.MP4 |
|
@suneox Looks like the 'No thanks' button is working now. Was there an issue with it before this change? If not, then I think the RCA might be incorrect. I’ll take a look tomorrow |
@linhvovan29546 Before the change, both buttons didn't work. In the current ad-hoc build from this PR, only the “No thanks” button works, while the “Try it out” button still doesn’t function. Currently, both buttons share the same change set, but only one of them works. If this change set works on another device i think we can proceed with this one. Before changescreen-20250519-234441_2.mp4Ad-Hoc Buildscreen-20250519-234256_2.mp4 |
|
@suneox I just tested the ad-hoc build on my device(android 14), and the 'Try it out' button doesn't work, even though it works on my standalone app. I think the issue is that on hybrid Android builds, we can't download the test receipt
|
|
Okay, I think I know the root cause. The issue might occur in release mode, which would affect both hybrid and standalone apps. Update: Can reproduce on standalone app in release mode. |
|
@suneox This issue is still reprodicible on ad-hoc build 9.1.43-7 video_2025-05-19_23-31-29.mp4 |
On Native, we use |
Do we have a next step for this? Could you please try bundling the release locally and continue investigating from there? |
I haven’t had a chance to look into this more deeply due to being busy. I’ll try tomorrow or on Saturday. I think we may need to find other way to download the test receipt on Android, maybe we could use |
|
@suneox I have a potential solution for this, though it may not be ideal. We can use
Here's a basic example of how that might work. I've tested it, and it works on both Android and iOS. import * as FileSystem from 'expo-file-system';
import { Asset } from 'expo-asset';
....
const setTestReceiptAndNavigate = useCallback(async () => {
try {
const filename = `${CONST.TEST_RECEIPT.FILENAME}_${Date.now()}.png`;
const path = `${ReactNativeBlobUtil.fs.dirs.CacheDir}/${filename}`;
const [{localUri}] = await Asset.loadAsync(require('@assets/images/fake-receipt.png'));
if(!localUri){
console.error('Error downloading test receipt: localUri is null');
return
}
FileSystem.copyAsync({
from: localUri,
to: `file://${path}`,
}).then(async () => {
const file: FileObject = {
uri: `file://${path}`,
name: filename,
type: CONST.TEST_RECEIPT.FILE_TYPE,
size: 0,
};
if (!file.uri) {
return;
}
setMoneyRequestReceipt(initialTransactionID, file.uri, filename, !isEditing, file.type, true);
navigateToConfirmationStep([{file, source: file.uri, transactionID: initialTransactionID}], false, true);
})
.catch((error) => {
console.error('Error downloading test receipt:', {message: error});
});
} catch (error) {
console.error('Error in setTestReceiptAndNavigate:', {message: error});
}
}, [initialTransactionID, isEditing, navigateToConfirmationStep]);I’m not sure if this is the best approach, but it would increase the APK size only slightly from cc @aldo-expensify for viz, you can check the comments above for more context. |
|
I'm understanding that the last piece is trying to get the test-receipt file to work in Android. I wonder if this has been broken since the original implementation. cc @grgia Is this the only file we get this way? aren't any other flow broken because of the same problem? About using |
|
@kubabutkiewicz do you have an opinion on the above? 🙇 Just asking you because you did the original implementation of this code here #57171 |
|
I saw other issue with the same root cause: #62827. Maybe we can apply that solution here as well, if it's already resolved. |
|
Next step: I'll merge main after the referenced PR is merged. |
@suneox Let's retest it. I believe it's working fine now. |
|
✋ 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/aldo-expensify in version: 9.1.55-0 🚀
|
|
🚀 Deployed to staging by https://github.com/aldo-expensify in version: 9.1.56-2 🚀
|
|
🚀 Deployed to staging by https://github.com/aldo-expensify in version: 9.1.58-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.1.58-4 🚀
|

Explanation of Change
Fixed Issues
$ #60634
PROPOSAL: #60634 (comment)
Tests
Offline tests
Same as test above
QA Steps
Same as test above
PR 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
MicrosoftTeams-video.mp4
Android: mWeb Chrome
Screen.Recording.2025-05-16.at.20.05.20.mov
iOS: Native
Screen.Recording.2025-05-16.at.19.52.59.mov
iOS: mWeb Safari
Screen.Recording.2025-05-16.at.19.54.10.mov
MacOS: Chrome / Safari
Screen.Recording.2025-05-16.at.20.00.15.mov
MacOS: Desktop
Screen.Recording.2025-05-16.at.20.02.23.mov