Repository navigation
Updated react-native-image-picker to 4.10.2 - #13246
Conversation
|
@Gonals @Santhosh-Sellavel One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
mountiny
left a comment
There was a problem hiding this comment.
@s77rt LGTM, can you although test this issue did not come back? and leave a screen recording? thttps://github.com//issues/9424
Thank you!
|
@mountiny The change completely unrelated to the linked issue. The size won't double, we are just choosing another format |
I was just asking because you have previously suggested the fix for the doubling logic should be reverted |
|
@mountiny Yeah because it was part of the issue, I have noted this here react-native-image-picker/react-native-image-picker#2056
After the fix, the size was no longer double but also we were not getting any JPEG file only HEIC. It's all good now, we just need to test this PR to be sure the HEIC issue is fixed |
|
@Santhosh-Sellavel Let us know if you can get to this one or we can send this review to the pool |
|
I'll get to it today. |
mountiny
left a comment
There was a problem hiding this comment.
Thanks Santosh, code lgtm, just need to test
|
@s77rt Please other platforms screen even, it's not affected. Please include the simulator for iOS. To Ensure everything is working as expected! |
|
The change is specific to iOS. Uploading other screenshots is completely redundant. |
|
The test cannot be made on a simulator. Must be a real device, that's a known bug that iOS simulator does not handle phpicker heic to jpeg format correctly. |
I think it is necessary to ensure |
|
@Santhosh-Sellavel Check the code change on the library, only one file has been changed, that's all. And that file only effects iOS. |
|
@Santhosh-Sellavel Okay this is strange, if this is failing now means it was failing before. |
|
I just followed the test steps instead of iOS, I tried it on android |
|
@Santhosh-Sellavel Something seems wrong, did you choose the option to upload a photo from gallery? |
Screen_Recording_20221203_023221_New.Expensify.1.mp4 |
|
@Santhosh-Sellavel Thanks for the test |
mountiny
left a comment
There was a problem hiding this comment.
@Gonals @Santhosh-Sellavel I think if this works on iOS (I cannot test on physical device at the moment, we should get someone to try to send the picture not from gallery but from camera directly), we should merge this as this is quite annoying bug on iOS.
Then we can follow up with Android as that is i believe not that important usecase
|
Why does this fail with jpeg file though? |
|
I've tried to select the |
Reviewer Checklist
Screenshots/VideosWeb, desktop & mWeb android it's not supported popup shownPR Fails for AndroidiOSRPReplay_Final1670245651.MP4DetailsiOS mWebRPReplay_Final1670329955.MP4 |
Can we confirm:
That should be a goal of this PR. Android should have worked before so this is just to check regression. @Santhosh-Sellavel Can you additionally please confirm if the jpeg image upload on android is failing in main too? |
RPReplay_Final1670245651.MP4
Pick Heic from Gallery/Document fails and take photo using inside the app pass.Gallery_Fails_Take_Photo_inside_App_Pass.mp4Take a photo from the Camera and upload it via Expensify failsAlso, it depends on what extension the file is saved, we can customize this in settings. When its HEIF format it fails. Screen_Recording_20221205_193138_Media.Storage.mp4
Normal jpgs/jpegs uploaded successfullyScreen_Recording_20221205_193300_Files.mp4 |
|
Thank for thorough testing @Santhosh-Sellavel seems like the heic format issues are not resolved yet @s77rt |
|
@Santhosh-Sellavel @mountiny @Santhosh-Sellavel Can I get the photos you are testing with? Unfortunately I'm unable to debug any further due to simulator limitation. @Santhosh-Sellavel I have to ask you, are you sure you are using the latest react-native-image-picker? |
|
Here is the diff, I have used the version in the PR only. As you can see here iOS works fine $ git diff
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 00b569a90e..c47714fbae 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -472,7 +472,7 @@ PODS:
- React-Core
- react-native-image-manipulator (1.0.5):
- React
- - react-native-image-picker (4.10.1):
+ - react-native-image-picker (4.10.2):
- React-Core
- react-native-netinfo (8.3.1):
- React-Core
@@ -980,7 +980,7 @@ SPEC CHECKSUMS:
react-native-document-picker: f68191637788994baed5f57d12994aa32cf8bf88
react-native-flipper: dc5290261fbeeb2faec1bdc57ae6dd8d562e1de4
react-native-image-manipulator: c48f64221cfcd46e9eec53619c4c0374f3328a56
- react-native-image-picker: f2ab1215d17bcfe27b0eb6417cc236fd1f4775e7
+ react-native-image-picker: bf34f3f516d139ed3e24c5f5a381a91819e349ea
react-native-netinfo: 1a6035d3b9780221d407c277ebfb5722ace00658
react-native-pdf: 33c622cbdf776a649929e8b9d1ce2d313347c4fa
react-native-plaid-link-sdk: 77052f329310ff5a36ddda276793f40d27c02bc4
diff --git a/package-lock.json b/package-lock.json
index 70c9e462d4..29cd4ab8f2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -65,7 +65,7 @@
"react-native-google-places-autocomplete": "git+https://github.com/Expensify/react-native-google-places-autocomplete.git#3bbd17d63e6c38d38d857b50f6037c1c0376ff06",
"react-native-haptic-feedback": "^1.13.0",
"react-native-image-pan-zoom": "^2.1.12",
- "react-native-image-picker": "^4.10.1",
+ "react-native-image-picker": "^4.10.2",
"react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#6b5ab5110dc3ed554f8eafbc38d7d87c17147972",
"react-native-modal": "^13.0.0",
"react-native-onyx": "1.0.29",
@@ -35419,9 +35419,9 @@
}
},
"node_modules/react-native-image-picker": {
- "version": "4.10.1",
- "resolved": "https://registry.npmjs.org/react-native-image-picker/-/react-native-image-picker-4.10.1.tgz",
- "integrity": "sha512-tPA9UtboEsZ8qtm7pX9WInlo9sf0J2ArJgP4uVgKw1QNrwkRX/kZQ6uzOSN747Dhj9WS42ce4RN+rFK86J13DQ==",
:...skipping...
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 00b569a90e..c47714fbae 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -472,7 +472,7 @@ PODS:
- React-Core
- react-native-image-manipulator (1.0.5):
- React
- - react-native-image-picker (4.10.1):
+ - react-native-image-picker (4.10.2):
- React-Core
- react-native-netinfo (8.3.1):
- React-Core
@@ -980,7 +980,7 @@ SPEC CHECKSUMS:
react-native-document-picker: f68191637788994baed5f57d12994aa32cf8bf88
react-native-flipper: dc5290261fbeeb2faec1bdc57ae6dd8d562e1de4
react-native-image-manipulator: c48f64221cfcd46e9eec53619c4c0374f3328a56
- react-native-image-picker: f2ab1215d17bcfe27b0eb6417cc236fd1f4775e7
+ react-native-image-picker: bf34f3f516d139ed3e24c5f5a381a91819e349ea
react-native-netinfo: 1a6035d3b9780221d407c277ebfb5722ace00658
react-native-pdf: 33c622cbdf776a649929e8b9d1ce2d313347c4fa
react-native-plaid-link-sdk: 77052f329310ff5a36ddda276793f40d27c02bc4
diff --git a/package-lock.json b/package-lock.json
index 70c9e462d4..29cd4ab8f2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -65,7 +65,7 @@
"react-native-google-places-autocomplete": "git+https://github.com/Expensify/react-native-google-places-autocomplete.git#3bbd17d63e6c38d38d857b50f6037c1c0376ff06",
"react-native-haptic-feedback": "^1.13.0",
"react-native-image-pan-zoom": "^2.1.12",
- "react-native-image-picker": "^4.10.1",
+ "react-native-image-picker": "^4.10.2",
"react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#6b5ab5110dc3ed554f8eafbc38d7d87c17147972",
"react-native-modal": "^13.0.0",
"react-native-onyx": "1.0.29",
@@ -35419,9 +35419,9 @@
}
},
"node_modules/react-native-image-picker": {
- "version": "4.10.1",
- "resolved": "https://registry.npmjs.org/react-native-image-picker/-/react-native-image-picker-4.10.1.tgz",
- "integrity": "sha512-tPA9UtboEsZ8qtm7pX9WInlo9sf0J2ArJgP4uVgKw1QNrwkRX/kZQ6uzOSN747Dhj9WS42ce4RN+rFK86J13DQ==",
+ "version": "4.10.2",
+ "resolved": "https://registry.npmjs.org/react-native-image-picker/-/react-native-image-picker-4.10.2.tgz",
+ "integrity": "sha512-3h9PrA1dQ84rVeipzQE4eWTELvflSHNtJZN6rz7NkZyaxo9YZV8H/TswBpHwiS5YWlyu+zlLzSoWVa1opSu7GA==",
"peerDependencies": {
"react": "*",
"react-native": "*"
@@ -69780,9 +69780,9 @@
"requires": {}
},
"react-native-image-picker": {
- "version": "4.10.1",
- "resolved": "https://registry.npmjs.org/react-native-image-picker/-/react-native-image-picker-4.10.1.tgz",
- "integrity": "sha512-tPA9UtboEsZ8qtm7pX9WInlo9sf0J2ArJgP4uVgKw1QNrwkRX/kZQ6uzOSN747Dhj9WS42ce4RN+rFK86J13DQ==",
+ "version": "4.10.2",
+ "resolved": "https://registry.npmjs.org/react-native-image-picker/-/react-native-image-picker-4.10.2.tgz",
+ "integrity": "sha512-3h9PrA1dQ84rVeipzQE4eWTELvflSHNtJZN6rz7NkZyaxo9YZV8H/TswBpHwiS5YWlyu+zlLzSoWVa1opSu7GA==",
"requires": {}
},
"react-native-image-size": {
diff --git a/package.json b/package.json
index 849ee69d72..ef14c28a09 100644
--- a/package.json
+++ b/package.json
@@ -95,7 +95,7 @@
"react-native-google-places-autocomplete": "git+https://github.com/Expensify/react-native-google-places-autocomplete.git#3bbd17d63e6c38d38d857b50f6037c1c0376ff06",
"react-native-haptic-feedback": "^1.13.0",
"react-native-image-pan-zoom": "^2.1.12",
- "react-native-image-picker": "^4.10.1",
+ "react-native-image-picker": "^4.10.2",
"react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#6b5ab5110dc3ed554f8eafbc38d7d87c17147972",
"react-native-modal": "^13.0.0",
"react-native-onyx": "1.0.29",
~
~ |
|
@Santhosh-Sellavel How can I get the images you are testing with? I'd like to test with those exact images to be sure. |
|
try with a real android device, any
|
|
@Santhosh-Sellavel Hmmm, I see this is a raw heic file, I think iOS or any other platform won't give us a jpeg representation because they only have heic, i will check if we do get a jpeg representation or not. |
|
@Santhosh-Sellavel
Just to be sure, I have used the old version and produced the error you saw earlier, then applied my fix and tried again and it's working fine. So It's more likely you are using an old version. (sorry for the unnecessary long video, the server host seems to be having network issues, just skip to the end) Kooha-2022-12-05-20-51-52.mp4@mountiny Since there is no simulator limitation you can test this as well, heic images: https://filesamples.com/formats/heic |
|
iOS Works fine check recording here #13246 (comment) or #13246 (comment) Issue only exists with android. |
|
Well I have no idea why you are testing against android, this PR only targets iOS as that's what was the issue about. If it's not working on android that because it was never working on android. |
|
Android support for heic was only added on version 10 What do you think? should we merge this and handle android in a separate issue? |
|
Honestly I think if the upload and photo taking/ upload works on iOs we can merge this. Heic on Android should be uncommon, but we should also investigate and fix this. Due to focus on other priorities I wont review/ follow this PR anymore. |
I tested as it was asked here, also it was part of reviewer checklist. To catch this type of bugs sooner. |
|
@Santhosh-Sellavel Updated |
Santhosh-Sellavel
left a comment
There was a problem hiding this comment.
Checklist: #13246 (comment)
PR Fails for Android
Not supported error shown on mWeb Android, Desktop & Web
Tests pass on iOS & iOS mWeb|
Approving as we are okay with the iOS fix alone as mentioned here
|
@s77rt Offline tests should be, verify uploading attachment is greyed out! |
|
@Santhosh-Sellavel I'm only doing tests for code that I made change into. I have not changed a single line in the App code. Just on the react-native-image-picker iOS side. Offline tests are a thing when the App code is changed and it's not the case here. |
|
Thanks @Santhosh-Sellavel |
|
Thanks for merging, this took an unexpected long time. |
|
🚀 Deployed to production by @chiragsalian in version: 1.2.38-6 🚀
|


Details
Updated react-native-image-picker to get the latest update from react-native-image-picker/react-native-image-picker#2056
Fixed Issues
$ #12283
PROPOSAL: #12283 (comment)
Tests
1 .Go to Settings > Camera > Format > ensure that "high-efficiency" is enabled
2. Open the iOS app
3. Visit any DM
4. Take a picture with the native iOS camera, ensuring that "live" photo is disabled
5. Tap the grey plus icon to the right of the chat input
6. Select a image from your camera roll (for iOS should be HEIC files by default)
7. Upload the image
8. Verify that the image is uploaded successfully
Offline tests
Not Applicable
QA Steps
1 .Go to Settings > Camera > Format > ensure that "high-efficiency" is enabled
2. Open the iOS app
3. Visit any DM
4. Take a picture with the native iOS camera, ensuring that "live" photo is disabled
5. Tap the grey plus icon to the right of the chat input
6. Select a image from your camera roll (for iOS should be HEIC files by default)
7. Upload the image
8. Verify that the image is uploaded successfully
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*filesWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)Screenshots/Videos
Web
Not ApplicableMobile Web - Chrome
Not ApplicableMobile Web - Safari
Not Applicable
Desktop
Not ApplicableiOS
Kooha-2022-12-05-20-51-52.mp4
Android
Not Applicable