window.XMLHttpRequest = RNFetchBlob.polyfill.XMLHttpRequest;
window.Blob = RNFetchBlob.polyfill.Blob;
|
I was wrong in my prior post. Sorry for the bad write up. I tried 20 or so builds Saturday and it worked but today saw the error again. Yeah, by root module, I meant index.ios. Interesting observation about uploading a small image. That actually might be quite helpful for me since I'm upload a fullsize and a 10kb thumbnail image. I'm currently uploading the large image followed by the smaller. I'll be investigating more today (I'm in SF) and I'll report back. My plan going forward to work around this was to catch this error and compress larger images to below 262144 bytes. The frustrating part is that I can't seem to consistently reproduce this issue. Are you seeing consistent failures as long as you don't submit the smaller image first? I just migrated to use Firebase Storage last week (around Nov 5) and we haven't put it into production yet so I don't have any good historical data about this working. It seemed to work until just a few days ago, not sure when i first saw the issue. |
--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/ejc4hbwUNy4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/2c7d699e-a91a-4dba-b629-15cc83f06448%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
|
I'm now able to reproduce the issue regularly as well as the 'fix' of uploading a small image first. Steps I took to standardize my process: - full uninstall of app between trials - use the same image instead of capturing a new one with every trial Fortunately for me, uploading the thumbnail prior to uploading the full size image is sufficient. Other thoughts: - I can't rule out that this isa firebase server side issue but that seems unlikely because of the fact that upload ordering seems to help. That makes me think the client needs some initialization which happens successfully when a small file is uploaded. - I can't rule out that this is a firebase client issue because I've only recently added file upload. - I can't rule out that this is a react-native-fetch-blob issue but that seems unlikely since I imagine that package is more broadly used. Potentially it's an issue at the firebase client / RNFetchblob interface and not a specific bug in either package. - Could be an iOS issue although I have not tried on android but will be working on porting our app this week. We'll see how it goes and I'll respond here. In the end, I'd put my money on a weirdness at the interface between react-native-fetch-blob and firebase. I'd bet on different interpretations of some multipart upload specification. @Ken, thanks for the work around and lemme know if I can help your investigation in any way. |
import RNFetchBlob from 'react-native-fetch-blob'
window.Blob = RNFetchBlob.polyfill.Blob
let blob = new Blob(['thisisablob']); // size should be 11
console.log('size1: ' + blob.size);
blob.onCreated(function() {
console.log('size2: ' + blob.size);
});
2016-11-22 16:19:22.301 [info][tid:com.facebook.react.JavaScript] size1: undefined
2016-11-22 16:19:22.308 [info][tid:com.facebook.react.JavaScript] size2: 0