-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Detox Port #694
Comments
As an addendum, can I just build with Edit: tried this. It works, but it unfortunately opens two simulators and closes neither upon completion. |
@Rob117 if it helps in the interim, I use https://www.npmjs.com/package/patch-package to automatically patch files in node_modules - it has a postinstall hook that will auto patch on npm/yarn install - I use this on a few react native projects myself - and a lot of other people do as well. You could use this to change the ports in node modules and then create a patch and commit that patch file as part of your git repo - until you can actually change the port in detox. |
@Salakar Absolutely awesome, will try as a stopgap until we can hopefully get a port feature! |
@Rob117, I am not sure whether Detox indeed has port 8081 hard-coded. Let's see:
The only occurrence it prints is here, but this is just a test app for Detox E2E runs on CI:
Did I overlook something? Could you point, please? As far as I understand it now, Detox doesn't use 8081 port specifically. |
@noomorph , he refers to the packager port. All it requires is running the build command with I think running detox commands with this env var set will solve your problem.
|
I wonder if we can close this one? |
The proposed solution works for me; absolutely. Marking as closed, |
Description
Very simply, my company has some kind of admin process (most likely a virus scanner) running on port 8081. This is a problem, because in order to run detox I need to go into the project and change every internal reference to 8088 (just some other random port I can use).
When I run
react-native run-ios
I get the option to pass flag--port=8088
to it so I don't need to manually configure those files. Does Detox have such a flag? Manually changing each port works, but on update / project copy, it has to be redone, which is error prone.Steps to Reproduce
Block port 8081.
Try to run
detox build
Detox, Node, Device, Xcode and macOS Versions
Detox: 7.3.4
OS: macOS Sierra 10.12.6
Node: 9.5.0
Yarn: 1.3.2
npm: 5.6.0
Watchman: 4.9.0
react: ^16.3.0-alpha.1 => 16.3.1
react-native: 0.54.4 => 0.54.4
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.1 AI-173.4670197
The text was updated successfully, but these errors were encountered: