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
Version Number: 9.0.41-1 Reproducible in staging?: Y Reproducible in production?: N/A unable to check If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team
Action Performed:
Launch New Expensify app
Open workspace chat
Tap on the chat header
Tap Share
Tap Download
Download the share code
View the downloaded code on device gallery
Expected Result:
The downloaded share code is not blank
Actual Result:
The downloaded share code is blank
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Please re-state the problem that we are trying to solve in this issue.
Downloaded QR Code is blank in iOS.
What is the root cause of that problem?
This happened after we upgraded the react-native-view-shot in #49595. The upstream issue started in version 4.0.0-alpha.2. Someone reported the issue upstream here too.
After knowing the issue is from the react-native-view-shot, now we need to understand what is the issue there. The issue happens after this upstream PR which replaces the iOS deprecated function.
Previously, it used UIGraphicsBeginImageContextWithOptions and UIGraphicsGetImageFromCurrentImageContext and "draw" the image between the active context:
If we don't have to stick with react-native-view-shot we can use @s77rt/react-native-viewshot which provides a similar API and it seems to line up with @bernhardoj's proposed solution
Activity
melvin-bot commentedon Sep 27, 2024
Triggered auto assignment to @thienlnam (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.github-actions commentedon Sep 27, 2024
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Nodebrute commentedon Sep 27, 2024
I am on latest main. I am unable to reproduce this issue

bernhardoj commentedon Sep 28, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Downloaded QR Code is blank in iOS.
What is the root cause of that problem?
This happened after we upgraded the
react-native-view-shotin #49595. The upstream issue started in version 4.0.0-alpha.2. Someone reported the issue upstream here too.After knowing the issue is from the
react-native-view-shot, now we need to understand what is the issue there. The issue happens after this upstream PR which replaces the iOS deprecated function.Previously, it used
UIGraphicsBeginImageContextWithOptionsandUIGraphicsGetImageFromCurrentImageContextand "draw" the image between the active context:But now, it looks like this:
A renderer is created and the context is now available from the
imageWithActions. So, the "drawing" between them does nothing.What changes do you think we should make in order to solve the problem?
There is a solution here but it's incomplete since it doesn't respect the
renderInContextparams and always userenderInContext.So, to solve this, we need to move the rendering/"drawing" inside
imageWithActions.The context now is coming from
rendererContext.Last, we need to update this success variable with a __block modifier, so it's updatable from the
imageWithActionsblock.s77rt commentedon Sep 28, 2024
If we don't have to stick with
react-native-view-shotwe can use @s77rt/react-native-viewshot which provides a similar API and it seems to line up with @bernhardoj's proposed solutionroryabraham commentedon Sep 29, 2024
@lakchote wdyt? Should we just revert #49595?
lakchote commentedon Sep 30, 2024
Yes, we should just revert and wait for the library to offer a new stable version. Once that's done, we'll reconsider adding it.
thienlnam commentedon Sep 30, 2024
This has been CPEd