Skip to content

Debug on device documentation possibly incorrect. #15293

Closed

Description

@p-m-j

Is this a bug report?

Maybe, either it's a bug or the docs are incorrect.

Have you read the Bugs section of the How to Contribute guide?

Yes

Environment

  1. react-native -v:
react-native-cli: 2.0.1
react-native: 0.46.4
  1. node -v:
v8.2.1
  1. npm -v:
5.3.0
  1. yarn --version
0.27.5
  • Target Platform: IOS
  • Development Operating System: MacOS
  • Build tools: Xcode

Steps to Reproduce

Run

react-native init
# or 
create-react-native-application 
npm run eject

Expected Behavior

Based on the sentence

You only have to be on the same Wi-Fi network as your computer.

From

https://facebook.github.io/react-native/docs/running-on-device.html

I assumed the device would attempt to connect to the packager.

Actual Behavior

It did not unless I hardcoded my laptops IP as jsCodeLocation in appDelegate.

I attempted clean builds, new projects, reset node cache, read several stack overflow posts and github issues.

It is still not clear to me whether this should work without changng jsCodeLocation or whether that is required, surely the docs should mention this if it is required?

Activity

  1. hramos commented on Jul 31, 2017

    @hramos
    Contributor

    It should work without specifying an IP address, this hasn't changed. The docs mention the following:

    If you have any issues, ensure that your Mac and device are on the same network and can reach each other. Many open wireless networks with captive portals are configured to prevent devices from reaching other devices on the network. You may use your device's Personal Hotspot feature in this case.

    Does this apply to your network?

    Also worth noting, they also mention that this guide only applies to the react-native init way of creating projects (your issue mentions CRNA).

  2. formatlos commented on Jul 31, 2017

    @formatlos
    Contributor

    I've filed a PR for the docs with a troubleshooting section a while ago. If you follow the steps you'll most likely find the problem ... #14885

  3. p-m-j commented on Jul 31, 2017

    @p-m-j
    Author
  4. p-m-j commented on Jul 31, 2017

    @p-m-j
    Author

    Thanks @formatios will try this shortly and report back.

  5. hramos commented on Jul 31, 2017

    @hramos
    Contributor

    Let me see why that PR has not yet landed...

  6. p-m-j commented on Aug 2, 2017

    @p-m-j
    Author

    Sorry for late response, indeed the new toubleshooting helped.

    In case it helps anyone else I am running DNSMasq on my DDWRT router, adding the following to my DNSMasq options resolved the problem.

    rebind-domain-ok=xip.io 
    
  7. locked as resolved and limited conversation to collaborators on Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions