-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images not rendering properly on ios after code-push with resizeMode center #1222
Comments
I notice this for |
Aha, actually I see now that |
+1 |
Hey there! We haven't forgotten about this issue. We have been doing some internal changes on the way we're executing github support. Are you still having this problem? |
Hello, the case I mentioned above: yes!
…On Mon, 26 Mar 2018 at 23:02, Zakeel M. ***@***.***> wrote:
Hey there!
We haven't forgotten about this issue. We have been doing some internal
changes on the way we're executing github support. Are you still having
this problem?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1222 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAK22O5xkrsM_c4RwbZgzo4B7BIb_8qWks5tiVdjgaJpZM4SYeGg>
.
|
@itoys Thanks for the reply. In the case I described above (using a drop shadow image), we use
with
This is probably relevant to the issue, especially unsetting width/height, I should have mentioned it before. |
Sorry guys, I doesn't see difference between binary version and codepush. |
Sorry, was busy in other projects. I am still facing this issue. @itoys It's not possible for me to create a example project for some days. The only difference I see in Code push code is, I am not doing it manually, its done by Default option which is OnAppResume I think. I have updated the screenshots and text also, feel free to ask questions! |
Hi @Ashwin-Mothilal Thanks! |
I have changed the permissions for the images, you can check it now. Just have a look at it. I will try to give project after this week, working on other production issues. |
Noticing this as well. Changing to resizeMode={'contain'} seems to fix it. Most of these were absolutely positioned images. Maybe some data stripped from assets in the bundling/distribution process? |
CodePush and plugins doesn't change your code and assets. https://codepush.azurewebsites.net/updateCheck?deploymentKey=[your-key]&appVersion=[app-version] |
Closing this issue for now! I recommend you to wrap all your props values with Thanks! |
Hi, I am attaching the sample project for you here |
What if we are not using it as props but using it within the Image style object? Same problem? Also would it not make sense to have the code-push build mimic the behaviour of a normal production build? Production builds work and look just fine with no errors whatsoever. |
Same here. I have two separate issueses. First is a background image for a chat. It had transparency (by mistake) and for some reason it was resized incorrectly. It was zoomed and very low res. iOS had this bug, but android works well. Second case is a simple png images with capInsets. It looks like it just ignores cap insets at all. UPD: UPD2: |
Ok, i figured out the root cause of the issue. When loading images from CodePush bundle it doesn't respect scale factor of the resource. It works well for built-in resources since UIImage can load with right scale factor automatically. Unfortunately, the only (and dirty) solution is to patch react-native implementation. In react-native/React/Base/RTCUtils.m patch
with
This will work only for png files. |
@itoys should we open this back up? |
For sure it should be opened back. Also after digging around image loading it turns out that there are no image caching at all for built-in images on iOS. For example, if app will show series of messages with bubble decorations then build with codepush will load each image again and again. That's really creepy for performance. |
@ex3ndr you're a damn hero |
@itoys or anyone from Microsoft can you open this back up please or let us know how we can deal with it? Editing React Native core files is not an option. |
Hi all, Sure, I'll reopen it. Thanks for reporting! |
@stueynet for now i am patching the RN package using the code from @ex3ndr, for me this is a good solution as all our images follow that exact convention. Though it may not work for you. |
@ex3ndr's solution works for me, thank you for digging into it. But I think it's pretty hacky |
Hello, I just noticed the same problem trying to update my app with CodePush... |
@wynch yes, it's RN issue. CodePush does nothing with your js/assets. It just calls RN cli under the hood and pushes generated bundle to CodePush server from where your customers can download it. The main difference between downloaded bundle and binary bundle is location. We saw several places in RN code where there are conditions checking whether bundle/asset is located in app or in file system. We don't know if there is a PR with fixes in RN repository. |
Hi, I just bumped into this same problem today. This project is available here: https://github.com/Fsarmento/codepushImageRepeate |
Hi @Fsarmento! thanks for demo app! I've reproduced the issue. Please try to apply workaround suggested by @ex3ndr above. It works for me. |
Modifying React Native's code is not a solution for any project using continuous integration so this issue prevents Code Push from being integrated in medium to large size apps. |
I ran into this -- as far as I can tell it's a regression introduced in RN itself and I filed facebook/react-native#22383 Most of the images in our application are messed up and it's blocking our use of CodePush for our application :( |
Hi @ascherkus! You did a really great job finding this particular commit! 👍 |
Same problem here... I solved forcing the image to be with resizeMode stretch 😞 |
Hello @geof90 @lostintangent @max-mironov I'm facing the same issue, removing It's really important I guess for many company that relies heavily on Codepush… Best regards guys |
Hey guys, a fix has been merged into master in the React Native project. You can create a patch file from the following diff: https://patch-diff.githubusercontent.com/raw/facebook/react-native/pull/23446.diff |
Marvelous ! I made a workaround, i'll wait react native to update :) THanks |
Hi all, Thanks, |
@ScreamZ What workaround did you do? |
Not using |
updating to RN 0.59.1 worked for me |
use "contain". worked for me... |
Steps to Reproduce
Expected Behavior
Images should render properly as it is in dev version debug mode
Actual Behavior
Images with resizeMode "center" gets resizeMode "cover". I am mentioning "cover" because it matches with it in dev mode.
SCREENSHOTS
After CodePush to Production App - 1 Improper images
After CodePush to Production App - 1 Some proper images - Images representing Views, Comments, Attachments are looking good.
Expected / Debug Build
Environment
###Notes
The App uses this tabbar component in React Navigation
For the topbar it uses StackNavigator.
The text was updated successfully, but these errors were encountered: