-
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
Firebase Storage fail on JSON/Text data #302
Comments
@fungilation Are you able to upload a full example somewhere so that we can help you debug it? I've been looking at putFile on iOS but only have code to run through the image / asset upload path, not the specific file upload path. If I can put something together using your example then I'll be able to help. |
Is RNFirebase v3 making changes to interface with Firebase Storage? If so, I should test against that, in giving you a more full and isolated test case. |
@fungilation The interface with Firebase Storage is remaining the same in v3 so I just need a full example of generating the JSON file, saving it to disk, then using putFile for me to be able to debug and fix. |
Ok I've updated my original post with how exactly I generate the sha3 hash for path name, with the jsSHA package, and pasted a sample Let me know @chrisbianca if you need more details still in setting up a reproducible test case. The |
Checking in again. Do you still need more details on reproducing? |
@fungilation Sorry, things have been a bit hectic our end, but this is very much on my list as soon as we get v3 out of the door in the next couple of weeks... I think there should be enough information available for me to reproduce - I will shout if that's not the case. |
Great! I'm not rushing, and I understand you want to take care of v3 first and test/fix against that after release. |
@chrisbianca I am facing the same problem. I am uploading an image using RNFirebase v 3.0.2 and instead of the content of the image, the server uploads a jSON with "name","size" and "contentType" keys. The putFile() returns an error "an unknown error has occurred." Any help to resolve the issue would be welcome |
I am having the exact same behavior as @waqqas mentioned. Was there any resolution to this problem? |
Bump |
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.
|
Thanks all for reporting this issue and the discussion around it. 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 @fungilation @waqqas; pushed up quite a few fixes/tweaks for storage in preparation for the v4.3.0 release. The two relevant for this issue are:
Keep and eye out for the v4.3.0 release. Thanks for the feedback 👌 |
Fixes now live in the v4.3.0 release. Loving
|
Hey @fungilation - just thought you'd like to know the v6 re-write PR is up and well into dev, which includes many improvements including PR & Changelog: #2043 |
Environment
I'm at a loss in making Storage work with putFile() (copying #170 (comment)). My sample code:
Chrome console output from firebase.storage() would always fail, with
Here's a chunk of xcode console output on error. I'm not sure what's "unexpected" about the responses as it says:
FYI, it's not my security rules being the issue, I haven't changed the default rules (below) and I have
firebase.auth().signInAnonymously()
before the storage calls.Looking at my Firebase console, I would see files created at the correct
path
, but with all files with this as content: (instead of the serialized json first written to local file)The text was updated successfully, but these errors were encountered: