-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Unmount images while loading #12152
Comments
This is also an issue when using FlatList with a list of items that contains images. Because the View gets unloaded all the time when scrolling, you will get a lot of these warnings. |
This will help: https://github.com/kfiroo/react-native-cached-image
|
Any news from the RN team? :) It's been a loooong time |
It is community driven project, so PRs are always welcome! |
Before make any PR I usually wait until one collaborator tell me that's something needed. I'll take your comment @shergin as a call ;) |
Well, honestly I have no any idea why this happening. But... usually code is worth a thousand words. |
I had the same issue with FlatList with images on rows. Not only warning but also there are serious performance problems too. I convert it to ListView, its all works great now. There is definitely something going on with FlatList |
Having same issues, I am rendering 3 images in a view using images uploaded on cloudinary |
I'm also experiencing this while loading images into a flatlist |
having a similar issue it works well on android 6 but ios 11.0 has someone found a workaround? |
ok my bad, images were called with http |
I'm encountering the same problem after switching from RN 0.48.4 to 0.52.0. |
+1 I get the impression that this is not just a warning. I think that somehow this problem combined with the flat list may be causing some sporadic crashes in my application. I am using the This is the list of crashes that I have not yet been able to solve, but thanks to - SIGTRAP The statistics collected tell me that these crashes happen around 1 per week. As you can see, it's something super sporadic. Maybe related to this topic |
@sospedra How were you able to remove this warning? I am facing the same |
YellowBox.ignoreWarnings(['Task orphaned']); @AishwaryaSurana , try this to ignore yellow box warnings. |
Well @timwangdev this will only hide the warnings, they won't be completely removed |
PLEASE use the +1 react feature, it is not necessary to post "+1" and notify everyone who is following the issue. |
I will clean all the “+1” comments, to make this thread more readable. |
@gabegreenberg I don't recall seeing this in the past few months |
Well actually it's causing HEAVY performances drop on large lists. In my case it happens on a flatlist displaying items with images. When I try to move to another page using react-navigation whereas all images didn't load, the memory usage goes over 700+MB. |
@timwangdev |
Same issue happens after upgrading the RN from 0.47 to 0.56 Any solution to solve this? |
I'm on RN 55.4 and having this issue, anyone have any workaround other than just ignoring the yellowbox? I've tried loading the image from parent component and passing it in as props to the child but still giving me task orphaned error, though I'm not sure why since the image component instantiation is only done once in the parent and used multiple times by the children so popping the children of the nav stack shouldn't cause this error... |
@rayj10 I switched to https://github.com/Flipkart/recyclerlistview/ as it has better performance overall. |
any fixes for this yet?? |
the same here :S |
If instagram, snapchat, gmail were all developed using react native, how they are addressing this task without any issue? |
Actually, I am using FastImage to render cells with images (approx 500-600) using a FlatList. I strongly recommend using that instead of RN's image It helps if "removeClippedSubviews" is true. |
@connect-dev I bet server side rendering helps a lot. |
Encountered the same problem |
Same problem. Any updates from RN team? |
I have also have the warning, but the image displays normally. Maybe the warning shouldn't be there? I had the same code for a while and this is the first time I get this warning. |
Hello there 👋 this issue doesn't have a repro (which means, a Because of this, we are going to close this issue - but if a repro is shared, we are happy to reopen it 🤗 |
I encountered a similar YellowBox warning that was unrelated to loading images in my App. Instead, in dev mode on react-native 0.59, I had some console.warn statements that have a spinner while the Source Map loads that is replaced with a Check Mark. As far as I can tell, even though the check mark always appears, it sometimes triggers the Task orphaned for request YellowBox when the transition between spinner and check mark occurs and may be related to communication delays/timeouts on the bridge between the physical device(in this case iPhone SE) and the react-native packager running on your computer. In my case it is not related to any in app image loading or network calls, as I was using a hard coded object and some console warning to validate some sanitization I was doing to make sure I was getting the correct info from an expected API call without needing to worry about actually hitting the API. It also usually only appeared after several occurrences of making changes, shaking my device, clicking Reload, and running the changes before the YellowBox with: Task orphaned for request: <NSMutableURLRequest: 0x1c001c650> { URL: data:image/png;base64, ... |
I am seeing this in RN 0.59.8 with an Image trying to load from a file:// URI (on disk) shortly after startup. The image does not load, which means I cannot ignore the warning. The file is fine. YellowBox.js:67 Task orphaned for request <NSMutableURLRequest: 0x2835edb50> { URL: file:///var/mobile/Containers/Data/Application/1AD76457-FB51-49B3-9965-92E555C8EA7E/Documents/photo.jpg } |
@xaphod Did u find any solution? |
Still an issue for me on I really hope this is a different issue or I'm doing something wrong because this has been open since somewhere in 2017 :( |
Sill facing this issue for ios. |
Hi, |
I'm loading few images per scene but they take a few seconds to load.
That means that in the meantime the user can navigate to another scene.
Causing the images to unmount before they finish loading.
Which triggers the following warning:
Task orphaned for request <NSMutableURLRequest: [[SOME_HEX_CODE]]> { URL: [[IMG_URL]] }
It's not crashing. I just want to know if relying the loading cancellation to React unmounting is ok? Having these warning all around is safe?
Note variables wrapped in [[]]
The text was updated successfully, but these errors were encountered: