-
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
Support for iOS 17 #1002
Comments
🆙 |
Deprecated doesn't necessarily mean not available. I made changes regarding this to my fork in this commit: This repo seems dead. |
I encountered this issue while running the iOS17 phone on Xcode15, and I would like to know if it is related to it,“UIGraphicsBeginImageContext() failed to allocate CGBitampContext: size={0, 0}, scale=3.000000, bitmapInfo=0x2002. Use UIGraphicsImageRenderer to avoid this assert.” |
Thank you, you save for me a day |
Thank you 🫶 |
This seems like a highly critical issue |
This PR will fix the issue, This PR addresses an issue related to graphics context allocation in the FFFastImageViewManager. The previous implementation was using older graphics context handling methods which could lead to potential errors. This PR updates the code to use the newer UIGraphicsImageRenderer API to prevent any context allocation problems. |
I am getting this error, but I am not using this package at all. Do you know if this issue might be originating from any where else?
|
No but you can probably figure it out by looking into when the error is triggered, and which components are being loaded on that screen. It's very likely that it's caused by a package that uses images - so maybe react-native-video (thumbnails)? You can try removing parts of your app's code until the error disappears to figure out the cause. |
Thank you for your help! I went ahead and searched throughout all my nodepackages for UIGraphicsBeginImageContext and found it was React Native Linear Gradient |
@numsu Than you for the fix. Is your fork available on npm/yarn? Or do I have to use github url and manually bundle it? |
You can actually use patch-package to implement this pr without switching package. I've attached the patch as a file. Simply add patch-package and set it up, then add my patch file to /patches folder in your root project, and then run if the patch doesn't apply cleanly (I think I'm using an older version of this package) then simply perform the patch yourself in the package and generate the patch file (see patch-package for instructions). |
Yea, I recommend patch-package, just be aware that @AdamGerthel created his patch using react-native-fast-image 8.5.11 so if you are using the latest, "react-native-fast-image": "^8.6.3" at the time of this post, you'll probably want to create your own patch just to be safe. |
Created a patch with the latest version
|
I was encountering the error Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UIGraphicsBeginImageContext() failed to allocate CGBitampContext: size={0, 16}, scale=3.000000, bitmapInfo=0x2002. Use UIGraphicsImageRenderer to avoid this assert.' and based on your answers, I understood that the issue was related to the need for updating the 'react-native-linear-gradient' package. Thank you |
Works with |
thank you so much this solved my issue |
for past 6 months im doing this every time i clear pod files and node_modules is there any permanent solution for this ? |
Either use patch-package (see comments). Or optionally you can fork the project and include it as a submodule in yours with the fix. |
Thank you so much vro 🥹 |
How to use this. In my project? |
Just use expo-image. |
Here's the patch for 8.5.12 if anybody needs it... react-native-fast-image+8.5.12.patch Note: Version 8.6.x may have fixed this issue, but I wouldn't use use it: |
sad this package seems to be abandoned and no maintainer can merge this important fix. iOS 18 is around the corner... |
Starting in iOS 17, will
UIGraphicsBeginImageContext
will no longer be available. Bothreact-native-fast-image
as well as the SDWebImage dependency uses this. Is anyone looking at making this package iOS 17 compatible?The text was updated successfully, but these errors were encountered: