-
Notifications
You must be signed in to change notification settings - Fork 655
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
Bug: serving more than one app at a time is broken #1678
Comments
@Chuckv01 The quick fix to this is provide a port parameter to the second app. |
From @Chuckv01 on November 15, 2016 0:0 @jthoms1 Appreciate the response. However, there are two issues with that approach:
|
This is not actually a regression in the ionic-app-scripts codebase. App-scripts has taken some responsibility from the ionic-cli. This fix should most likely be done within the CLI. Previously the CLI was would programmatically find open ports and attach to those. We will probably keep this functionality in the CLI but then pass the selected port to app-scripts. This will problem you are seeing. I am going to move this issue to that codebase so that I can track it with the actual changes. |
It appears that the Notification web socket port is set to use port 53703. This is never passed from the CLI. So we need to either update the CLI to start passing this port or app-scripts should identify a different port if this one is used. |
In ionic-app-script's serve.ts, I've found that these three lines are defining the ports used const DEV_LOGGER_DEFAULT_PORT = 53703;
const LIVE_RELOAD_DEFAULT_PORT = 35729;
const DEV_SERVER_DEFAULT_PORT = 8100; To get this issue fixed and serve the second app, you have re-define the ports' variables, and you can do this by running the following command:
As @jthoms1 have mentioned, it would be helpful if app-scripts identified different ports automatically if any of the ports was already used. |
run this command : then kill the process and start serve again. good luck! |
@KarimMesallam How to make this work with a specific platform (ios or android)? Your solution works only with ionic serve |
While the workaround suggested by @KarimMesallam works when using If you're developing a feature that requires a device and want to test your code on both Android and iOS (or an extra iPad, Android tablet, etc) at the same time, you can't. Push notifications are pretty tricky for example; this just makes it more painful.
|
@gianpaj I think the problem you're facing has to do with the spaces between the flags and the port values. Try this instead: $ ionic run android --consolelogs --debug --serverlogs --device --address=192.168.1.110 --
livereload --dev-logger-port=53713 --port=8110 --livereload-port=35739 |
Interesting @mohammadshamma . That worked 😂 These are my different versions now, just in case that was the culprit
|
3.1.9: * fix(2889): fix build error with --prod * fix(serve): start listening when watch is ready * fix(live-server): update android platform path (ionic-team#1407) * docs(changelog): 3.1.9 3.1.10: * Update node-sass dependency (ionic-team#1435) Updating node-sass dependency from 4.7.2 to 4.9.0 to make it works with node 10 on windows (build fail with ionic start) * chore(package): bump deps (ionic-team#1421) * chore(deps): no package lock * chore(changelog): 3.1.10 3.1.11: * fix(serve): fix EADDRINUSE issue with dev logger server fixes ionic-team/ionic-cli#3368 fixes ionic-team/ionic-cli#1678 fixes ionic-team/ionic-cli#1830 fixes ionic-team/ionic-cli#1721 fixes ionic-team/ionic-cli#1866 fixes ionic-team/ionic-cli#1808 fixes ionic-team/ionic-cli#3022 * docs(changelog): 3.1.11 changes 3.2.0: * feat(environments): configuration via process.env.VAR replacement (ionic-team#1471) * fix(sass): remove PostCSS warning (ionic-team#1364) This removes following warning: Remove warning: Without `from` option PostCSS could generate wrong source map or do not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning `from: the input file name (most runners set it automatically).` Source: https://github.com/postcss/postcss Fixes ionic-team#1359 #13763 ionic-team#1359 ionic-team/ionic-framework#13763 * fix(serve): use wss protocol for secure websocket when page is using https (ionic-team#1358) * docs(changelog): 3.2.0 3.2.1: * docs(readme): add note about existing declaration addresses ionic-team/ionic-cli#3541 * chore(deps): update webpack to 3.12.0 (ionic-team#1477) * chore(deps): bump node-sass to 4.9.3 to fix security warnings (ionic-team#1483) * chore(deps): bump node-sass to 4.10.0 to fix security warnings (ionic-team#1493) * docs(changelog): 3.2.1
From @Chuckv01 on November 13, 2016 4:26
Short description of the problem:
When attempting to run
ionic serve
on more than one app at a time, anError: listen EADDRINUSE
error occurs when attempting to serve the 2nd app.What behavior are you expecting?
Two or more Ionic apps could be run in the browser at the same time.
Steps to reproduce:
a.
ionic start --v2 test tabs
b.
ionic start --v2 test2 tabs
cd test && ionic serve
cd test2 && ionic serve
Which @ionic/app-scripts version are you using?
0.0.43
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
The text was updated successfully, but these errors were encountered: