-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[Crash] putFile will crash when extension in unknown #4661
Comments
Oh my! Good catch @Maxoos - if you could work up a PR for this (for small patches I start by just modifying the file directly in node_modules then doing a patch-package for it) so you know it is tested and working and fixes your failure case, I'd happily merge it |
I have the same issue on Apple Silicon |
I found out that the issue occurs on simulator but not in the physical device. |
I would still love to fix this for the simulator if someone worked up a PR for it and submitted it here. I don't have Apple Silicon so I cannot test it to verify if it's working, I will need someone from the community to propose it and verify it works for them |
@mikehardy I've created a PR, I think you might be able to test this on an Intel based Mac by trying a file with no extension. Thanks! |
I'm running xcode12 on Apple Silicon and it seems that pathExtension which used to return the extensions of the file in path is returning nil on iOS14 simulators (for gif files - does not happen on iOS13). This is probably a simulator issue, however, this code does not check if UTI is null and therefor crashes when trying to release:
CFRelease(UTI);
react-native-firebase/packages/storage/ios/RNFBStorage/RNFBStorageCommon.m
Lines 62 to 66 in b535757
It should be something like:
if (UTI) { CFRelease(UTI); }
Return value can be null according to the documentation:
The text was updated successfully, but these errors were encountered: