-
Notifications
You must be signed in to change notification settings - Fork 2.3k
putFile error #1177
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
Comments
Also having this same issue in detached Expo app. Same error. |
@redpandatronicsuk @dethell did you guys solved it? |
@reyanshmishra I have not solved it. This is still blocking me in my app progress. Any help out there from the rn-firebase team? |
@dethell I solved it as I had a typo in my firebaseconfige URL. |
@reyanshmishra I don't believe the config is an issue because the firebase.initalizeApp() call has been deprecated. If you are using the GoogleService-info.plist file in your iOS project it pulls all the config settings from there. In fact, if you try to use the initializeApp call within the project you get this Yellowbox warning:
|
This is a cross-post from several related issues where I had commented: Found it, in my case at least. The URI of the image from the ImagePicker had a % character in it from the local app cache. This percent was being URI encoded to '%25' which resulted in the file not being found by the putFile code. Adding a decodeURI call around the uri fixed the issue.
|
@dethell then I'll update my code but for me, the URL was the issue. |
Thanks for reporting this issue. We're aware that Storage has fallen behind slightly on React Native Firebase and would like to bring it up to speed again. I will close this issue for now and track it as well as other issues collectively over on the Storage improvements proposal to be addressed in a future release. See #1260 |
@dethell I've added a check to automatically call decodeURI internally on putFile - will be part of the v4.3.0 release when ready. |
Automatic Loving
|
Issue
When uploading a file using putFile it produces this error:
This is the code I use to upload the file,
uri
is from ImagePicker and points to a valid image file:The file is created in the storage bucket, but has type
application/json; charset=UTF-8
and the contents is:This error happens in an Expo detached app. Before detachment upload was working with the JS SDK using this code:
Environment
iOS
React Native version:
https://github.com/expo/react-native/archive/sdk-27.0.0.tar.gz
RNFirebase Version:
4.2.0
Podfile
The text was updated successfully, but these errors were encountered: