ionic-team / ionic-cli

The Ionic command-line interface
MIT License
2k stars 650 forks source link

ERR_CONNECTION_REFUSED #4072

Closed IManAsap closed 5 years ago

IManAsap commented 5 years ago

Version:

0.2.7

Description:

I run the ionic cordova run android -l --no-native-run command and the application starts on my device, but the device displays this:

Application Error net::ERR_CONNECTION_REFUSED (http://localhost:8080/) [ OK ]

Command Output:

Windows PowerShell Copyright (C) Microsoft Corporation. Tous droits réservés.

PS C:\Users\christophe\Documents\Mes projets\handicap-tv> ionic cordova run android -l --no-native-run --verbose ionic:lib Terminal info: { ci: false, shell: 'C:\WINDOWS\system32\cmd.exe', tty: true, windows: true } +0ms ionic:lib CLI global options: { _: [ 'cordova', 'run', 'android' ], help: null, h: null, verbose: true, quiet: null, interactive: true, color: true, confirm: null, json: null, l: true, 'native-run': false, project: null, '--': [] } +8ms ionic:lib:project Project type from config: @ionic/angular (angular) +0ms ionic:lib:project Project details: { configPath: 'C:\Users\christophe\Documents\Mes projets\handicap-tv\ionic.config.json', errors: [], context: 'app', type: 'angular' } +1ms ionic Context: { binPath: 'C:\Users\christophe\AppData\Roaming\nvm\v8.11.4\node_modules\ionic\bin\ionic', libPath: 'C:\Users\christophe\AppData\Roaming\nvm\v8.11.4\node_modules\ionic', execPath: 'C:\Users\christophe\Documents\Mes projets\handicap-tv', version: '5.2.1' } +0ms ionic:lib:integrations:cordova:config Loading Cordova Config (config.xml: 'C:\Users\christophe\Documents\Mes projets\handicap-tv\config.xml', package.json: 'C:\Users\christophe\Documents\Mes projets\handicap-tv\package.json') +0ms ionic:lib:integrations:cordova:config Loading Cordova Config (config.xml: 'C:\Users\christophe\Documents\Mes projets\handicap-tv\config.xml', package.json: 'C:\Users\christophe\Documents\Mes projets\handicap-tv\package.json') +115ms ionic:lib:telemetry Sending telemetry for command: 'ionic cordova run' [ 'android', ionic:lib:telemetry '--livereload', ionic:lib:telemetry '--verbose', ionic:lib:telemetry '--interactive', ionic:lib:telemetry '--color' ] +0ms ionic:lib:serve serve options: { '--': [], ionic:lib:serve address: 'localhost', ionic:lib:serve browser: undefined, ionic:lib:serve browserOption: undefined, ionic:lib:serve devapp: false, ionic:lib:serve engine: 'cordova', ionic:lib:serve externalAddressRequired: true, ionic:lib:serve lab: false, ionic:lib:serve labHost: 'localhost', ionic:lib:serve labPort: 8200, ionic:lib:serve livereload: true, ionic:lib:serve open: false, ionic:lib:serve platform: 'android', ionic:lib:serve port: 8100, ionic:lib:serve proxy: true, ionic:lib:serve project: undefined, ionic:lib:serve verbose: false, ionic:lib:serve consolelogs: undefined, ionic:lib:serve consolelogsPort: undefined, ionic:lib:serve ssl: undefined, ionic:lib:serve configuration: undefined, ionic:lib:serve sourcemaps: undefined } +0ms ionic:lib:hooks Looking for ionic:serve:before npm script. +0ms [WARN] An external host may be required to serve for this target device/platform.

   If you get connection issues on your device or emulator, try connecting the device to the same Wi-Fi network and
   selecting an accessible IP address for your computer on that network.

   You can use --address=0.0.0.0 to run the dev server on all network interfaces, in which case an external address
   will be selected.

ionic:utils-network checking for open port on 0.0.0.0:8100 +0ms ionic:utils-network checking for open port on fe80::6d0d:b4c0:1bec:9:8100 +23ms ionic:utils-network checking for open port on 192.168.106.102:8100 +33ms ionic:utils-network checking for open port on ::1:8100 +41ms ionic:utils-network checking for open port on 127.0.0.1:8100 +143ms ionic:utils-network checking for open port on 0.0.0.0:8101 +99ms ionic:utils-network checking for open port on fe80::6d0d:b4c0:1bec:9:8101 +110ms ionic:utils-network checking for open port on 192.168.106.102:8101 +61ms ionic:utils-network checking for open port on ::1:8101 +92ms ionic:utils-network checking for open port on 127.0.0.1:8101 +64ms ionic:lib:serve Looking for ionic:serve npm script. +727ms

ng.cmd run app:ionic-cordova-serve --host=localhost --port=8101 --platform=android ionic:lib:serve awaiting TCP connection to localhost:8101 +12s [ng] Wed, 10 Jul 2019 11:39:33 GMT express:application set "x-powered-by" to true [ng] Wed, 10 Jul 2019 11:39:33 GMT express:application set "etag" to 'weak' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:application set "etag fn" to [Function: generateETag] [ng] Wed, 10 Jul 2019 11:39:33 GMT express:application set "env" to 'development' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:application set "query parser" to 'extended' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:application set "query parser fn" to [Function: parseExtendedQueryString] [ng] Wed, 10 Jul 2019 11:39:33 GMT express:application set "subdomain offset" to 2 [ng] Wed, 10 Jul 2019 11:39:33 GMT express:application set "trust proxy" to false [ng] Wed, 10 Jul 2019 11:39:33 GMT express:application set "trust proxy fn" to [Function: trustNone] [ng] Wed, 10 Jul 2019 11:39:33 GMT express:application booting in development mode [ng] Wed, 10 Jul 2019 11:39:33 GMT express:application set "view" to [Function: View] [ng] Wed, 10 Jul 2019 11:39:33 GMT express:application set "views" to 'C:\Users\christophe\Documents\Mes projets\handicap-tv\views' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:application set "jsonp callback name" to 'callback' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router use '/' query [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router use '/' expressInit [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route new '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route acl '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route bind '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route checkout '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route connect '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route copy '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route delete '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route get '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route head '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route link '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route lock '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route m-search '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route merge '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route mkactivity '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route mkcalendar '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route mkcol '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route move '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route notify '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route options '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route patch '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route post '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route propfind '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route proppatch '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route purge '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route put '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route rebind '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route report '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route search '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route source '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route subscribe '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route trace '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route unbind '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route unlink '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route unlock '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:route unsubscribe '' [ng] Wed, 10 Jul 2019 11:39:33 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route new '/webpack_dev_server/live.bundle.js' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/webpack_dev_server/live.bundle.js' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route get '/webpack_dev_server/live.bundle.js' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route new '/webpack_dev_server/sockjs.bundle.js' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/webpack_dev_server/sockjs.bundle.js' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route get '/webpack_dev_server/sockjs.bundle.js' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route new '/webpack-dev-server.js' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/webpack-dev-server.js' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route get '/webpack-dev-server.js' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route new '/webpack-dev-server/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/webpack-dev-server/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route get '/webpack-dev-server/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route new '/webpack-dev-server' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/webpack-dev-server' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route get '/webpack-dev-server' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route new '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route acl '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route bind '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route checkout '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route connect '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route copy '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route delete '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route get '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route head '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route link '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route lock '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route m-search '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route merge '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route mkactivity '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route mkcalendar '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route mkcol '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route move '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route notify '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route options '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route patch '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route post '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route propfind '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route proppatch '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route purge '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route put '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route rebind '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route report '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route search '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route source '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route subscribe '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route trace '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route unbind '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route unlink '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route unlock '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route unsubscribe '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router use '/' middleware [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router use '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router use '/' middleware [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route new '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:route get '' [ng] Wed, 10 Jul 2019 11:39:38 GMT express:router:layer new '/' [INFO] Waiting for connectivity with ng...

[INFO] Development server running!

   Local: http://localhost:8101

   Use Ctrl+C to quit this process

ionic:lib:events No process.send, not emitting event serve:ready +0ms ionic:lib:serve serve details: { custom: false, ionic:lib:serve protocol: 'http', ionic:lib:serve localAddress: 'localhost', ionic:lib:serve externalAddress: 'localhost', ionic:lib:serve externalNetworkInterfaces: [], ionic:lib:serve port: 8101, ionic:lib:serve externallyAccessible: false } +9s [WARN] Your device or emulator may not be able to access localhost.

   Ensure you have proper port forwarding setup from your device to your computer.

cordova.cmd run android --verbose [cordova] [cordova] You have been opted out of telemetry. To change this, run: cordova telemetry on. [cordova] No scripts found for hook "before_run". [cordova] No scripts found for hook "before_prepare". [cordova] Checking config.xml and package.json for saved platforms that haven't been added to the project [cordova] Config.xml and package.json platforms are the same. No pkg.json modification. [cordova] Package.json and config.xml platforms are different. Updating config.xml with most current list of platforms. [cordova] PlatformApi successfully found for platform android [cordova] Checking for saved plugins that haven't been added to the project [cordova] Checking for any plugins added to the project that have not been installed in android platform [cordova] No differences found between plugins added to project and installed in android platform. Continuing... [cordova] Generating platform-specific config.xml from defaults for android at C:\Users\christophe\Documents\Mes projets\handicap-tv\platforms\android\res\xml\config.xml [cordova] Merging project's config.xml into platform-specific android config.xml [cordova] Merging and updating files from [www, platforms\android\platform_www] to platforms\android\assets\www [cordova] Wrote out android application name "HANDICAP TV" to C:\Users\christophe\Documents\Mes projets\handicap-tv\platforms\android\res\values\strings.xml [cordova] android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.0.0): 10000 [cordova] Wrote out Android package name "tv.handicaptv.mobile" to C:\Users\christophe\Documents\Mes projets\handicap-tv\platforms\android\src\tv\handicaptv\mobile\MainActivity.java [cordova] Updating icons at platforms\android\res [cordova] Updating splash screens at platforms\android\res [cordova] Updating resource files at platforms\android [cordova] Prepared android project successfully [cordova] No scripts found for hook "after_prepare". [cordova] ANDROID_HOME=C:\Android\Sdk [cordova] JAVA_HOME=C:\Program Files\java\jdk1.8.0_131 [cordova] Subproject Path: CordovaLib [cordova] Running command: cmd "/s /c ""C:\Users\christophe\Documents\Mes projets\handicap-tv\platforms\android\gradlew.bat" cdvBuildDebug -b "C:\Users\christophe\Documents\Mes projets\handicap-tv\platforms\android\build.gradle" -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -Pandroid.useDeprecatedNdk=true"" [cordova] [cordova] C:\Users\christophe\Documents\Mes projets\handicap-tv>if "Windows_NT" == "Windows_NT" setlocal [cordova] [cordova] C:\Users\christophe\Documents\Mes projets\handicap-tv>set DIRNAME=C:\Users\christophe\Documents\Mes projets\handicap-tv\platforms\android\ [cordova] [cordova] C:\Users\christophe\Documents\Mes projets\handicap-tv>if "C:\Users\christophe\Documents\Mes projets\handicap-tv\platforms\android\" == "" set DIRNAME=. [cordova] [cordova] C:\Users\christophe\Documents\Mes projets\handicap-tv>set APP_BASE_NAME=gradlew [cordova] [cordova] C:\Users\christophe\Documents\Mes projets\handicap-tv>set APP_HOME=C:\Users\christophe\Documents\Mes projets\handicap-tv\platforms\android\ [cordova] [cordova] C:\Users\christophe\Documents\Mes projets\handicap-tv>set DEFAULT_JVM_OPTS="-Xmx64m" [cordova] [cordova] C:\Users\christophe\Documents\Mes projets\handicap-tv>if defined JAVA_HOME goto findJavaFromJavaHome [cordova] [cordova] C:\Users\christophe\Documents\Mes projets\handicap-tv>set JAVA_HOME=C:\Program Files\java\jdk1.8.0_131 [cordova] [cordova] C:\Users\christophe\Documents\Mes projets\handicap-tv>set JAVA_EXE=C:\Program Files\java\jdk1.8.0_131/bin/java.exe [cordova] [cordova] C:\Users\christophe\Documents\Mes projets\handicap-tv>if exist "C:\Program Files\java\jdk1.8.0_131/bin/java.exe" goto init [cordova] [cordova] C:\Users\christophe\Documents\Mes projets\handicap-tv>if not "Windows_NT" == "Windows_NT" goto win9xME_args [cordova] [cordova] C:\Users\christophe\Documents\Mes projets\handicap-tv>set CMD_LINE_ARGS= [cordova] [cordova] C:\Users\christophe\Documents\Mes projets\handicap-tv>set _SKIP=2 [cordova] [cordova] C:\Users\christophe\Documents\Mes projets\handicap-tv>if "xcdvBuildDebug" == "x" goto execute [cordova] [cordova] C:\Users\christophe\Documents\Mes projets\handicap-tv>set CMD_LINE_ARGS=cdvBuildDebug -b "C:\Users\christophe\Documents\Mes projets\handicap-tv\platforms\android\build.gradle" -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -Pandroid.useDeprecatedNdk=true [cordova] [cordova] C:\Users\christophe\Documents\Mes projets\handicap-tv>set CLASSPATH=C:\Users\christophe\Documents\Mes projets\handicap-tv\platforms\android\gradle\wrapper\gradle-wrapper.jar [cordova] [cordova] C:\Users\christophe\Documents\Mes projets\handicap-tv>"C:\Program Files\java\jdk1.8.0_131/bin/java.exe" "-Xmx64m" "-Dorg.gradle.appname=gradlew" -classpath "C:\Users\christophe\Documents\Mes projets\handicap-tv\platforms\android\gradle\wrapper\gradle-wrapper.jar" org.gradle.wrapper.GradleWrapperMain cdvBuildDebug -b "C:\Users\christophe\Documents\Mes projets\handicap-tv\platforms\android\build.gradle" -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -Pandroid.useDeprecatedNdk=true [cordova] The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead. [cordova] at build_5dh5011ju9pxoi78juj0i6r95.run(C:\Users\christophe\Documents\Mes projets\handicap-tv\platforms\android\build.gradle:141) [cordova] Configuration 'compile' in project ':' is deprecated. Use 'implementation' instead. [cordova] publishNonDefault is deprecated and has no effect anymore. All variants are now published. [cordova] :preBuild UP-TO-DATE [cordova] :CordovaLib:preBuild UP-TO-DATE [cordova] :CordovaLib:preDebugBuild UP-TO-DATE [cordova] :CordovaLib:checkDebugManifest UP-TO-DATE [cordova] :CordovaLib:processDebugManifest UP-TO-DATE [cordova] :preDebugBuild UP-TO-DATE [cordova] :CordovaLib:compileDebugAidl UP-TO-DATE [cordova] :compileDebugAidl UP-TO-DATE [cordova] :CordovaLib:packageDebugRenderscript NO-SOURCE [cordova] :compileDebugRenderscript UP-TO-DATE [cordova] :checkDebugManifest UP-TO-DATE [cordova] :generateDebugBuildConfig UP-TO-DATE [cordova] :prepareLintJar UP-TO-DATE [cordova] :generateDebugResValues UP-TO-DATE [cordova] :generateDebugResources UP-TO-DATE [cordova] :CordovaLib:compileDebugRenderscript UP-TO-DATE [cordova] :CordovaLib:generateDebugResValues UP-TO-DATE [cordova] :CordovaLib:generateDebugResources UP-TO-DATE [cordova] :CordovaLib:packageDebugResources UP-TO-DATE [cordova] :mergeDebugResources [cordova] :createDebugCompatibleScreenManifests UP-TO-DATE [cordova] :processDebugManifest UP-TO-DATE [cordova] :splitsDiscoveryTaskDebug UP-TO-DATE [cordova] :CordovaLib:platformAttrExtractor UP-TO-DATE [cordova] :CordovaLib:processDebugResources UP-TO-DATE [cordova] :processDebugResources [cordova] :generateDebugSources [cordova] :CordovaLib:generateDebugBuildConfig UP-TO-DATE [cordova] :CordovaLib:prepareLintJar UP-TO-DATE [cordova] :CordovaLib:generateDebugSources UP-TO-DATE [cordova] :CordovaLib:javaPreCompileDebug UP-TO-DATE [cordova] :CordovaLib:compileDebugJavaWithJavac UP-TO-DATE [cordova] :CordovaLib:processDebugJavaRes NO-SOURCE [cordova] :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE [cordova] :javaPreCompileDebug UP-TO-DATE [cordova] :compileDebugJavaWithJavac UP-TO-DATE [cordova] :compileDebugNdk NO-SOURCE [cordova] :compileDebugSources UP-TO-DATE [cordova] :mergeDebugShaders UP-TO-DATE [cordova] :compileDebugShaders UP-TO-DATE [cordova] :generateDebugAssets UP-TO-DATE [cordova] :CordovaLib:mergeDebugShaders UP-TO-DATE [cordova] :CordovaLib:compileDebugShaders UP-TO-DATE [cordova] :CordovaLib:generateDebugAssets UP-TO-DATE [cordova] :CordovaLib:mergeDebugAssets UP-TO-DATE [cordova] :mergeDebugAssets UP-TO-DATE [cordova] :transformClassesWithDexBuilderForDebug UP-TO-DATE [cordova] :transformDexArchiveWithExternalLibsDexMergerForDebug UP-TO-DATE [cordova] :transformDexArchiveWithDexMergerForDebug UP-TO-DATE [cordova] :mergeDebugJniLibFolders UP-TO-DATE [cordova] :CordovaLib:compileDebugNdk NO-SOURCE [cordova] :CordovaLib:mergeDebugJniLibFolders UP-TO-DATE [cordova] :CordovaLib:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE [cordova] :CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE [cordova] :transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE [cordova] :processDebugJavaRes NO-SOURCE [cordova] :transformResourcesWithMergeJavaResForDebug UP-TO-DATE [cordova] :validateSigningDebug [cordova] :packageDebug [cordova] :assembleDebug [cordova] :cdvBuildDebug [cordova] [cordova] BUILD SUCCESSFUL in 4s [cordova] 44 actionable tasks: 4 executed, 40 up-to-date [cordova] [cordova] C:\Users\christophe\Documents\Mes projets\handicap-tv>if "0" == "0" goto mainEnd [cordova] [cordova] C:\Users\christophe\Documents\Mes projets\handicap-tv>if "Windows_NT" == "Windows_NT" endlocal [cordova] Command finished with error code 0: cmd /s /c ""C:\Users\christophe\Documents\Mes projets\handicap-tv\platforms\android\gradlew.bat" cdvBuildDebug -b "C:\Users\christophe\Documents\Mes projets\handicap-tv\platforms\android\build.gradle" -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -Pandroid.useDeprecatedNdk=true" [cordova] Built the following apk(s): [cordova] C:/Users/christophe/Documents/Mes projets/handicap-tv/platforms/android/build/outputs/apk/debug/android-debug.apk [cordova] No scripts found for hook "before_deploy". [cordova] ANDROID_HOME=C:\Android\Sdk [cordova] JAVA_HOME=C:\Program Files\java\jdk1.8.0_131 [cordova] Running command: C:\Android\Sdk\platform-tools\adb.exe devices [cordova] Command finished with error code 0: C:\Android\Sdk\platform-tools\adb.exe devices [cordova] No target specified, deploying to device 'SH43VWM01381'. [cordova] Running command: C:\Android\Sdk\platform-tools\adb.exe devices [cordova] Command finished with error code 0: C:\Android\Sdk\platform-tools\adb.exe devices [cordova] Running command: C:\Android\Sdk\platform-tools\adb.exe devices [cordova] Command finished with error code 0: C:\Android\Sdk\platform-tools\adb.exe devices [cordova] Running adb shell command "cat /proc/cpuinfo" on target SH43VWM01381... [cordova] Running command: C:\Android\Sdk\platform-tools\adb.exe -s SH43VWM01381 shell cat /proc/cpuinfo [cordova] Command finished with error code 0: C:\Android\Sdk\platform-tools\adb.exe -s,SH43VWM01381,shell,cat,/proc/cpuinfo [cordova] Skipping build... [cordova] Built the following apk(s): [cordova] C:/Users/christophe/Documents/Mes projets/handicap-tv/platforms/android/build/outputs/apk/debug/android-debug.apk [cordova] Using apk: C:/Users/christophe/Documents/Mes projets/handicap-tv/platforms/android/build/outputs/apk/debug/android-debug.apk [cordova] Package name: tv.handicaptv.mobile [cordova] Installing apk C:/Users/christophe/Documents/Mes projets/handicap-tv/platforms/android/build/outputs/apk/debug/android-debug.apk on target SH43VWM01381... [cordova] Running command: C:\Android\Sdk\platform-tools\adb.exe -s SH43VWM01381 install -r "C:/Users/christophe/Documents/Mes projets/handicap-tv/platforms/android/build/outputs/apk/debug/android-debug.apk" [ng] Date: 2019-07-10T11:39:58.801Z [ng] Hash: b29031fc16d6a23ebce6 [ng] Time: 24741ms [ng] chunk {common} common.js, common.js.map (common) 17.4 kB [rendered] [ng] chunk {cordova} cordova.js, cordova.js.map (cordova) 71.5 kB [entry] [rendered] [ng] chunk {es2015-polyfills} es2015-polyfills.js, es2015-polyfills.js.map (es2015-polyfills) 285 kB [initial] [rendered] [ng] chunk {handirect-handirect-module} handirect-handirect-module.js, handirect-handirect-module.js.map (handirect-handirect-module) 9.43 kB [rendered] [ng] chunk {informations-legales-informations-legales-module} informations-legales-informations-legales-module.js, informations-legales-informations-legales-module.js.map (informations-legales-informations-legales-module) 6.7 kB [rendered] [ng] chunk {main} main.js, main.js.map (main) 34.4 kB [initial] [rendered] [ng] chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 237 kB [initial] [rendered] [ng] chunk {rubrique-rubrique-module} rubrique-rubrique-module.js, rubrique-rubrique-module.js.map (rubrique-rubrique-module) 8.24 kB [rendered] [ng] chunk {runtime} runtime.js, runtime.js.map (runtime) 9.05 kB [entry] [rendered] [ng] chunk {styles} styles.js, styles.js.map (styles) 69.5 kB [initial] [rendered] [ng] chunk {un-jour-une-ville-un-jour-une-ville-module} un-jour-une-ville-un-jour-une-ville-module.js, un-jour-une-ville-un-jour-une-ville-module.js.map (un-jour-une-ville-un-jour-une-ville-module) 8.89 kB [rendered] [ng] chunk {vendor} vendor.js, vendor.js.map (vendor) 4.54 MB [initial] [rendered] [INFO] ... and 96 additional chunks [ng] i 「wdm」: Compiled successfully. [cordova] Command finished with error code 0: C:\Android\Sdk\platform-tools\adb.exe -s,SH43VWM01381,install,-r,C:/Users/christophe/Documents/Mes projets/handicap-tv/platforms/android/build/outputs/apk/debug/android-debug.apk [cordova] Running adb shell command "input keyevent 82" on target SH43VWM01381... [cordova] Running command: C:\Android\Sdk\platform-tools\adb.exe -s SH43VWM01381 shell input keyevent 82 [cordova] Command finished with error code 0: C:\Android\Sdk\platform-tools\adb.exe -s,SH43VWM01381,shell,input,keyevent,82 [cordova] Starting application "tv.handicaptv.mobile/.MainActivity" on target SH43VWM01381... [cordova] Running adb shell command "am start -W -a android.intent.action.MAIN -ntv.handicaptv.mobile/.MainActivity" on target SH43VWM01381... [cordova] Running command: C:\Android\Sdk\platform-tools\adb.exe -s SH43VWM01381 shell am start -W -a android.intent.action.MAIN -ntv.handicaptv.mobile/.MainActivity [cordova] Command finished with error code 0: C:\Android\Sdk\platform-tools\adb.exe -s,SH43VWM01381,shell,am,start,-W,-a,android.intent.action.MAIN,-ntv.handicaptv.mobile/.MainActivity [cordova] LAUNCH SUCCESS [cordova] No scripts found for hook "after_run".

SDK Info:

SDK Location: C:\Android\Sdk AVD Home: C:\Users\christophe.android\avd

API Level: 26 Packages: Android SDK Platform 26 platforms;android-26 2 (!) Missing Packages: Google Play Intel x86 Atom System Image system-images;android-26;google_apis_playstore;x86 /.+/

API Level: 23 Packages: Android SDK Platform 23 platforms;android-23 3 Sources for Android 23 sources;android-23 1

Tools:

Android Emulator emulator 29.0.11 Android SDK Build-Tools 26 build-tools;26.0.0 26.0.0 Android SDK Build-Tools 29 build-tools;29.0.0 29.0.0 Android SDK Platform-Tools platform-tools 29.0.1 Android SDK Tools tools 26.1.1 SDK Patch Applier v4 patcher;v4 1

imhoffd commented 5 years ago

If you choose to use --no-native-run with livereload (-l) and you plan to target a device, then the device and the computer need to communicate with each other somehow. Some people choose to use adb reverse (see adb docs). Some people use an external address and connect over WiFi (in which case you can use the --address=0.0.0.0 flag). The CLI warns about this potential issue.

Is there a reason you're not using native-run? The tool sets up port forwarding automatically so this wouldn't be an issue.

fpassa commented 5 years ago

It's so funny that this issue comes because native-run doesn't work as expected and therefore most people in order to get android emulation/device execution has to add such -no native-run flag on command line. So, it would be nice to have native-run running as it should be in order to avoid ripple effect everywhere.

imhoffd commented 5 years ago

@fpassa Could you expand on what you think the expected behavior should be?

This issue stems from the fact that livereload is hard. It's hard to get working and hard to conceptualize. There's also a lot of moving parts, because we're actively trying to make it better.

I added this docs issue as a backlog item to expand upon the common gotchas when it comes to using livereload on devices.

IManAsap commented 5 years ago

I reset my setup

leo7489 commented 3 years ago

@dwieeb and @IManAsap When I run _#ionic cordova emulate android -l, or run it on my phone, I get same error message:

Application Error net::ERR_CONNECTION_REFUSED (http://localhost:8101/) [ OK ]

Could you explain how did you do it? What tool do you use? What setup file did you change, where is the file? I can’t find it. I am using Visual Studio Code and Android Studio.

Thank you for your help.

bilousov94 commented 2 years ago

I got the same issue https://github.com/ionic-team/ionic-cli/issues/4072#issuecomment-745011762

GuidoGagliardini commented 1 year ago

same issue here Ionic:

  Ionic CLI                     : 6.20.9 (/home/user/.nvm/versions/node/v14.19.1/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.9.4
   @angular-devkit/build-angular : 0.1000.8
   @angular-devkit/schematics    : 10.0.8
   @angular/cli                  : 10.0.8
   @ionic/angular-toolkit        : 2.3.3

Cordova:

   Cordova CLI       : 11.0.0
   Cordova Platforms : android 11.0.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 14 other plugins)

Utility:

   cordova-res : 0.15.4
   native-run  : 1.7.2

System:

   Android SDK Tools : 26.1.1 (/home/user/Android/Sdk)
   NodeJS            : v14.19.1 (/home/user/.nvm/versions/node/v14.19.1/bin/node)
   npm               : 6.14.16
   OS                : Linux 5.15

cordova-plugin-ionic-webview 5.0.0