-
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
Ionic Server doesn’t shutdown gracefully using Cordova #3036
Comments
I also have this issue. When I use
After terminating with Ctrl+C
Ionic info
|
@bubbsi @marxide The Ionic CLI doesn't officially support the Cordova browser platform. See my reasoning here: #2312 (comment) I'm most interested in if this is happening for |
@dwieeb Fair enough. I can confirm this doesn't happen to me when using Sidenote: I'm only using the browser platform because I want to test my app as I write, but when I use |
Same Issue, it is really hard to code, if you can‘t test it while writing. The most other ways and workarounds need to much time. |
@marxide @bubbsi I think using the Cordova browser platform as a testing platform is a good use case, as long as the dev understands it shouldn't be used for production. The decision has to be made early during app development, right? If the dev ever plans to target the desktop, the usage of Cordova plugins needs to be coded defensively with platform detection. Basically, doNativeThing() {
if (this.platform.is('cordova')) {
// use cordova plugin
} else {
// use web api
}
} But, if the dev plans to never target the desktop, the Cordova browser platform can be used as a testing framework. The code would just be: doNativeThing() {
// use cordova plugin
} This has always been an annoyance that comes hand-in-hand with having a single code base being able to target multiple platforms 😄 It's an annoyance we're trying to solve with Capacitor. Having understood your use case, I will investigate why there are leftover processes using |
@marxide @bubbsi Thinking this over a bit more, I may want to rework how the Cordova browser platform is used in the Ionic CLI. In an app with the Cordova integration enabled, instead of running To me, |
👉 #3043 |
Thanks @dwieeb, that is exactly what I'm looking for. I have no intention of deploying a browser target (yet) so I was only using the browser platform to get around the Cordova plugin issue. I would much prefer to use I look forward to trying it out when available. |
Closing in favor of #3043, please subscribe to it for updates. |
Description:
I have to build an ionic cordova app. So I prepared my macOS with all needed utilities. First I have to create the app on the browser platform. Therefore I start the process with “ionic cordova run browser”. After testing I just want to shutdown the server with crtl+c, but even a node process will be left. So every time I would have to kill the process using the command line tool “kill”. It isn’t really comfortable.
I found out if I run only the command “cordova run browser” without an ionic build the server is shutting down correctly. The same thing, if I run “ionic serve” without using cordova
My
ionic info
:The text was updated successfully, but these errors were encountered: