{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/20405","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/20405/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/20405/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/20405/events","html_url":"https://github.com/facebook/react-native/issues/20405","id":344787268,"node_id":"MDU6SXNzdWUzNDQ3ODcyNjg=","number":20405,"title":"fetch API doesn't resolve or reject","user":{"login":"john-hu","id":6179015,"node_id":"MDQ6VXNlcjYxNzkwMTU=","avatar_url":"https://avatars1.githubusercontent.com/u/6179015?v=4","gravatar_id":"","url":"https://api.github.com/users/john-hu","html_url":"https://github.com/john-hu","followers_url":"https://api.github.com/users/john-hu/followers","following_url":"https://api.github.com/users/john-hu/following{/other_user}","gists_url":"https://api.github.com/users/john-hu/gists{/gist_id}","starred_url":"https://api.github.com/users/john-hu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/john-hu/subscriptions","organizations_url":"https://api.github.com/users/john-hu/orgs","repos_url":"https://api.github.com/users/john-hu/repos","events_url":"https://api.github.com/users/john-hu/events{/privacy}","received_events_url":"https://api.github.com/users/john-hu/received_events","type":"User","site_admin":false},"labels":[{"id":860603247,"node_id":"MDU6TGFiZWw4NjA2MDMyNDc=","url":"https://api.github.com/repos/facebook/react-native/labels/:globe_with_meridians:Networking","name":":globe_with_meridians:Networking","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-07-26T10:31:11Z","updated_at":"2018-08-03T14:06:13Z","closed_at":null,"author_association":"NONE","body":"<!-- Requirements: please go through this checklist before opening a new issue -->\r\n  - [x] Review the documentation: https://facebook.github.io/react-native\r\n  - [x] Search for existing issues: https://github.com/facebook/react-native/issues\r\n  - [x] Use the latest React Native release: https://github.com/facebook/react-native/releases\r\n\r\n## Environment\r\n  React Native Environment Info:\r\n    System:\r\n      OS: macOS High Sierra 10.13.6\r\n      CPU: x64 Intel(R) Core(TM) i7-3540M CPU @ 3.00GHz\r\n      Memory: 226.52 MB / 8.00 GB\r\n      Shell: 3.2.57 - /bin/bash\r\n    Binaries:\r\n      Node: 8.9.0 - /usr/local/bin/node\r\n      Yarn: 1.2.1 - /usr/local/bin/yarn\r\n      npm: 5.5.1 - /usr/local/bin/npm\r\n      Watchman: 4.7.0 - /usr/local/bin/watchman\r\n    SDKs:\r\n      iOS SDK:\r\n        Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3\r\n      Android SDK:\r\n        Build Tools: 23.0.1, 23.0.2, 25.0.0, 25.0.2, 26.0.3, 27.0.3, 28.0.1\r\n        API Levels: 14, 15, 16, 17, 18, 19, 20, 22, 23, 25, 26, 8\r\n    IDEs:\r\n      Android Studio: 3.1 AI-173.4819257\r\n      Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild\r\n    npmPackages:\r\n      react: 16.4.1 => 16.4.1 \r\n      react-native: ^0.56.0 => 0.56.0 \r\n    npmGlobalPackages:\r\n      create-react-native-app: 1.0.0\r\n      react-native-cli: 2.0.1\r\n      react-native-create-library: 3.1.2\r\n      react-native-git-upgrade: 0.2.7\r\n\r\n## Description\r\nUsing the example of [networking doc](https://facebook.github.io/react-native/docs/network) to fetch movie.json from facebook server doesn't work.\r\n\r\nI had traced the code to [dispatchEvent](https://github.com/facebook/react-native/blob/master/Libraries/Network/XMLHttpRequest.js#L579) which doesn't trigger load event. The reason is [event-target-shim@1.1.1](https://github.com/mysticatea/event-target-shim/blob/v1.1.1/dist/event-target-shim.js#L355-L358) cannot find any 'load' event listeners.\r\n\r\n## Reproducible Demo\r\n1. check out github repo: https://github.com/john-hu/react-native-fetch-no-resolve-reject \r\n2. `npm install`\r\n3. `react-native run-android`\r\n4. open debugger ui to see console\r\n\r\n## Expected Result \r\nsee the following console.log\r\n```\r\nbefore fetch\r\nfetch sent\r\n{\r\n  \"title\": \"The Basics - Networking\",\r\n  \"description\": \"Your app fetched this from a remote endpoint!\",\r\n  \"movies\": [\r\n    { \"id\": \"1\", \"title\": \"Star Wars\", \"releaseYear\": \"1977\"},\r\n    { \"id\": \"2\", \"title\": \"Back to the Future\", \"releaseYear\": \"1985\"},\r\n    { \"id\": \"3\", \"title\": \"The Matrix\", \"releaseYear\": \"1999\"},\r\n    { \"id\": \"4\", \"title\": \"Inception\", \"releaseYear\": \"2010\"},\r\n    { \"id\": \"5\", \"title\": \"Interstellar\", \"releaseYear\": \"2014\"}\r\n  ]\r\n}\r\n[Array]\r\n```\r\n\r\n## Actual Result\r\n```\r\nbefore fetch\r\nfetch sent\r\n```"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/410264467","html_url":"https://github.com/facebook/react-native/issues/20405#issuecomment-410264467","issue_url":"https://api.github.com/repos/facebook/react-native/issues/20405","id":410264467,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDI2NDQ2Nw==","user":{"login":"john-hu","id":6179015,"node_id":"MDQ6VXNlcjYxNzkwMTU=","avatar_url":"https://avatars1.githubusercontent.com/u/6179015?v=4","gravatar_id":"","url":"https://api.github.com/users/john-hu","html_url":"https://github.com/john-hu","followers_url":"https://api.github.com/users/john-hu/followers","following_url":"https://api.github.com/users/john-hu/following{/other_user}","gists_url":"https://api.github.com/users/john-hu/gists{/gist_id}","starred_url":"https://api.github.com/users/john-hu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/john-hu/subscriptions","organizations_url":"https://api.github.com/users/john-hu/orgs","repos_url":"https://api.github.com/users/john-hu/repos","events_url":"https://api.github.com/users/john-hu/events{/privacy}","received_events_url":"https://api.github.com/users/john-hu/received_events","type":"User","site_admin":false},"created_at":"2018-08-03T14:06:13Z","updated_at":"2018-08-03T14:06:13Z","author_association":"NONE","body":"Reopen this issue because it comes to me when I use it with the release build."}}
{"actor":{"display_login":"john-hu"}}