{"action":"closed","issue":{"url":"https://api.github.com/repos/expo/expo/issues/2402","repository_url":"https://api.github.com/repos/expo/expo","labels_url":"https://api.github.com/repos/expo/expo/issues/2402/labels{/name}","comments_url":"https://api.github.com/repos/expo/expo/issues/2402/comments","events_url":"https://api.github.com/repos/expo/expo/issues/2402/events","html_url":"https://github.com/expo/expo/issues/2402","id":368994685,"node_id":"MDU6SXNzdWUzNjg5OTQ2ODU=","number":2402,"title":"TypeError: Network request failed when fetching a file:// uri","user":{"login":"0xori","id":2307798,"node_id":"MDQ6VXNlcjIzMDc3OTg=","avatar_url":"https://avatars3.githubusercontent.com/u/2307798?v=4","gravatar_id":"","url":"https://api.github.com/users/0xori","html_url":"https://github.com/0xori","followers_url":"https://api.github.com/users/0xori/followers","following_url":"https://api.github.com/users/0xori/following{/other_user}","gists_url":"https://api.github.com/users/0xori/gists{/gist_id}","starred_url":"https://api.github.com/users/0xori/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0xori/subscriptions","organizations_url":"https://api.github.com/users/0xori/orgs","repos_url":"https://api.github.com/users/0xori/repos","events_url":"https://api.github.com/users/0xori/events{/privacy}","received_events_url":"https://api.github.com/users/0xori/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-10-11T07:51:11Z","updated_at":"2018-11-22T10:46:29Z","closed_at":"2018-11-22T10:46:29Z","author_association":"NONE","body":"### Environment\r\n\r\n```\r\nEnvironment:\r\n  OS: Windows 10\r\n  Node: 8.11.0\r\n  Yarn: 1.7.0\r\n  npm: 5.6.0\r\n  Watchman: Not Found\r\n  Xcode: N/A\r\n  Android Studio: Version  3.1.0.0 AI-173.4907809\r\n\r\nPackages: (wanted => installed)\r\n  expo: ^30.0.0 => 30.0.1\r\n  react: 16.3.1 => 16.3.1\r\n  react-native: https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz => 0.55.4\r\n```\r\nApp target - Standalone & Client for testing\r\n\r\n### Steps to Reproduce\r\n\r\n1. use[ this expo example](https://github.com/expo/audio-recording-example) of recording audio\r\n2. mix it with [this example](https://github.com/expo/firebase-storage-upload-example) of uploading to firebase\r\n\r\n### Expected Behavior\r\n\r\nfetching a file URI from the device file system should return a valid [response](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#Response_object).\r\n\r\n### Actual Behavior\r\n\r\nI'm getting a network error exception \r\n> TypeError: Network request failed\r\n\r\nand if I'm running with remote JS debug mode I can see this error in chrome console\r\n> Failed to load file:///data/user/0/host.exp.exponent/cache/ExperienceData/…/Audio/recording-eee85da3-7121-4273-86a7-686098180662.m4a: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.\r\n\r\n### Some Code\r\n```\r\nconst asyncUpload = async ()=> {\r\n          try {   \r\n                const response = await fetch(recordInfo.uri);\r\n                console.log(\"response\", response);\r\n                const blob = await response.blob();\r\n                const blob = new Blob();\r\n                upload( blob)\r\n            }catch (e) {\r\n                console.log(\"error fetching\",e);\r\n            }\r\n}\r\n```\r\n\r\n"}}
{"actor":{"display_login":"sjchmiela"}}