Skip to content
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

Could not connect to development server on android emulator and on real device #15388

Closed
CodeWithShipraJain opened this issue Aug 6, 2017 · 139 comments

Comments

@CodeWithShipraJain
Copy link

@CodeWithShipraJain CodeWithShipraJain commented Aug 6, 2017

Is this a bug report?

Its an issue i am facing while running the normal Awesome Project on my system

Have you read the Contributing Guidelines?

Yes

Environment

  1. react-native -v: 0.47.1
  2. node -v:8.2.1
  3. npm -v:4.1.2
  4. yarn --version:

Then, specify:

  • Target Platform:
    Android
  • Development Operating System:
    Windows 7
  • Build tools:26.0.0-rc2

Steps to Reproduce

(Write your steps here:)

1.Open command prompt in Administrator Mode
2.run command: cd
3.run command: react-native init
4.run command: cd
5.run command: react-native run-android
this makes the package server run automatically on port 8081. But I am not able to access the package server from browser on the machine and the mobile.
I tried using http://:port/index.android.js
http://localhost:port
http://127.0.0.1:port

=> I was getting the red screen on both mobile and the emulator with following message:
I tried running the project on real device and on emulator. On Both I got error: "Unable to load script from assets 'index.android.bundle' Make sure your bundle is packaged correctly or you're running a package server'.

screenshot-1502041340496
screenshot-1502041361543
screenshot-1502041433294

reloading i get the error: "Could not connect to development server."

Then i set the host and port number on development setting on both and got the error "Could not connect to development server."

Expected Behavior

The project is expected to run on emulator and phone without any error.

But instead i got the error and i have tried many times and i am getting the same error repeatedly and in same pattern.

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

@gelove
Copy link

@gelove gelove commented Aug 7, 2017

Still an issue with:
react 16.0.0-alpha.6
RN 0.44.3
node 8.2.1
npm 5.3.0
XCode 8.3.3
iOS 10.3 simulator

@CodeWithShipraJain
Copy link
Author

@CodeWithShipraJain CodeWithShipraJain commented Aug 7, 2017

So do i need to work on previous version of these?

@yanftch
Copy link

@yanftch yanftch commented Aug 7, 2017

I meet this,and can not handle it....

@yanftch
Copy link

@yanftch yanftch commented Aug 7, 2017

something wrong with the latest version?

@hramos
Copy link
Contributor

@hramos hramos commented Aug 7, 2017

Is the packager running? You should see it come up when you run react-native run-android. You can also start it up by itself using react-native start. I would like to figure out if the issue here is that the packager is not starting up at all.

@CodeWithShipraJain
Copy link
Author

@CodeWithShipraJain CodeWithShipraJain commented Aug 8, 2017

Yes the packager is running. When i run the command react-native run-android, node js window is opened stating that the packager is running on 8081 and "Loading Dependency Graph. Done"
But when i try the "localhost:8081/index.android.js" on the system browser i see the error "This site can’t be reached".

But when i create normal nodejs api and test it on the browser it gets opened successfully.

@otoinsa
Copy link

@otoinsa otoinsa commented Aug 8, 2017

I have the same issue. iOS simulator works fine, btw

Whenever I try to make a new project in RN, it is as if I've hit a wall of new bugs each time.
Next try next month again, I guess...

@zhiyingzzhou
Copy link

@zhiyingzzhou zhiyingzzhou commented Aug 9, 2017

same issue. anyone resolve it?

@ashafizullah
Copy link

@ashafizullah ashafizullah commented Aug 9, 2017

Try to run:
adb reverse tcp:8081 tcp:8081
on your command prompt and re-run your project after that.

@CodeWithShipraJain
Copy link
Author

@CodeWithShipraJain CodeWithShipraJain commented Aug 9, 2017

@ashafizullah: I have tried that too; but still no luck.

@kevinresol
Copy link
Contributor

@kevinresol kevinresol commented Aug 22, 2017

Happens on my device as well.

I have usb connected, adb reversed and packager running.

When open the following link on the device's browser, it does load the bundle successfully:

http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false

So I suspect there is something wrong within the Java code itself.

@chiragpurohit71085
Copy link

@chiragpurohit71085 chiragpurohit71085 commented Aug 31, 2017

is there any solution on this? I am also stuck here. On IOS project works perfectly

@hellomaya
Copy link

@hellomaya hellomaya commented Sep 1, 2017

I am having seen the same issue, and that's all because the android app don't have this permission:

<uses-permission android:name="android.permission.INTERNET" />

So make sure your android code is able to access remote url from your app.

@Chreels
Copy link

@Chreels Chreels commented Sep 6, 2017

i have same problem cant anybody solve that?

@pushpanathank
Copy link

@pushpanathank pushpanathank commented Sep 8, 2017

I am also facing the same problem, if any one find the solution, please post it. Thanks.

@SoftwareMark
Copy link

@SoftwareMark SoftwareMark commented Sep 12, 2017

i have same problem, i do adb reserve tcp:8081 tcp:8081 and then do ensure same network computer and mobile ,and i do dev setings IP:8081 ,but could not connect to development server ,who is solved this issue ,very thank you

@Dimon70007
Copy link

@Dimon70007 Dimon70007 commented Sep 18, 2017

Hi people. I have used console.dir() in react-native and get this behavior. And i think that it is normal because console.dir() is a browser.window function and no browser having in react-native. After removing console.dir() - my app has worked.

@diegoddox
Copy link

@diegoddox diegoddox commented Sep 23, 2017

I'm facing the same issue on a Mac, any news?

@guilhermelirio
Copy link

@guilhermelirio guilhermelirio commented Sep 24, 2017

i have same problem in device test.

Android 4.1.2

@Dimon70007
Copy link

@Dimon70007 Dimon70007 commented Sep 24, 2017

Hey. Guys, who have android version less then 5.0, have you try to use wifi connection instead usb? My app starts normally on android 4.3 (Huawei mediapad T1 8.0) after it has been connected through wifi

@WillyRamirez
Copy link

@WillyRamirez WillyRamirez commented Sep 24, 2017

had this problem, for me it turned out to be port 8081 that was being used by postgresSQL

@ducpt2
Copy link

@ducpt2 ducpt2 commented Sep 28, 2017

I have same problem today.
Android 4.4.2 and 6.

@ghariharan
Copy link

@ghariharan ghariharan commented Oct 17, 2017

Same issue here as well. Happens everytime I reopen my Mac after a short sleep time. Has anyone solved this?
adb reverse tcp:8081 tcp:8081 - this doesn't seem to work for me

screen shot 2017-10-17 at 8 20 03 am

@Nshul
Copy link

@Nshul Nshul commented Oct 18, 2017

My error was resolved by changing the inotify limits .
This link helped https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers

@tranthangbk55
Copy link

@tranthangbk55 tranthangbk55 commented Oct 20, 2017

the same this problem,help me

@blainemuri
Copy link

@blainemuri blainemuri commented Oct 31, 2017

I'm also having the same issue trying to run it from localhost. It works in browser and on the emulator, but not on the physical device

@callagga
Copy link

@callagga callagga commented Nov 2, 2017

Same issue here for Android, from both device and emulator. Can't seem to connect to the packager. Doing the "adb reverse ..." for physical device. Also running on custom port so doing "react-native start --port 8088", then setting the IPaddress:8088 in the dev setting in the app.

QUESTION: Is there a way to fault find connectivity between the app (on my android device) and packager running on Windows PC?

That is all I see is the "can't connect" type error indications, and note no log messages in the packager. \

UPDATE: running "adb reverse --list" showed I had two reverse entries. It seems after I corrected this things worked. I've still got a "white page" only, however I guess that's another issue..

@Ilario17
Copy link

@Ilario17 Ilario17 commented Nov 7, 2017

Same issue with Android, iOS works...

facebook-github-bot added a commit that referenced this issue May 3, 2019
Summary:
This sync includes the following changes:
- **[ec6691a68](facebook/react@ec6691a )**: Event API: remove isTargetDirectlyWithinEventComponent (#15546) //<Dominic Gannaway>//
- **[a6e30001f](facebook/react@a6e3000 )**: Delete duplicate Focus.js (#15540) //<Dominic Gannaway>//
- **[f7993d547](facebook/react@f7993d5 )**: Delete duplicate Hover.js (#15539) //<Dominic Gannaway>//
- **[c8ee10037](facebook/react@c8ee100 )**: Delete duplicate Swipe.js (#15541) //<Dominic Gannaway>//
- **[494716c9b](facebook/react@494716c )**: Delete duplicate Drag.js (#15537) //<Dominic Gannaway>//
- **[377846fef](facebook/react@377846f )**: Delete duplicate Press.js (#15538) //<Dominic Gannaway>//
- **[379515e83](facebook/react@379515e )**: Follow up to 15535 (#15536) //<Dominic Gannaway>//
- **[bd88982fb](facebook/react@bd88982 )**: Event API: use `capture` for all event listeners using experimental responder system (#15526) //<Dominic Gannaway>//
- **[72ca3c60e](facebook/react@72ca3c6 )**: Bump scheduler version to 0.14.0 (#15395) //<Andrew Clark>//
- **[7882c41f6](facebook/react@7882c41 )**: Use lowercase entry points for event modules (#15535) //<Andrew Clark>//
- **[43c4e5f34](facebook/react@43c4e5f )**: Add method for forcing a lower framerate //<Nathan Schloss>//
- **[1b752f191](facebook/react@1b752f1 )**: Fixed potential interaction tracing leak in Suspense thennable memoization (#15531) //<Brian Vaughn>//
- **[12e5a13cf](facebook/react@12e5a13 )**: [React Native] Inline calls to FabricUIManager in shared code (#15490) //<Eli White>//
- **[2cca18728](facebook/react@2cca187 )**: React Events: add onFocusVisibleChange to Focus (#15516) //<Nicolas Gallagher>//
- **[cc5a49379](facebook/react@cc5a493 )**: React Events: FocusScope tweaks and docs (#15515) //<Nicolas Gallagher>//
- **[796c67a25](facebook/react@796c67a )**: Event API: responder event types should not re-register on EventComponent update (#15514) //<Dominic Gannaway>//
- **[c4d1dcb53](facebook/react@c4d1dcb )**: React Events: core API documentation followup (#15506) //<Dominic Gannaway>//
- **[41ef1961c](facebook/react@41ef196 )**: Update TopLevelEventTypes.js (#15511) //<Dan Nate>//
- **[7a482af5d](facebook/react@7a482af )**: Event API: Fix bug where Press root events were not being cleared (#15507) //<Dominic Gannaway>//
- **[a14e24efa](facebook/react@a14e24e )**: React Events: core API documentation (#15505) //<Nicolas Gallagher>//
- **[8658611b6](facebook/react@8658611 )**: Event API: ensure event keys are unique + add validation (#15501) //<Dominic Gannaway>//
- **[d9839740e](facebook/react@d983974 )**: React events: remove unused types (#15503) //<Nicolas Gallagher>//
- **[0b3431170](facebook/react@0b34311 )**: React events: fix press end event dispatching (#15500) //<Nicolas Gallagher>//
- **[d1f667acc](facebook/react@d1f667a )**: Event API: follow up fixes for FocusScope + context changes (#15496) //<Dominic Gannaway>//
- **[c530639dd](facebook/react@c530639 )**: Minor code structure adjustments to the bundles.js file (#15079) //<Kunuk Nykjær>//
- **[ed36df46c](facebook/react@ed36df4 )**: add --watch mode to "yarn build" (#15116) //<Alec Larson>//
- **[793ef9b85](facebook/react@793ef9b )**: test(eslint-plugin-react-hooks): add coverage for unused custom hook (#15130) //<Redmond Tran>//
- **[d61da9387](facebook/react@d61da93 )**: test(accumulate): add test suite for accumulate function (#15159) //<Jeffrey Berry>//
- **[a187e9b5e](facebook/react@a187e9b )**: React Native: Allow Views to be nested inside of Text (#15464) //<Adam Comella>//
- **[f85aadefc](facebook/react@f85aade )**: ADD: disablePictureInPicture attribute for HTML5 videos (#15334) //<Radu-Sebastian Amarie>//
- **[1eb2b892d](facebook/react@1eb2b89 )**: give  `canUseDOM` with a possibility to be a constant (#14194) //<FUJI Goro>//
- **[de26d6dd3](facebook/react@de26d6d )**: typo fix (#15493) //<shubham>//
- **[64e3da286](facebook/react@64e3da2 )**: Event API: Add `FocusScope` surface (#15487) //<Dominic Gannaway>//
- **[3f058debc](facebook/react@3f058de )**: Event API: various bug fixes (#15485) //<Dominic Gannaway>//
- **[fb28e9048](facebook/react@fb28e90 )**: Add missing word to code comment for clarity (#15443) //<Brendan McLoughlin>//
- **[fa2fa3564](facebook/react@fa2fa35 )**: Experimental event API: adds context.isTargetDirectlyWithinEventComponent (#15481) //<Dominic Gannaway>//
- **[d3af2f2a5](facebook/react@d3af2f2 )**: Experimental Event API: add event component mount phase callback (#15480) //<Dominic Gannaway>//
- **[ce126fbb2](facebook/react@ce126fb )**: Fix priority inference of next level of work (#15478) //<Andrew Clark>//
- **[71c8759ce](facebook/react@71c8759 )**: Measure callback timeout relative to current time (#15479) //<Andrew Clark>//
- **[9c6ff136c](facebook/react@9c6ff13 )**: Remove timeout from performance flamegraph (#15477) //<Andrew Clark>//
- **[299a2714c](facebook/react@299a271 )**: Use stricter equality check (#15474) //<Dan Abramov>//
- **[017d6f14b](facebook/react@017d6f1 )**: Experimental Event API: add `rootEventTypes` support to event responders (#15475) //<Dominic Gannaway>//
- **[784ebd8fa](facebook/react@784ebd8 )**: Experimental event API: rework the propagation system for event components (#15462) //<Dominic Gannaway>//
- **[587676900](facebook/react@5876769 )**: React events: initial implementation of disabled prop (#15458) //<Nicolas Gallagher>//
- **[59c7aef91](facebook/react@59c7aef )**: React events: add a test for focusable descendants (#15457) //<Nicolas Gallagher>//
- **[0a8da3391](facebook/react@0a8da33 )**: React events: README update types and remove stopPropagation prop (#15456) //<Nicolas Gallagher>//
- **[d584fcdc6](facebook/react@d584fcd )**: React events: use passive events where possible (#15454) //<Nicolas Gallagher>//
- **[051513bfa](facebook/react@051513b )**: React Events: consolidate logic for Press event component (#15451) //<Nicolas Gallagher>//
- **[cdfce1ad2](facebook/react@cdfce1a )**: React events: consolidate logic of Hover event component (#15450) //<Nicolas Gallagher>//
- **[5857c89da](facebook/react@5857c89 )**: React events: extract common helper functions (#15449) //<Nicolas Gallagher>//
- **[0b50fb29f](facebook/react@0b50fb2 )**: Include rootEventTypes in DOMEventResponderSystem stopPropagation tests (#15433) //<Nicolas Gallagher>//
- **[1ae409d2c](facebook/react@1ae409d )**: React events: fix nested Hover components error (#15428) //<Nicolas Gallagher>//
- **[c73ab39c1](facebook/react@c73ab39 )**: React events: make nested Focus work as expected (#15421) //<Nicolas Gallagher>//
- **[4221565e1](facebook/react@4221565 )**: Cancel pending commit before starting on root //<Andrew Clark>//
- **[9ebe1768a](facebook/react@9ebe176 )**: Experimental Event API: Redesign event responder propagation (#15408) //<Dominic Gannaway>//
- **[a30e7d992](facebook/react@a30e7d9 )**: act() tests - Reuse and properly unmount containers (#14974) //<Philipp Spiess>//
- **[8cf963c6c](facebook/react@8cf963c )**: React events: ignore device buttons that aren't for primary interactions (#15402) //<Nicolas Gallagher>//
- **[38bd570d4](facebook/react@38bd570 )**: Stop tracking bundle sizes (#15404) //<Andrew Clark>//
- **[3438e5ce8](facebook/react@3438e5c )**: Experimental Event API: Add Hover onUnmount support (#15394) //<Dominic Gannaway>//
- **[805e7f873](facebook/react@805e7f8 )**: React events: add unmounting to Focus (#15396) //<Nicolas Gallagher>//
- **[543353a04](facebook/react@543353a )**: Experimental Event API: Remove "listener" from event objects (#15391) //<Dominic Gannaway>//
- **[9055e31e5](facebook/react@9055e31 )**: Replace old Fiber Scheduler with new one (#15387) //<Andrew Clark>//
- **[4e59d4f5d](facebook/react@4e59d4f )**: React events: add onHoverMove support (#15388) //<Nicolas Gallagher>//
- **[de7590327](facebook/react@de75903 )**: Fix CI (#15393) //<Andrew Clark>//
- **[687e4fb6f](facebook/react@687e4fb )**: Bump scheduler version to 0.14.0 //<Andrew Clark>//
- **[45473c94c](facebook/react@45473c9 )**: React events: Press event fixes (#15386) //<Nicolas Gallagher>//
- **[9672cf621](facebook/react@9672cf6 )**: Experimental Event API: adds `stopPropagation` by default to Press (#15384) //<Dominic Gannaway>//
- **[a9eff329c](facebook/react@a9eff32 )**: Remove TouchHitTarget SSR logic to prevent issues with mouse events (#15381) //<Dominic Gannaway>//
- **[c9841001b](facebook/react@c984100 )**: Experimental Event API: preventDefault handling for anchors (#15383) //<Dominic Gannaway>//
- **[c25c59c80](facebook/react@c25c59c )**: Apply the Just Noticeable Difference to suspense timeouts (#15367) //<Sebastian Markbåge>//
- **[3e2e930d6](facebook/react@3e2e930 )**: Fixes a Flow type merge conflict (#15378) //<Dominic Gannaway>//
- **[7fc91f17c](facebook/react@7fc91f1 )**: React events: add onPressMove and pressRetentionOffset to Press (#15374) //<Nicolas Gallagher>//
- **[dd9cef9fc](facebook/react@dd9cef9 )**: Experimental Event API: Add targets and responder utility method for finding targets (#15372) //<Dominic Gannaway>//
- **[c64b33003](facebook/react@c64b330 )**: Move EventTypes to ReactTypes (#15364) //<Dominic Gannaway>//
- **[4c78ac0b9](facebook/react@4c78ac0 )**: Track Event Time as the Start Time for Suspense (#15358) //<Sebastian Markbåge>//
- **[875d05d55](facebook/react@875d05d )**: Include full error messages in React Native build (#15363) //<Andrew Clark>//
- **[1b2159acc](facebook/react@1b2159a )**: [React Native] measure calls will now call FabricUIManager (#15324) //<Eli White>//
- **[c7a959982](facebook/react@c7a9599 )**: [React Native] Add tests to paper renderer for measure, measureLayout (#15323) //<Eli White>//
- **[aece8119c](facebook/react@aece811 )**: Refactor EventComponent logic + add onOwnershipChange callback (#15354) //<Dominic Gannaway>//
- **[183d1f42e](facebook/react@183d1f4 )**: Fix: Measure expiration times relative to module initialization (#15357) //<Andrew Clark>//
- **[b4bc33a58](facebook/react@b4bc33a )**: Fix areHookInputsEqual method  warning params order (#15345) //<砖家>//
- **[29fb5862f](facebook/react@29fb586 )**: Move EventComponent state creation to complete phase + tests (#15352) //<Dominic Gannaway>//
- **[745baf2e0](facebook/react@745baf2 )**: Provide new jsx transform target for reactjs/rfcs#107 (#15141) //<Ricky Vetter>//
- **[81a61b1d1](facebook/react@81a61b1 )**: React events: add delay props to Press module (#15340) //<Nicolas Gallagher>//
- **[4064ea9fa](facebook/react@4064ea9 )**: Experimental event API: Support EventComponent onUnmount responder callback (#15335) //<Dominic Gannaway>//
- **[4fbbae8af](facebook/react@4fbbae8 )**: Add full TouchHitTarget hit slop (experimental event API) to ReactDOM (#15308) //<Dominic Gannaway>//
- **[958b6173f](facebook/react@958b617 )**: Add delay props to Hover event module (#15325) //<Nicolas Gallagher>//
- **[c3cc936da](facebook/react@c3cc936 )**: Add Hover,Focus,Press docs to REAMDE (#15328) //<Nicolas Gallagher>//
- **[49595e921](facebook/react@49595e9 )**: [New Scheduler] Fix: Suspending an expired update (#15326) //<Andrew Clark>//
- **[b93a8a9bb](facebook/react@b93a8a9 )**: Experimental event API: refactor responder modules for lifecycle inclusion (#15322) //<Dominic Gannaway>//
- **[937d262f5](facebook/react@937d262 )**: React events: keyboard press, types, tests (#15314) //<Nicolas Gallagher>//
- **[7a2dc4853](facebook/react@7a2dc48 )**: Allow DevTools to toggle Suspense fallbacks (#15232) //<Dan Abramov>//
- **[43b1f74c8](facebook/react@43b1f74 )**: Alternate fix for #14198 //<Andrew Clark>//
- **[41aa345d2](facebook/react@41aa345 )**: Fix a crash in Suspense with findDOMNode //<Dan Abramov>//
- **[6d0effad7](facebook/react@6d0effa )**: Expose extra internals in FB build of react-dom/unstable-new-scheduler (#15311) //<Andrew Clark>//
- **[3a44ccefe](facebook/react@3a44cce )**: Fix feature flags react-dom/unstable-new-scheduler (#15309) //<Andrew Clark>//
- **[92a1d8fea](facebook/react@92a1d8f )**: mark react-events as private so we publish script skips it for now (#15307) //<Sunil Pai>//
- **[e5c59359c](facebook/react@e5c5935 )**: Prevent bundling of Node polyfills when importing TestUtils/TestRenderer (#15305) //<Dan Abramov>//
- **[73187239a](facebook/react@7318723 )**: writing unit tests in experimental event Drag API (#15297) //<Behzad Abbasi>//
- **[89064fe68](facebook/react@89064fe )**: Adds displayName to EventComponent and EventTarget (#15268) //<Dominic Gannaway>//
- **[fc6a9f1a1](facebook/react@fc6a9f1 )**: Add test for async event dispatching (#15300) //<Nicolas Gallagher>//
- **[38fa84088](facebook/react@38fa840 )**: Experiemental event API - wrap async dispatched events (#15299) //<Dominic Gannaway>//
- **[4d5cb64aa](facebook/react@4d5cb64 )**: Rewrite ReactFiberScheduler for better integration with Scheduler package (#15151) //<Andrew Clark>//
- **[aed0e1c30](facebook/react@aed0e1c )**: await act(async () => ...) (#14853) //<Sunil Pai>//
- **[4c75881ee](facebook/react@4c75881 )**: Remove maxDuration from tests (#15272) //<Sebastian Markbåge>//
- **[9307932fe](facebook/react@9307932 )**: Refactor event object creation for the experimental event API (#15295) //<Dominic Gannaway>//
- **[6a1e6b2f7](facebook/react@6a1e6b2 )**: Experimental event API: loosen EventTarget constraints and warnings (#15292) //<Dominic Gannaway>//
- **[f243deab8](facebook/react@f243dea )**: Add tests for Press responder event module (#15290) //<Nicolas Gallagher>//
- **[296c4393d](facebook/react@296c439 )**: Add Press event prop types and fix a check in Safari (#15288) //<Nicolas Gallagher>//
- **[4482fdded](facebook/react@4482fdd )**: Fix host context issues around EventComponents and EventTargets (#15284) //<Dominic Gannaway>//
- **[5ef0d1d29](facebook/react@5ef0d1d )**: Rename hover props in experimental event API and write unit tests (#15283) //<Behzad Abbasi>//
- **[9444a5472](facebook/react@9444a54 )**: Warn on nested EventTragets in experimental event API (#15287) //<Dominic Gannaway>//
- **[7f1f5ddc3](facebook/react@7f1f5dd )**: Rename press props in experimental event API (#15263) //<Nicolas Gallagher>//
- **[2e02469fa](facebook/react@2e02469 )**: ReactNative's ref.measureLayout now takes a ref (#15126) //<Eli White>//
- **[1b94fd215](facebook/react@1b94fd2 )**: Make setNativeProps a no-op with Fabric renderer (#15094) //<Eli White>//
- **[08055a625](facebook/react@08055a6 )**: Fix Press module in experimental event API (#15262) //<Nicolas Gallagher>//
- **[f4625f518](facebook/react@f4625f5 )**: Fix on(Long)PressChange events in experimental press event API (#15256) //<Nicolas Gallagher>//
- **[a41b21770](facebook/react@a41b217 )**: Add additional event API responder surfaces (#15248) //<Dominic Gannaway>//
- **[700f17be6](facebook/react@700f17b )**: Fix longpress in experimental Press event module (#15246) //<Nicolas Gallagher>//
- **[5d336df70](facebook/react@5d336df )**: Allow for null targetFiber for root event handling (#15247) //<Dominic Gannaway>//
- **[c6f3524df](facebook/react@c6f3524 )**: Adds React event component and React event target support to SSR renderer (#15242) //<Dominic Gannaway>//
- **[c7a2dce50](facebook/react@c7a2dce )**: Disable JS urls at build level for www (#15230) //<Sebastian Markbåge>//
- **[fb6b50871](facebook/react@fb6b508 )**: Update versions for 16.8.6 //<Dan Abramov>//
- **[1cfd25668](facebook/react@1cfd256 )**: Fix circular module imports causing file size increase (#15231) //<Dominic Gannaway>//
- **[669cafb36](facebook/react@669cafb )**: Adds experimental event component responder surfaces (#15228) //<Dominic Gannaway>//
- **[d8cb10f11](facebook/react@d8cb10f )**: Enabled warnAboutDeprecatedLifecycles flag by default (#15186) //<Brian Vaughn>//
- **[80f8b0d51](facebook/react@80f8b0d )**: Add part of the event responder system for experimental event API (#15179) //<Dominic Gannaway>//
- **[5c2b2c085](facebook/react@5c2b2c0 )**: Warn about async infinite useEffect loop (#15180) //<Dan Abramov>//
- **[8e9a013c0](facebook/react@8e9a013 )**: Release 16.8.5 //<Dan Abramov>//
- **[f33e5790b](facebook/react@f33e579 )**: eslint-plugin-react-hooks@1.6.0 //<Dan Abramov>//
- **[b1cccd1ed](facebook/react@b1cccd1 )**: Warn about setState directly in dep-less useEffect (#15184) //<Dan Abramov>//
- **[78f2775ed](facebook/react@78f2775 )**: Flip event passive logic on passiveBrowserEventsSupported (#15190) //<Dominic Gannaway>//
- **[f161ee2eb](facebook/react@f161ee2 )**: React.warn() and React.error() (#15170) //<Brian Vaughn>//
- **[78968bb3d](facebook/react@78968bb )**: Validate useEffect without deps too (#15183) //<Dan Abramov>//
- **[4b8e1641b](facebook/react@4b8e164 )**: Fork performWork instead of using boolean flag (#15169) //<Sebastian Markbåge>//
- **[56035dac6](facebook/react@56035da )**: unstable_Profiler -> Profiler (#15172) //<Brian Vaughn>//
- **[31518135c](facebook/react@3151813 )**: Strengthen nested update counter test coverage (#15166) //<Dan Abramov>//
- **[66f280c87](facebook/react@66f280c )**: Add internal logic for listening to event responders (#15168) //<Dominic Gannaway>//
- **[b1a56abd6](facebook/react@b1a56ab )**: Fork ReactFiberScheduler with feature flag //<Andrew Clark>//
- **[45f571736](facebook/react@45f5717 )**: ReactFiberScheduler -> ReactFiberScheduler.old //<Andrew Clark>//
- **[c05b4b81f](facebook/react@c05b4b8 )**: Link to useLayoutEffect gist in a warning (#15158) //<Dan Abramov>//
- **[061d6ce3c](facebook/react@061d6ce )**: fix(react-dom): access iframe contentWindow instead of contentDocument (#15099) //<Renan Valentin>//
- **[b83e01cad](facebook/react@b83e01c )**: Adds more scaffolding for experimental event API (#15112) //<Dominic Gannaway>//
- **[daeda44d8](facebook/react@daeda44 )**: Follow up to 15150 (#15152) //<Dominic Gannaway>//
- **[acd65db5b](facebook/react@acd65db )**: Deprecate module pattern (factory) components (#15145) //<Sebastian Markbåge>//
- **[55cc921c5](facebook/react@55cc921 )**: Adds react-events package for internal testing (#15150) //<Dominic Gannaway>//
- **[7ad738630](facebook/react@7ad7386 )**: Improve warning for invalid class contextType (#15142) //<Dan Abramov>//
- **[1e3364e76](facebook/react@1e3364e )**: Test that we don't suspend when disabling yielding (#15143) //<Sebastian Markbåge>//
- **[42c3c967d](facebook/react@42c3c96 )**: Compile invariant directly to throw expressions (#15071) //<Andrew Clark>//
- **[df7b87d25](facebook/react@df7b87d )**: Warn for Context.Consumer with contextType (#14831) //<Brandon Dail>//
- **[2b93d686e](facebook/react@2b93d68 )**: Add more info to invalid hook call error message (#15139) //<Jared Palmer>//
- **[d926936f0](facebook/react@d926936 )**: Eager bailout optimization should always compare to latest reducer (#15124) //<Andrew Clark>//
- **[4162f6026](facebook/react@4162f60 )**: Add feature flag to disable yielding (#15119) //<Sebastian Markbåge>//
- **[8d60bd4dc](facebook/react@8d60bd4 )**: [Shallow] Implement setState for Hooks and remount on type change (#15120) //<Dan Abramov>//
- **[035e4cffb](facebook/react@035e4cf )**: Change passive checker to use defineProperty (#15121) //<Dominic Gannaway>//
- **[b283d75c1](facebook/react@b283d75 )**: Support React.memo in ReactShallowRenderer (#14816) //<Brandon Dail>//
- **[f0621fe23](facebook/react@f0621fe )**: Use same example code for async effect warning (#15118) //<Dan Abramov>//
- **[52c870c8d](facebook/react@52c870c )**: Fix shallow renderer not allowing hooks in forwardRef render functions (#15100) //<Sebastian Silbermann>//
- **[f1ff4348c](facebook/react@f1ff434 )**: Don't suggest a function as its own dep (#15115) //<Dan Abramov>//
- **[371bbf36b](facebook/react@371bbf3 )**: Add infrastructure for passive/non-passive event support for future API exploration (#15036) //<Dominic Gannaway>//
- **[ab5fe174c](facebook/react@ab5fe17 )**: Don't set the first option as selected in select tag with `size` attribute  (#14242) //<Mateusz>//
- **[935f60083](facebook/react@935f600 )**: eslint-plugin-react-hooks@1.5.1 //<Dan Abramov>//
- **[0c03a4743](facebook/react@0c03a47 )**: Adds experimental event API scaffolding (#15108) //<Dominic Gannaway>//
- **[1204c7897](facebook/react@1204c78 )**: [eslint] Wording tweaks (#15078) //<Sophie Alpert>//
- **[9d77a317b](facebook/react@9d77a31 )**: Improve async useEffect warning (#15104) //<Dan Abramov>//
- **[103378b1e](facebook/react@103378b )**: Warn for javascript: URLs in DOM sinks (#15047) //<Sebastian Markbåge>//
- **[5d0c3c6c7](facebook/react@5d0c3c6 )**: [Partial Hydration] Render client-only content at normal priority (#15061) //<Sebastian Markbåge>//
- **[6a4a261ee](facebook/react@6a4a261 )**: Test suspended children are hidden before layout in persistent mode (#15030) //<Andrew Clark>//
- **[bc8bd24c1](facebook/react@bc8bd24 )**: Run persistent mode tests in CI (#15029) //<Andrew Clark>//
- **[3f4852fa5](facebook/react@3f4852f )**: Run Placeholder tests in persistent mode, too (#15013) //<Andrew Clark>//
- **[d0289c7e3](facebook/react@d0289c7 )**: eslint-plugin-react-hooks@1.5.0 //<Dan Abramov>//
- **[03ad9c73e](facebook/react@03ad9c7 )**: [ESLint] Tweak setState updater message and add useEffect(async) warning (#15055) //<Dan Abramov>//
- **[eb6247a9a](facebook/react@eb6247a )**: More concise messages (#15053) //<Dan Abramov>//
- **[197703ecc](facebook/react@197703e )**: [ESLint] Add more hints to lint messages (#15046) //<Dan Abramov>//
- **[6d2666bab](facebook/react@6d2666b )**: Fix ESLint rule crash (#15044) //<Dan Abramov>//
- **[9b7e1d138](facebook/react@9b7e1d1 )**: [ESLint] Suggest moving inside a Hook or useCallback when bare function is a dependency (#15026) //<Dan Abramov>//
- **[1e3b6192b](facebook/react@1e3b619 )**: Import Scheduler directly, not via host config (#14984) //<Andrew Clark>//
- **[5d49dafac](facebook/react@5d49daf )**: Enforce deps array in useMemo and useCallback (#15025) //<Dan Abramov>//
- **[a9aa24ed8](facebook/react@a9aa24e )**: 16.8.4 and changelog //<Brian Vaughn>//
- **[fa5d4ee43](facebook/react@fa5d4ee )**: [ESLint] Treat functions that don't capture anything as static (#14996) //<Dan Abramov>//
- **[fd557d453](facebook/react@fd557d4 )**: Warn on mount when deps are not an array (#15018) //<Dan Abramov>//
- **[ce45ca9ba](facebook/react@ce45ca9 )**: Prettier //<Andrew Clark>//
- **[757a70b25](facebook/react@757a70b )**: ReactNoop.yield -> Scheduler.yieldValue (#15008) //<Andrew Clark>//
- **[9d756d903](facebook/react@9d756d9 )**: Revert #14756 changes to ReactFiberScheduler (#14992) //<Andrew Clark>//
- **[f16442a10](facebook/react@f16442a )**: eslint-plugin-react-hooks@1.4.0 //<Dan Abramov>//
- **[e1e45fb36](facebook/react@e1e45fb )**: [ESLint] Suggest to destructure props when they are only used as members (#14993) //<Dan Abramov>//
- **[59ef28437](facebook/react@59ef284 )**: Warn about dependencies outside of render scope (#14990) //<Dan Abramov>//
- **[df7b4768c](facebook/react@df7b476 )**: [ESLint] Deduplicate suggested dependencies (#14982) //<Dan Abramov>//
- **[02404d793](facebook/react@02404d7 )**: Avoid dynamic dispatch for scheduler calls (#14968) //<Dan Abramov>//
- **[bb2939ccc](facebook/react@bb2939c )**: Support editable useState hooks in DevTools (#14906) //<Brian Vaughn>//
- **[69060e1da](facebook/react@69060e1 )**: Swap expect(ReactNoop) for expect(Scheduler) (#14971) //<Andrew Clark>//
- **[ccb2a8a44](facebook/react@ccb2a8a )**: Replace test renderer's fake Scheduler implementation with mock build (#14970) //<Andrew Clark>//
- **[53e787b45](facebook/react@53e787b )**: Replace noop's fake Scheduler implementation with mock Scheduler build (#14969) //<Andrew Clark>//
- **[3ada82b74](facebook/react@3ada82b )**: Allow extraneous effect dependencies (#14967) //<Dan Abramov>//
- **[00748c53e](facebook/react@00748c5 )**: Add new mock build of Scheduler with flush, yield API (#14964) //<Andrew Clark>//
- **[4186952a6](facebook/react@4186952 )**: Fixed incompatibility between react-debug-tools and useContext() (#14940) //<Brian Vaughn>//
- **[0b8efb229](facebook/react@0b8efb2 )**: Allow omitting constant primitive deps (#14959) //<Dan Abramov>//

Changelog:
[General][Changed] - React sync for revisions 8e25ed2...ec6691a

Follow steps in the [React Native test plan](https://our.intern.facebook.com/intern/dex/react/test-workflows-react-native/).

Reviewed By: shergin

Differential Revision: D15171103

fbshipit-source-id: d16b54dfd575b3a1fa38e6a132633f42c715b4fd
@johnhaup
Copy link

@johnhaup johnhaup commented May 21, 2019

This was happening to me because I had the Debugger running and connected to another device. So the iOS simulator connected to the debugger was blocking the Android device from connecting to the packager. Stopping remote debugging on the iOS simulator allowed the Android device to connect, or you could also start debugging remotely on the Android device as well.

@lawsonk1215
Copy link

@lawsonk1215 lawsonk1215 commented May 23, 2019

This worked for me on Windows 10: (After setting up the debug server host & port.. )
I checked my firewall settings (Windows Firewall>Allow an app or feature through Windows Firewall) and found out that there are TWO Node.js apps but one of them isn't allowed through the firewall! Checked the box and saved then everything worked as it should!

This was my issue as well, thank you!

calebmer added a commit to calebmer/react-native that referenced this issue May 24, 2019
Summary:
This sync includes the following changes:
- **[ec6691a68](facebook/react@ec6691a )**: Event API: remove isTargetDirectlyWithinEventComponent (facebook#15546) //<Dominic Gannaway>//
- **[a6e30001f](facebook/react@a6e3000 )**: Delete duplicate Focus.js (facebook#15540) //<Dominic Gannaway>//
- **[f7993d547](facebook/react@f7993d5 )**: Delete duplicate Hover.js (facebook#15539) //<Dominic Gannaway>//
- **[c8ee10037](facebook/react@c8ee100 )**: Delete duplicate Swipe.js (facebook#15541) //<Dominic Gannaway>//
- **[494716c9b](facebook/react@494716c )**: Delete duplicate Drag.js (facebook#15537) //<Dominic Gannaway>//
- **[377846fef](facebook/react@377846f )**: Delete duplicate Press.js (facebook#15538) //<Dominic Gannaway>//
- **[379515e83](facebook/react@379515e )**: Follow up to 15535 (facebook#15536) //<Dominic Gannaway>//
- **[bd88982fb](facebook/react@bd88982 )**: Event API: use `capture` for all event listeners using experimental responder system (facebook#15526) //<Dominic Gannaway>//
- **[72ca3c60e](facebook/react@72ca3c6 )**: Bump scheduler version to 0.14.0 (facebook#15395) //<Andrew Clark>//
- **[7882c41f6](facebook/react@7882c41 )**: Use lowercase entry points for event modules (facebook#15535) //<Andrew Clark>//
- **[43c4e5f34](facebook/react@43c4e5f )**: Add method for forcing a lower framerate //<Nathan Schloss>//
- **[1b752f191](facebook/react@1b752f1 )**: Fixed potential interaction tracing leak in Suspense thennable memoization (facebook#15531) //<Brian Vaughn>//
- **[12e5a13cf](facebook/react@12e5a13 )**: [React Native] Inline calls to FabricUIManager in shared code (facebook#15490) //<Eli White>//
- **[2cca18728](facebook/react@2cca187 )**: React Events: add onFocusVisibleChange to Focus (facebook#15516) //<Nicolas Gallagher>//
- **[cc5a49379](facebook/react@cc5a493 )**: React Events: FocusScope tweaks and docs (facebook#15515) //<Nicolas Gallagher>//
- **[796c67a25](facebook/react@796c67a )**: Event API: responder event types should not re-register on EventComponent update (facebook#15514) //<Dominic Gannaway>//
- **[c4d1dcb53](facebook/react@c4d1dcb )**: React Events: core API documentation followup (facebook#15506) //<Dominic Gannaway>//
- **[41ef1961c](facebook/react@41ef196 )**: Update TopLevelEventTypes.js (facebook#15511) //<Dan Nate>//
- **[7a482af5d](facebook/react@7a482af )**: Event API: Fix bug where Press root events were not being cleared (facebook#15507) //<Dominic Gannaway>//
- **[a14e24efa](facebook/react@a14e24e )**: React Events: core API documentation (facebook#15505) //<Nicolas Gallagher>//
- **[8658611b6](facebook/react@8658611 )**: Event API: ensure event keys are unique + add validation (facebook#15501) //<Dominic Gannaway>//
- **[d9839740e](facebook/react@d983974 )**: React events: remove unused types (facebook#15503) //<Nicolas Gallagher>//
- **[0b3431170](facebook/react@0b34311 )**: React events: fix press end event dispatching (facebook#15500) //<Nicolas Gallagher>//
- **[d1f667acc](facebook/react@d1f667a )**: Event API: follow up fixes for FocusScope + context changes (facebook#15496) //<Dominic Gannaway>//
- **[c530639dd](facebook/react@c530639 )**: Minor code structure adjustments to the bundles.js file (facebook#15079) //<Kunuk Nykjær>//
- **[ed36df46c](facebook/react@ed36df4 )**: add --watch mode to "yarn build" (facebook#15116) //<Alec Larson>//
- **[793ef9b85](facebook/react@793ef9b )**: test(eslint-plugin-react-hooks): add coverage for unused custom hook (facebook#15130) //<Redmond Tran>//
- **[d61da9387](facebook/react@d61da93 )**: test(accumulate): add test suite for accumulate function (facebook#15159) //<Jeffrey Berry>//
- **[a187e9b5e](facebook/react@a187e9b )**: React Native: Allow Views to be nested inside of Text (facebook#15464) //<Adam Comella>//
- **[f85aadefc](facebook/react@f85aade )**: ADD: disablePictureInPicture attribute for HTML5 videos (facebook#15334) //<Radu-Sebastian Amarie>//
- **[1eb2b892d](facebook/react@1eb2b89 )**: give  `canUseDOM` with a possibility to be a constant (facebook#14194) //<FUJI Goro>//
- **[de26d6dd3](facebook/react@de26d6d )**: typo fix (facebook#15493) //<shubham>//
- **[64e3da286](facebook/react@64e3da2 )**: Event API: Add `FocusScope` surface (facebook#15487) //<Dominic Gannaway>//
- **[3f058debc](facebook/react@3f058de )**: Event API: various bug fixes (facebook#15485) //<Dominic Gannaway>//
- **[fb28e9048](facebook/react@fb28e90 )**: Add missing word to code comment for clarity (facebook#15443) //<Brendan McLoughlin>//
- **[fa2fa3564](facebook/react@fa2fa35 )**: Experimental event API: adds context.isTargetDirectlyWithinEventComponent (facebook#15481) //<Dominic Gannaway>//
- **[d3af2f2a5](facebook/react@d3af2f2 )**: Experimental Event API: add event component mount phase callback (facebook#15480) //<Dominic Gannaway>//
- **[ce126fbb2](facebook/react@ce126fb )**: Fix priority inference of next level of work (facebook#15478) //<Andrew Clark>//
- **[71c8759ce](facebook/react@71c8759 )**: Measure callback timeout relative to current time (facebook#15479) //<Andrew Clark>//
- **[9c6ff136c](facebook/react@9c6ff13 )**: Remove timeout from performance flamegraph (facebook#15477) //<Andrew Clark>//
- **[299a2714c](facebook/react@299a271 )**: Use stricter equality check (facebook#15474) //<Dan Abramov>//
- **[017d6f14b](facebook/react@017d6f1 )**: Experimental Event API: add `rootEventTypes` support to event responders (facebook#15475) //<Dominic Gannaway>//
- **[784ebd8fa](facebook/react@784ebd8 )**: Experimental event API: rework the propagation system for event components (facebook#15462) //<Dominic Gannaway>//
- **[587676900](facebook/react@5876769 )**: React events: initial implementation of disabled prop (facebook#15458) //<Nicolas Gallagher>//
- **[59c7aef91](facebook/react@59c7aef )**: React events: add a test for focusable descendants (facebook#15457) //<Nicolas Gallagher>//
- **[0a8da3391](facebook/react@0a8da33 )**: React events: README update types and remove stopPropagation prop (facebook#15456) //<Nicolas Gallagher>//
- **[d584fcdc6](facebook/react@d584fcd )**: React events: use passive events where possible (facebook#15454) //<Nicolas Gallagher>//
- **[051513bfa](facebook/react@051513b )**: React Events: consolidate logic for Press event component (facebook#15451) //<Nicolas Gallagher>//
- **[cdfce1ad2](facebook/react@cdfce1a )**: React events: consolidate logic of Hover event component (facebook#15450) //<Nicolas Gallagher>//
- **[5857c89da](facebook/react@5857c89 )**: React events: extract common helper functions (facebook#15449) //<Nicolas Gallagher>//
- **[0b50fb29f](facebook/react@0b50fb2 )**: Include rootEventTypes in DOMEventResponderSystem stopPropagation tests (facebook#15433) //<Nicolas Gallagher>//
- **[1ae409d2c](facebook/react@1ae409d )**: React events: fix nested Hover components error (facebook#15428) //<Nicolas Gallagher>//
- **[c73ab39c1](facebook/react@c73ab39 )**: React events: make nested Focus work as expected (facebook#15421) //<Nicolas Gallagher>//
- **[4221565e1](facebook/react@4221565 )**: Cancel pending commit before starting on root //<Andrew Clark>//
- **[9ebe1768a](facebook/react@9ebe176 )**: Experimental Event API: Redesign event responder propagation (facebook#15408) //<Dominic Gannaway>//
- **[a30e7d992](facebook/react@a30e7d9 )**: act() tests - Reuse and properly unmount containers (facebook#14974) //<Philipp Spiess>//
- **[8cf963c6c](facebook/react@8cf963c )**: React events: ignore device buttons that aren't for primary interactions (facebook#15402) //<Nicolas Gallagher>//
- **[38bd570d4](facebook/react@38bd570 )**: Stop tracking bundle sizes (facebook#15404) //<Andrew Clark>//
- **[3438e5ce8](facebook/react@3438e5c )**: Experimental Event API: Add Hover onUnmount support (facebook#15394) //<Dominic Gannaway>//
- **[805e7f873](facebook/react@805e7f8 )**: React events: add unmounting to Focus (facebook#15396) //<Nicolas Gallagher>//
- **[543353a04](facebook/react@543353a )**: Experimental Event API: Remove "listener" from event objects (facebook#15391) //<Dominic Gannaway>//
- **[9055e31e5](facebook/react@9055e31 )**: Replace old Fiber Scheduler with new one (facebook#15387) //<Andrew Clark>//
- **[4e59d4f5d](facebook/react@4e59d4f )**: React events: add onHoverMove support (facebook#15388) //<Nicolas Gallagher>//
- **[de7590327](facebook/react@de75903 )**: Fix CI (facebook#15393) //<Andrew Clark>//
- **[687e4fb6f](facebook/react@687e4fb )**: Bump scheduler version to 0.14.0 //<Andrew Clark>//
- **[45473c94c](facebook/react@45473c9 )**: React events: Press event fixes (facebook#15386) //<Nicolas Gallagher>//
- **[9672cf621](facebook/react@9672cf6 )**: Experimental Event API: adds `stopPropagation` by default to Press (facebook#15384) //<Dominic Gannaway>//
- **[a9eff329c](facebook/react@a9eff32 )**: Remove TouchHitTarget SSR logic to prevent issues with mouse events (facebook#15381) //<Dominic Gannaway>//
- **[c9841001b](facebook/react@c984100 )**: Experimental Event API: preventDefault handling for anchors (facebook#15383) //<Dominic Gannaway>//
- **[c25c59c80](facebook/react@c25c59c )**: Apply the Just Noticeable Difference to suspense timeouts (facebook#15367) //<Sebastian Markbåge>//
- **[3e2e930d6](facebook/react@3e2e930 )**: Fixes a Flow type merge conflict (facebook#15378) //<Dominic Gannaway>//
- **[7fc91f17c](facebook/react@7fc91f1 )**: React events: add onPressMove and pressRetentionOffset to Press (facebook#15374) //<Nicolas Gallagher>//
- **[dd9cef9fc](facebook/react@dd9cef9 )**: Experimental Event API: Add targets and responder utility method for finding targets (facebook#15372) //<Dominic Gannaway>//
- **[c64b33003](facebook/react@c64b330 )**: Move EventTypes to ReactTypes (facebook#15364) //<Dominic Gannaway>//
- **[4c78ac0b9](facebook/react@4c78ac0 )**: Track Event Time as the Start Time for Suspense (facebook#15358) //<Sebastian Markbåge>//
- **[875d05d55](facebook/react@875d05d )**: Include full error messages in React Native build (facebook#15363) //<Andrew Clark>//
- **[1b2159acc](facebook/react@1b2159a )**: [React Native] measure calls will now call FabricUIManager (facebook#15324) //<Eli White>//
- **[c7a959982](facebook/react@c7a9599 )**: [React Native] Add tests to paper renderer for measure, measureLayout (facebook#15323) //<Eli White>//
- **[aece8119c](facebook/react@aece811 )**: Refactor EventComponent logic + add onOwnershipChange callback (facebook#15354) //<Dominic Gannaway>//
- **[183d1f42e](facebook/react@183d1f4 )**: Fix: Measure expiration times relative to module initialization (facebook#15357) //<Andrew Clark>//
- **[b4bc33a58](facebook/react@b4bc33a )**: Fix areHookInputsEqual method  warning params order (facebook#15345) //<砖家>//
- **[29fb5862f](facebook/react@29fb586 )**: Move EventComponent state creation to complete phase + tests (facebook#15352) //<Dominic Gannaway>//
- **[745baf2e0](facebook/react@745baf2 )**: Provide new jsx transform target for reactjs/rfcs#107 (facebook#15141) //<Ricky Vetter>//
- **[81a61b1d1](facebook/react@81a61b1 )**: React events: add delay props to Press module (facebook#15340) //<Nicolas Gallagher>//
- **[4064ea9fa](facebook/react@4064ea9 )**: Experimental event API: Support EventComponent onUnmount responder callback (facebook#15335) //<Dominic Gannaway>//
- **[4fbbae8af](facebook/react@4fbbae8 )**: Add full TouchHitTarget hit slop (experimental event API) to ReactDOM (facebook#15308) //<Dominic Gannaway>//
- **[958b6173f](facebook/react@958b617 )**: Add delay props to Hover event module (facebook#15325) //<Nicolas Gallagher>//
- **[c3cc936da](facebook/react@c3cc936 )**: Add Hover,Focus,Press docs to REAMDE (facebook#15328) //<Nicolas Gallagher>//
- **[49595e921](facebook/react@49595e9 )**: [New Scheduler] Fix: Suspending an expired update (facebook#15326) //<Andrew Clark>//
- **[b93a8a9bb](facebook/react@b93a8a9 )**: Experimental event API: refactor responder modules for lifecycle inclusion (facebook#15322) //<Dominic Gannaway>//
- **[937d262f5](facebook/react@937d262 )**: React events: keyboard press, types, tests (facebook#15314) //<Nicolas Gallagher>//
- **[7a2dc4853](facebook/react@7a2dc48 )**: Allow DevTools to toggle Suspense fallbacks (facebook#15232) //<Dan Abramov>//
- **[43b1f74c8](facebook/react@43b1f74 )**: Alternate fix for facebook#14198 //<Andrew Clark>//
- **[41aa345d2](facebook/react@41aa345 )**: Fix a crash in Suspense with findDOMNode //<Dan Abramov>//
- **[6d0effad7](facebook/react@6d0effa )**: Expose extra internals in FB build of react-dom/unstable-new-scheduler (facebook#15311) //<Andrew Clark>//
- **[3a44ccefe](facebook/react@3a44cce )**: Fix feature flags react-dom/unstable-new-scheduler (facebook#15309) //<Andrew Clark>//
- **[92a1d8fea](facebook/react@92a1d8f )**: mark react-events as private so we publish script skips it for now (facebook#15307) //<Sunil Pai>//
- **[e5c59359c](facebook/react@e5c5935 )**: Prevent bundling of Node polyfills when importing TestUtils/TestRenderer (facebook#15305) //<Dan Abramov>//
- **[73187239a](facebook/react@7318723 )**: writing unit tests in experimental event Drag API (facebook#15297) //<Behzad Abbasi>//
- **[89064fe68](facebook/react@89064fe )**: Adds displayName to EventComponent and EventTarget (facebook#15268) //<Dominic Gannaway>//
- **[fc6a9f1a1](facebook/react@fc6a9f1 )**: Add test for async event dispatching (facebook#15300) //<Nicolas Gallagher>//
- **[38fa84088](facebook/react@38fa840 )**: Experiemental event API - wrap async dispatched events (facebook#15299) //<Dominic Gannaway>//
- **[4d5cb64aa](facebook/react@4d5cb64 )**: Rewrite ReactFiberScheduler for better integration with Scheduler package (facebook#15151) //<Andrew Clark>//
- **[aed0e1c30](facebook/react@aed0e1c )**: await act(async () => ...) (facebook#14853) //<Sunil Pai>//
- **[4c75881ee](facebook/react@4c75881 )**: Remove maxDuration from tests (facebook#15272) //<Sebastian Markbåge>//
- **[9307932fe](facebook/react@9307932 )**: Refactor event object creation for the experimental event API (facebook#15295) //<Dominic Gannaway>//
- **[6a1e6b2f7](facebook/react@6a1e6b2 )**: Experimental event API: loosen EventTarget constraints and warnings (facebook#15292) //<Dominic Gannaway>//
- **[f243deab8](facebook/react@f243dea )**: Add tests for Press responder event module (facebook#15290) //<Nicolas Gallagher>//
- **[296c4393d](facebook/react@296c439 )**: Add Press event prop types and fix a check in Safari (facebook#15288) //<Nicolas Gallagher>//
- **[4482fdded](facebook/react@4482fdd )**: Fix host context issues around EventComponents and EventTargets (facebook#15284) //<Dominic Gannaway>//
- **[5ef0d1d29](facebook/react@5ef0d1d )**: Rename hover props in experimental event API and write unit tests (facebook#15283) //<Behzad Abbasi>//
- **[9444a5472](facebook/react@9444a54 )**: Warn on nested EventTragets in experimental event API (facebook#15287) //<Dominic Gannaway>//
- **[7f1f5ddc3](facebook/react@7f1f5dd )**: Rename press props in experimental event API (facebook#15263) //<Nicolas Gallagher>//
- **[2e02469fa](facebook/react@2e02469 )**: ReactNative's ref.measureLayout now takes a ref (facebook#15126) //<Eli White>//
- **[1b94fd215](facebook/react@1b94fd2 )**: Make setNativeProps a no-op with Fabric renderer (facebook#15094) //<Eli White>//
- **[08055a625](facebook/react@08055a6 )**: Fix Press module in experimental event API (facebook#15262) //<Nicolas Gallagher>//
- **[f4625f518](facebook/react@f4625f5 )**: Fix on(Long)PressChange events in experimental press event API (facebook#15256) //<Nicolas Gallagher>//
- **[a41b21770](facebook/react@a41b217 )**: Add additional event API responder surfaces (facebook#15248) //<Dominic Gannaway>//
- **[700f17be6](facebook/react@700f17b )**: Fix longpress in experimental Press event module (facebook#15246) //<Nicolas Gallagher>//
- **[5d336df70](facebook/react@5d336df )**: Allow for null targetFiber for root event handling (facebook#15247) //<Dominic Gannaway>//
- **[c6f3524df](facebook/react@c6f3524 )**: Adds React event component and React event target support to SSR renderer (facebook#15242) //<Dominic Gannaway>//
- **[c7a2dce50](facebook/react@c7a2dce )**: Disable JS urls at build level for www (facebook#15230) //<Sebastian Markbåge>//
- **[fb6b50871](facebook/react@fb6b508 )**: Update versions for 16.8.6 //<Dan Abramov>//
- **[1cfd25668](facebook/react@1cfd256 )**: Fix circular module imports causing file size increase (facebook#15231) //<Dominic Gannaway>//
- **[669cafb36](facebook/react@669cafb )**: Adds experimental event component responder surfaces (facebook#15228) //<Dominic Gannaway>//
- **[d8cb10f11](facebook/react@d8cb10f )**: Enabled warnAboutDeprecatedLifecycles flag by default (facebook#15186) //<Brian Vaughn>//
- **[80f8b0d51](facebook/react@80f8b0d )**: Add part of the event responder system for experimental event API (facebook#15179) //<Dominic Gannaway>//
- **[5c2b2c085](facebook/react@5c2b2c0 )**: Warn about async infinite useEffect loop (facebook#15180) //<Dan Abramov>//
- **[8e9a013c0](facebook/react@8e9a013 )**: Release 16.8.5 //<Dan Abramov>//
- **[f33e5790b](facebook/react@f33e579 )**: eslint-plugin-react-hooks@1.6.0 //<Dan Abramov>//
- **[b1cccd1ed](facebook/react@b1cccd1 )**: Warn about setState directly in dep-less useEffect (facebook#15184) //<Dan Abramov>//
- **[78f2775ed](facebook/react@78f2775 )**: Flip event passive logic on passiveBrowserEventsSupported (facebook#15190) //<Dominic Gannaway>//
- **[f161ee2eb](facebook/react@f161ee2 )**: React.warn() and React.error() (facebook#15170) //<Brian Vaughn>//
- **[78968bb3d](facebook/react@78968bb )**: Validate useEffect without deps too (facebook#15183) //<Dan Abramov>//
- **[4b8e1641b](facebook/react@4b8e164 )**: Fork performWork instead of using boolean flag (facebook#15169) //<Sebastian Markbåge>//
- **[56035dac6](facebook/react@56035da )**: unstable_Profiler -> Profiler (facebook#15172) //<Brian Vaughn>//
- **[31518135c](facebook/react@3151813 )**: Strengthen nested update counter test coverage (facebook#15166) //<Dan Abramov>//
- **[66f280c87](facebook/react@66f280c )**: Add internal logic for listening to event responders (facebook#15168) //<Dominic Gannaway>//
- **[b1a56abd6](facebook/react@b1a56ab )**: Fork ReactFiberScheduler with feature flag //<Andrew Clark>//
- **[45f571736](facebook/react@45f5717 )**: ReactFiberScheduler -> ReactFiberScheduler.old //<Andrew Clark>//
- **[c05b4b81f](facebook/react@c05b4b8 )**: Link to useLayoutEffect gist in a warning (facebook#15158) //<Dan Abramov>//
- **[061d6ce3c](facebook/react@061d6ce )**: fix(react-dom): access iframe contentWindow instead of contentDocument (facebook#15099) //<Renan Valentin>//
- **[b83e01cad](facebook/react@b83e01c )**: Adds more scaffolding for experimental event API (facebook#15112) //<Dominic Gannaway>//
- **[daeda44d8](facebook/react@daeda44 )**: Follow up to 15150 (facebook#15152) //<Dominic Gannaway>//
- **[acd65db5b](facebook/react@acd65db )**: Deprecate module pattern (factory) components (facebook#15145) //<Sebastian Markbåge>//
- **[55cc921c5](facebook/react@55cc921 )**: Adds react-events package for internal testing (facebook#15150) //<Dominic Gannaway>//
- **[7ad738630](facebook/react@7ad7386 )**: Improve warning for invalid class contextType (facebook#15142) //<Dan Abramov>//
- **[1e3364e76](facebook/react@1e3364e )**: Test that we don't suspend when disabling yielding (facebook#15143) //<Sebastian Markbåge>//
- **[42c3c967d](facebook/react@42c3c96 )**: Compile invariant directly to throw expressions (facebook#15071) //<Andrew Clark>//
- **[df7b87d25](facebook/react@df7b87d )**: Warn for Context.Consumer with contextType (facebook#14831) //<Brandon Dail>//
- **[2b93d686e](facebook/react@2b93d68 )**: Add more info to invalid hook call error message (facebook#15139) //<Jared Palmer>//
- **[d926936f0](facebook/react@d926936 )**: Eager bailout optimization should always compare to latest reducer (facebook#15124) //<Andrew Clark>//
- **[4162f6026](facebook/react@4162f60 )**: Add feature flag to disable yielding (facebook#15119) //<Sebastian Markbåge>//
- **[8d60bd4dc](facebook/react@8d60bd4 )**: [Shallow] Implement setState for Hooks and remount on type change (facebook#15120) //<Dan Abramov>//
- **[035e4cffb](facebook/react@035e4cf )**: Change passive checker to use defineProperty (facebook#15121) //<Dominic Gannaway>//
- **[b283d75c1](facebook/react@b283d75 )**: Support React.memo in ReactShallowRenderer (facebook#14816) //<Brandon Dail>//
- **[f0621fe23](facebook/react@f0621fe )**: Use same example code for async effect warning (facebook#15118) //<Dan Abramov>//
- **[52c870c8d](facebook/react@52c870c )**: Fix shallow renderer not allowing hooks in forwardRef render functions (facebook#15100) //<Sebastian Silbermann>//
- **[f1ff4348c](facebook/react@f1ff434 )**: Don't suggest a function as its own dep (facebook#15115) //<Dan Abramov>//
- **[371bbf36b](facebook/react@371bbf3 )**: Add infrastructure for passive/non-passive event support for future API exploration (facebook#15036) //<Dominic Gannaway>//
- **[ab5fe174c](facebook/react@ab5fe17 )**: Don't set the first option as selected in select tag with `size` attribute  (facebook#14242) //<Mateusz>//
- **[935f60083](facebook/react@935f600 )**: eslint-plugin-react-hooks@1.5.1 //<Dan Abramov>//
- **[0c03a4743](facebook/react@0c03a47 )**: Adds experimental event API scaffolding (facebook#15108) //<Dominic Gannaway>//
- **[1204c7897](facebook/react@1204c78 )**: [eslint] Wording tweaks (facebook#15078) //<Sophie Alpert>//
- **[9d77a317b](facebook/react@9d77a31 )**: Improve async useEffect warning (facebook#15104) //<Dan Abramov>//
- **[103378b1e](facebook/react@103378b )**: Warn for javascript: URLs in DOM sinks (facebook#15047) //<Sebastian Markbåge>//
- **[5d0c3c6c7](facebook/react@5d0c3c6 )**: [Partial Hydration] Render client-only content at normal priority (facebook#15061) //<Sebastian Markbåge>//
- **[6a4a261ee](facebook/react@6a4a261 )**: Test suspended children are hidden before layout in persistent mode (facebook#15030) //<Andrew Clark>//
- **[bc8bd24c1](facebook/react@bc8bd24 )**: Run persistent mode tests in CI (facebook#15029) //<Andrew Clark>//
- **[3f4852fa5](facebook/react@3f4852f )**: Run Placeholder tests in persistent mode, too (facebook#15013) //<Andrew Clark>//
- **[d0289c7e3](facebook/react@d0289c7 )**: eslint-plugin-react-hooks@1.5.0 //<Dan Abramov>//
- **[03ad9c73e](facebook/react@03ad9c7 )**: [ESLint] Tweak setState updater message and add useEffect(async) warning (facebook#15055) //<Dan Abramov>//
- **[eb6247a9a](facebook/react@eb6247a )**: More concise messages (facebook#15053) //<Dan Abramov>//
- **[197703ecc](facebook/react@197703e )**: [ESLint] Add more hints to lint messages (facebook#15046) //<Dan Abramov>//
- **[6d2666bab](facebook/react@6d2666b )**: Fix ESLint rule crash (facebook#15044) //<Dan Abramov>//
- **[9b7e1d138](facebook/react@9b7e1d1 )**: [ESLint] Suggest moving inside a Hook or useCallback when bare function is a dependency (facebook#15026) //<Dan Abramov>//
- **[1e3b6192b](facebook/react@1e3b619 )**: Import Scheduler directly, not via host config (facebook#14984) //<Andrew Clark>//
- **[5d49dafac](facebook/react@5d49daf )**: Enforce deps array in useMemo and useCallback (facebook#15025) //<Dan Abramov>//
- **[a9aa24ed8](facebook/react@a9aa24e )**: 16.8.4 and changelog //<Brian Vaughn>//
- **[fa5d4ee43](facebook/react@fa5d4ee )**: [ESLint] Treat functions that don't capture anything as static (facebook#14996) //<Dan Abramov>//
- **[fd557d453](facebook/react@fd557d4 )**: Warn on mount when deps are not an array (facebook#15018) //<Dan Abramov>//
- **[ce45ca9ba](facebook/react@ce45ca9 )**: Prettier //<Andrew Clark>//
- **[757a70b25](facebook/react@757a70b )**: ReactNoop.yield -> Scheduler.yieldValue (facebook#15008) //<Andrew Clark>//
- **[9d756d903](facebook/react@9d756d9 )**: Revert facebook#14756 changes to ReactFiberScheduler (facebook#14992) //<Andrew Clark>//
- **[f16442a10](facebook/react@f16442a )**: eslint-plugin-react-hooks@1.4.0 //<Dan Abramov>//
- **[e1e45fb36](facebook/react@e1e45fb )**: [ESLint] Suggest to destructure props when they are only used as members (facebook#14993) //<Dan Abramov>//
- **[59ef28437](facebook/react@59ef284 )**: Warn about dependencies outside of render scope (facebook#14990) //<Dan Abramov>//
- **[df7b4768c](facebook/react@df7b476 )**: [ESLint] Deduplicate suggested dependencies (facebook#14982) //<Dan Abramov>//
- **[02404d793](facebook/react@02404d7 )**: Avoid dynamic dispatch for scheduler calls (facebook#14968) //<Dan Abramov>//
- **[bb2939ccc](facebook/react@bb2939c )**: Support editable useState hooks in DevTools (facebook#14906) //<Brian Vaughn>//
- **[69060e1da](facebook/react@69060e1 )**: Swap expect(ReactNoop) for expect(Scheduler) (facebook#14971) //<Andrew Clark>//
- **[ccb2a8a44](facebook/react@ccb2a8a )**: Replace test renderer's fake Scheduler implementation with mock build (facebook#14970) //<Andrew Clark>//
- **[53e787b45](facebook/react@53e787b )**: Replace noop's fake Scheduler implementation with mock Scheduler build (facebook#14969) //<Andrew Clark>//
- **[3ada82b74](facebook/react@3ada82b )**: Allow extraneous effect dependencies (facebook#14967) //<Dan Abramov>//
- **[00748c53e](facebook/react@00748c5 )**: Add new mock build of Scheduler with flush, yield API (facebook#14964) //<Andrew Clark>//
- **[4186952a6](facebook/react@4186952 )**: Fixed incompatibility between react-debug-tools and useContext() (facebook#14940) //<Brian Vaughn>//
- **[0b8efb229](facebook/react@0b8efb2 )**: Allow omitting constant primitive deps (facebook#14959) //<Dan Abramov>//

Changelog:
[General][Changed] - React sync for revisions 8e25ed2...ec6691a

Follow steps in the [React Native test plan](https://our.intern.facebook.com/intern/dex/react/test-workflows-react-native/).

Reviewed By: shergin

Differential Revision: D15171103

fbshipit-source-id: d16b54dfd575b3a1fa38e6a132633f42c715b4fd

# Conflicts:
#	package.json
#	yarn.lock
@hladf
Copy link

@hladf hladf commented May 30, 2019

I solved with:

https://www.youtube.com/watch?v=XhiE0HEiYd4

https://stackoverflow.com/questions/44446523/unable-to-load-script-from-assets-index-android-bundle-on-windows

but.... when I reload the app in emulator, crash again and shows the message:
COULD NOT CONNECT TO DEVELOPMENT SERVER

So I tried to add node.js and genymotion player.exe in firewall and restart all (geny, react), and works again...

@769062159
Copy link

@769062159 769062159 commented Jun 4, 2019

ctrl+Win cmd 命令行 ipconfig查找ipV4地址 我的是192.168.0.111,之后我将192.168.0.111:8081放在
image
image

成功解决!

@Krutarth-Dave
Copy link

@Krutarth-Dave Krutarth-Dave commented Jun 4, 2019

I added android:usesCleartextTraffic="true" to AndroidManifest.xml at the <application ... tag and rebuilt the app. After that, it started to load from dev server normally.

This fixed it. Thanks a ton.

@shredder-rull
Copy link

@shredder-rull shredder-rull commented Jun 6, 2019

Have the same problem only on real android device.
Solution:

  1. Add file android/app/src/main/res/xml/network_security_config.xml
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <domain-config cleartextTrafficPermitted="true">
        <domain includeSubdomains="true">localhost</domain>
    </domain-config>
</network-security-config>
  1. Add line to android/app/src/main/AndroidManifest.xml
<application
    ...
    android:networkSecurityConfig="@xml/network_security_config"
    ...
>
@fatalstar
Copy link

@fatalstar fatalstar commented Jun 9, 2019

Find the cure .
This issue helped me resolve the problem in following steps.

  1. (in project directory) mkdir android/app/src/main/assets
  2. react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
  3. react-native run-android

https://stackoverflow.com/questions/44446523/unable-to-load-script-from-assets-index-android-bundle-on-windows

@vibhuranjan
Copy link

@vibhuranjan vibhuranjan commented Jun 12, 2019

It worked for me after running adb reverse tcp:8081 tcp:8081. Earlier it was opening package server window but nothing was happening after Loading dependency graph, done. message.
Now everything works fine after running above mentioned command.

@regalstreak
Copy link

@regalstreak regalstreak commented Jun 24, 2019

This is applicable to Android 9.0+ according to the Network Security Configuration.
Well, so after trying all possible solutions I found on the web, I decided to investigate the native Android logcat manually. Even after adding android:usesCleartextTraffic="true", I found this in the logcat:

06-25 02:32:34.561 32001 32001 E unknown:ReactNative: Caused by: java.net.UnknownServiceException: CLEARTEXT communication to 192.168.29.96 not permitted by network security policy

So, I tried to inspect my react-native app's source. I found that in debug variant, there is already a network-security-config which is defined by react-native guys, that conflicts with the main variant.

There's an easy solution to this.
Go to <app-src>/android/app/src/debug/res/xml/react_native_config.xml
Add a new line with your own IP address in the like:

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
  <domain-config cleartextTrafficPermitted="true">
    <domain includeSubdomains="false">localhost</domain>
    <domain includeSubdomains="false">10.0.2.2</domain>
    <domain includeSubdomains="false">10.0.3.2</domain>
    ***<domain includeSubdomains="false">192.168.29.96</domain>***
  </domain-config>
</network-security-config>

As my computer's local IP (check from ifconfig for linux) is 192.168.29.96, I added the above line in ***

Then, you need to clean and rebuild for Android!

cd <app-src>/android
./gradlew clean
cd <app-src>
react-native run-android

I hope this works for you.

@rafidamr
Copy link

@rafidamr rafidamr commented Jun 25, 2019

What I have done: (working on emulator Android Pie 9)

  1. Set IP and port on Debug server host & port for device by clicking Ctrl+M and Dev Setting in emulator. Make sure you set the host and port using Bundler's host and port (default: localhost:8081) and make sure your port is not blocked by other process
  2. Run adb reverse tcp:8081 tcp:8081 on home project directory
  3. Add android:usesCleartextTraffic="true" to <application> node in AndroidManifest.xml
  4. After accomplishing three points above, restart your project
@mguay22
Copy link

@mguay22 mguay22 commented Jun 26, 2019

@Eyesonly88 this solved the issue for me - thank you.

@camposbrunocampos
Copy link

@camposbrunocampos camposbrunocampos commented Jun 28, 2019

For you that is facing this issue specifically when setting your targetSdkVersion to API 28.

All you need to do is adding for your network_security_config file the following lines below:

    <base-config cleartextTrafficPermitted="true">
        <trust-anchors>
            <certificates src="system" />
        </trust-anchors>
    </base-config>

PS: In my case I have multiple network_security_config files for each flavor, since this is a debugging problem, adding these lines to the network_security_config file in debug flavor was enough.

=========================================================================

More info about the bug below:

If we go to https://developer.android.com/training/articles/security-config.html, we will see that these lines of code above are the default security configuration for android API 24 to API 27. (Android 7.0 to android 8.1).
This means that for Android 9, API 28, which is the one I was facing the error, the default configuration changed.
More specifically, default configuration for Android API 28 is :

    <base-config cleartextTrafficPermitted="false">
        <trust-anchors>
            <certificates src="system" />
        </trust-anchors>
    </base-config>
    

.
This is why using default configuration for old APIs worked for me.

Other thing that also worked for me in the beginning was to set targetSdkVersion to api 27. If you don't want to run on API 28, this might work for you too.

@gomdolkim
Copy link

@gomdolkim gomdolkim commented Jul 1, 2019

If you are running an android 9 emulator, you have to add, as stated by @delj , android:usesCleartextTraffic="true" in you Application tag in manifest.xml

Recommended

you saved my time. thanks a lot.

@mehbur
Copy link

@mehbur mehbur commented Jul 9, 2019

Guys ı open the wifi on emulator and it worked for me

@mohammedSlimani
Copy link

@mohammedSlimani mohammedSlimani commented Jul 23, 2019

what solved my problem was to use sudo yarn start instead of yarn start
I have a script in my package.json with

{
...
"scripts":{
"start":"react-native start"
}
....
}
@Sergioamjr
Copy link

@Sergioamjr Sergioamjr commented Aug 1, 2019

If you are using an emulator like xCode or Android Studio, you don't need set the dev server address in the settings with your IP. It will set automatically. Just remove it and rerun the app. It works for me.

@vmarimuthu
Copy link

@vmarimuthu vmarimuthu commented Aug 26, 2019

If you are running an android 9 emulator, you have to add, as stated by @delj , android:usesCleartextTraffic="true" in you Application tag in manifest.xml

Recommended

You saved my day

@jmnpedrosa
Copy link

@jmnpedrosa jmnpedrosa commented Sep 13, 2019

What I have done: (working on emulator Android Pie 9)

  1. Set IP and port on Debug server host & port for device by clicking Ctrl+M and Dev Setting in emulator. Make sure you set the host and port using Bundler's host and port (default: localhost:8081) and make sure your port is not blocked by other process
  2. Run adb reverse tcp:8081 tcp:8081 on home project directory
  3. Add android:usesCleartextTraffic="true" to <application> node in AndroidManifest.xml
  4. After accomplishing three points above, restart your project

I can confirm @rafidamr's solution is the right one. But I was in a corporate environment where I could not use port 8081, so I just switched Metro Bundler to a different port like so:

  • adb reverse tcp:8088 tcp:8088
  • react-native run-android --port 8088

And of couse, pointed to the new port in the emulator's Dev Settings.

@coderjonny
Copy link

@coderjonny coderjonny commented Sep 20, 2019

Thank you @camposbrunocampos 👏🏼 , I was using target: Android 9.0 with API level 28.
Updated network_security_config.xml and now emulator works fine.

@inspiraluna
Copy link

@inspiraluna inspiraluna commented Sep 24, 2019

I had problems both starting it on ios and android (tried on android studio, without android studio, with xcode and without xcode). I tried all the above stated.

So what DIDN'T helped was:

  • network_security_config.xml
  • adb reverse
  • changing the IP address to the IP of the server.
  • etc..

The only thing I had to do is doing a: sudo npm start from react native project directory. Seems like a permission problem. (using mac)

@morenoh149
Copy link
Contributor

@morenoh149 morenoh149 commented Oct 31, 2019

@inspiraluna that's basic npm installation issue, you should chown your system dir.

@uc-asa
Copy link

@uc-asa uc-asa commented Nov 4, 2019

add android:usesCleartextTraffic="true" to your application, in the manifest

<application
....
android:usesCleartextTraffic="true"
android:theme="@style/AppTheme">

It works for me.

@wincod75
Copy link

@wincod75 wincod75 commented Nov 5, 2019

I added android:usesCleartextTraffic="true" to AndroidManifest.xml at the <application ... tag and rebuilt the app. After that, it started to load from dev server normally.

This fixed the issue for me as well, but i will preface this by saying I tried this fix initially and it did not work. I had to start fresh with new emulators, kill and restart abd several times, reinstall android studio, update gradle, etc.

@raman-sidhu
Copy link

@raman-sidhu raman-sidhu commented Nov 12, 2019

@Eyesonly88 Thank you..It Works for me
I have added
android:usesCleartextTraffic="true" to AndroidManifest.xml

@anastely
Copy link

@anastely anastely commented Nov 28, 2019

I Target Android 4.0 sadly and when I run adb reverse tcp:8081 tcp:8081 i got error

warn Failed to connect to development server using "adb reverse": Command failed: adb -s 192.168.66.103:5555 reverse tcp:8081 tcp:8081

@AleksandarSavic95
Copy link

@AleksandarSavic95 AleksandarSavic95 commented Nov 28, 2019

Here is how I fixed the issue of not having developer tools on the emulator:
This SO answer suggests to check your MainApplication.java file and remove BuildConfig.Debug from the getUseDeveloperSupport method, so it looks like this:

        @Override
        public boolean getUseDeveloperSupport() {
            // Return true to load JS from the packager.
            // If BuildConfig.DEBUG is false, assets will be loaded from assets folder.
            return true; // BuildConfig.DEBUG;
        }
@facebook facebook locked as resolved and limited conversation to collaborators Dec 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet