ionic-cli: Devapp not connecting since Ionic CLI 4.10.0
Bug Report
Ionic version: 4.10.0 and 4.10.1
Current behavior: Devapp is unable to connect
Expected behavior: should connect
Steps to reproduce: upgrade ionic to 4.10.0 or 4.10.1 downgrading to 4.0.9 will resolve the issue, and Devapp will connect just fine
Ionic info:
Devapp not connecting
Ionic:
ionic (Ionic CLI) : 4.10.1 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.0
@angular-devkit/build-angular : 0.12.3
@angular-devkit/schematics : 7.2.3
@angular/cli : 7.2.3
@ionic/angular-toolkit : 1.3.0
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.2, (and 6 other plugins)
System:
ios-deploy : 2.0.0
ios-sim : 7.0.0
NodeJS : v8.11.4 (/usr/local/bin/node)
npm : 6.7.0
OS : macOS High Sierra
Xcode : Xcode 10.1 Build version 10B61
Devapp not connecting
Ionic:
ionic (Ionic CLI) : 4.10.0
Ionic Framework : @ionic/angular 4.0.0
@angular-devkit/build-angular : 0.12.3
@angular-devkit/schematics : 7.2.3
@angular/cli : 7.2.3
@ionic/angular-toolkit : 1.3.0
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.2, (and 4 other plugins)
System:
ios-deploy : 2.0.0
ios-sim : 7.0.0
NodeJS : v8.11.4 (/usr/local/bin/node)
npm : 6.7.0
OS : macOS High Sierra
Xcode : Xcode 10.1 Build version 10B61
Devapp working properly and connecting
Ionic:
ionic (Ionic CLI) : 4.9.0
Ionic Framework : @ionic/angular 4.0.0
@angular-devkit/build-angular : 0.12.3
@angular-devkit/schematics : 7.2.3
@angular/cli : 7.2.3
@ionic/angular-toolkit : 1.3.0
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.2, (and 4 other plugins)
System:
ios-deploy : 2.0.0
ios-sim : 7.0.0
NodeJS : v8.11.4 (/usr/local/bin/node)
npm : 6.7.0
OS : macOS High Sierra
Xcode : Xcode 10.1 Build version 10B61
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 6
- Comments: 21 (6 by maintainers)
I had the same problem and I founded this solution:
Install globally ionic without Cordova: npm install -g ionic This installed in my case the version of ionic: 4.11.0
Create your project. ionic start yourProjectName sidemenu
Install the free Ionic Appflow SDK and conect your App? NO
Once the project is created you integrate Cordova: Go in the CLI to the directory of your project. Write in the CLI the following commands in this order:
a) ionic cordova platform rm android
*If you get error the first time, dont worry, try again the same command. Never fails in the second time to me.
b) ionic cordova platform rm android
c) ionic cordova platform add android
d) ionic serve --devapp
e) Open devApp in your movile and it will see your app without problems.
And this is all. I hope this can help
@jerrymani33 You must update
@ionic/angular-toolkit
: https://github.com/ionic-team/angular-toolkit/blob/master/CHANGELOG.md@szmolnar can you try serving with
ionic serve --devapp
? We just added support for DevApp in v4 projects, but--devapp
isfalse
by default.And for capacitor?
@szmolnar yeah I edited my post after realizing I hadn’t looked at your
ionic info
😄.For anyone else who ends up here 👋and
--devapp
isn’t working in a v4 project, you might need to update@ionic/angular-toolkit
to version 1.3.0 (I believe the error is something along the lines ofunknown option cordova-mock
).As far as console logs go, I believe it’s something that would have to be supported by the Angular CLI because that’s what is running the serve under the hood.
@tlancina Thanks, sharing this info! I can confirm that ionic serve --devapp is working on ionic (Ionic CLI): 4.10.1
(As for your earlier question before editing your post please check my ionic info. I’m using @ionic/angular-toolkit: 1.3.0)
Is there any added support for capturing console log messages?
Hi guys!! I updated @ionic/angular-toolkit to “^1.4.0”, But this did not work when I did “ionic serve -c”. Do you know a solution for this?
@dwieeb just informed me that we can support console logs for v4 using
angular-toolkit
to inject a script, and searching just now I found an open issue for it: https://github.com/ionic-team/ionic-cli/issues/3169.PR’s welcome! I also may take a stab at it if I get some free time next week.
@szmolnar going to close as the original issue is intended behavior, feel free to comment/re-open if you’re still having issues. Thanks!