{"action":"created","issue":{"url":"https://api.github.com/repos/wkh237/react-native-fetch-blob/issues/109","repository_url":"https://api.github.com/repos/wkh237/react-native-fetch-blob","labels_url":"https://api.github.com/repos/wkh237/react-native-fetch-blob/issues/109/labels{/name}","comments_url":"https://api.github.com/repos/wkh237/react-native-fetch-blob/issues/109/comments","events_url":"https://api.github.com/repos/wkh237/react-native-fetch-blob/issues/109/events","html_url":"https://github.com/wkh237/react-native-fetch-blob/issues/109","id":173651038,"number":109,"title":"Upload from CameraRoll to Firebase fails","user":{"login":"MrRoyce","id":252359,"avatar_url":"https://avatars.githubusercontent.com/u/252359?v=3","gravatar_id":"","url":"https://api.github.com/users/MrRoyce","html_url":"https://github.com/MrRoyce","followers_url":"https://api.github.com/users/MrRoyce/followers","following_url":"https://api.github.com/users/MrRoyce/following{/other_user}","gists_url":"https://api.github.com/users/MrRoyce/gists{/gist_id}","starred_url":"https://api.github.com/users/MrRoyce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrRoyce/subscriptions","organizations_url":"https://api.github.com/users/MrRoyce/orgs","repos_url":"https://api.github.com/users/MrRoyce/repos","events_url":"https://api.github.com/users/MrRoyce/events{/privacy}","received_events_url":"https://api.github.com/users/MrRoyce/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-28T15:05:53Z","updated_at":"2016-08-28T15:15:48Z","closed_at":null,"body":"I've not been able to get any files successfully uploaded from the CameraRoll (on my Nexux 6 phone) to Firebase.  Essentially, the call to put the image to Firebase hangs.  It doesn't return the promise and nothing is logged to my console or to Firebase.\r\n\r\nI've successfully run the sample app that loads images to Firebase, but that is using an image from https://avatars0.githubusercontent.com/u/5063785?v=3&s=460, not the CameraRoll.\r\n\r\nHere is the code I'm using:\r\n\r\n```javascript\r\nif (newPhotos.length) {\r\n  this.lastPhotoFetched = newPhotos[newPhotos.length - 1].uri;\r\n  console.log('lastPhotoFetched', this.lastPhotoFetched);\r\n  rnfbURI = RNFetchBlob.wrap(this.lastPhotoFetched);\r\n  console.log('rnfbURI', rnfbURI);\r\n  Blob\r\n  .build(rnfbURI, { type : 'image/jpg;'})\r\n  .then((blob) => {\r\n    console.log('Image Name:', testImageName);\r\n    console.log('blob:', blob);  // This is logged to the console\r\n    // upload image using Firebase SDK\r\n    firebaseApp.storage()  // This call never returns the promise\r\n    .ref('images')\r\n    .child(testImageName)\r\n    .put(blob, { contentType : 'image/jpg' })\r\n    .then((snapshot) => {\r\n        console.log('Firebase Done.');  // This is not logged\r\n        console.log(snapshot);\r\n        blob.close();\r\n    });\r\n  })\r\n  .catch((err) => {\r\n      console.log('Blob err:', err);  // This is not logged\r\n  });\r\n}\r\n```\r\n\r\nAlso, depending on which library I use, I get different values for the image.uri?   \r\n\r\nIf I use the library https://github.com/bamlab/rn-camera-roll, the uri looks like `content://media/external/images/media/49793`\r\n\r\nBut if I use the https://github.com/jeanpan/react-native-camera-roll-picker library, the uri looks like `file:/storage/emulated/0/DCIM/Camera/IMG_20160626_154134.jpg`\r\n\r\nI'm not sure if that is an issue with the library, but it may be helpful in understanding the specific issue with Firebase\r\n"},"comment":{"url":"https://api.github.com/repos/wkh237/react-native-fetch-blob/issues/comments/242980179","html_url":"https://github.com/wkh237/react-native-fetch-blob/issues/109#issuecomment-242980179","issue_url":"https://api.github.com/repos/wkh237/react-native-fetch-blob/issues/109","id":242980179,"user":{"login":"smilechun","id":5795291,"avatar_url":"https://avatars.githubusercontent.com/u/5795291?v=3","gravatar_id":"","url":"https://api.github.com/users/smilechun","html_url":"https://github.com/smilechun","followers_url":"https://api.github.com/users/smilechun/followers","following_url":"https://api.github.com/users/smilechun/following{/other_user}","gists_url":"https://api.github.com/users/smilechun/gists{/gist_id}","starred_url":"https://api.github.com/users/smilechun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smilechun/subscriptions","organizations_url":"https://api.github.com/users/smilechun/orgs","repos_url":"https://api.github.com/users/smilechun/repos","events_url":"https://api.github.com/users/smilechun/events{/privacy}","received_events_url":"https://api.github.com/users/smilechun/received_events","type":"User","site_admin":false},"created_at":"2016-08-28T15:15:48Z","updated_at":"2016-08-28T15:15:48Z","body":"Turn off debug remotely and try again.  For me,  it only works when debug remotely is off.\r\nMy spec:\r\nRNv0.31\r\nRN-blob 0.9.2 beta"}}
{"actor":{"display_login":"smilechun"}}