-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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: Android Studio not launching when running "quasar build -m capacitor -t android --ide" #17420
Comments
Hi @ddenev! 👋 It looks like you provided an invalid or unsupported reproduction URL. Without a proper reproduction, your issue will have to get closed. Thank you for your collaboration. 👏 |
I have updated the OP - added a dummy URL since this cannot be reproduced on the web - it is a CLI issue that needs to be run locally on the machine. |
@ddenev a dummy URL won't do any help, the aim is to get a useful reproduction. You can create a GitHub repo in this case, it's one of the options listed. Even if it's a dead simple project, a repro can still help to understand whether there is a problem with the lock file, some basic configuration, certain package versions, etc. |
@yusufkandemir, thanks for replying but I think you haven't read the OP in full. If you pay closer attention to the problem, you will observe that it has nothing to do with the Quasar project itself but is a bug withing the core quasar package. If you still insist on having a URL, I will just create a fresh Quasar project and give you the link to it but again - the problem is NOT related to a project. Please, do read the investigation I've done above. I've tested it and it works with |
Here are the exact steps to reproduce:
The result is - IDE is not launched. |
@ddenev I've read your post but I think you haven't read my message and ignoring my open-source maintainer experience. I've seen a lot of cases where some people experience a problem with a freshly created project whereas we can't reproduce the problem when we create one. It sometimes turns out to be some local configuration, a really weird case, order of executing commands, choosing certain features or not. The code you suspect of being incorrect is 2 years old and it has been perfectly working since. quasar/app-vite/lib/helpers/open-ide.js Line 133 in d51ad03
The Android Studio launch request may be initiated very slowly due to having a slow machine, running programs such as antiviruses which could slow down launching programs, a problem in Windows, or even NodeJS. My first recommendation is to update Node to v20.16.0 and even try the latest v22. If you have pending Windows updates, do them. Try restarting the machine. If those don't work, please increase the timeout slowly until you find a value that works and share it with us. If it's something acceptable like 400-500, we should be able to update it. However, if it's more than that, I can safely say there is something wrong in your setup. |
I know that it's a 2 years old code, I've seen the git blame. Again, I would gently insist you read the OP in detail:
The fix is pretty simple - just replace the I think that increasing the timeout is not a solution - since the process is currently killed and cannot finish properly (see 2 above and the screenshots). Here is another proof. Please observe this code: quasar/app-vite/lib/cmd/build.js Lines 161 to 167 in d51ad03
The quasar/app-vite/lib/modes/capacitor/capacitor-builder.js Lines 49 to 52 in d51ad03
As you can see, quasar/app-vite/lib/cmd/build.js Lines 161 to 205 in d51ad03
and there is a lot going on in that block. When you replace |
@yusufkandemir, try to configure an |
…t being launched when running "quasar build -m capacitor -T android --ide" #17420
… not being launched when running "quasar build -m capacitor -T android --ide" #17420
Just seeing all these messages now. Took care of it for the q/app-vite & q/app-webpack betas. |
No, because the dev process is an ongoing one, while the build process waits just enough so that the OS starts launching the IDE and then the build process quits. If anything between the Node-OS communication is making it slower, then the situation ends up being the build process exiting before the IDE has been launched successfully. However, the other points you've raised in your message are valid. The fix is not as simple as changing |
thank you both @rstoenescu and @yusufkandemir |
The |
yes, that's a fair point, didn't think about that. I also like the build summary (see the 2nd screenshot in the OP above) that was not shown when exiting with |
…n Windows host -> Android Studio not being launched when running "quasar build -m capacitor -T android --ide" #17420
…dova on Windows host -> Android Studio not being launched when running "quasar build -m capacitor -T android --ide" #17420
Fix will be available in:
@ddenev Would you be so kind to open up a new ticket for the build summary pls? |
sure! |
What happened?
When running the
quasar build -m capacitor -t android --ide
command, the Android Studio IDE is not launched.On the other hand, when running a dev build -
quasar dev -m capacitor -t android
- the IDE is launched without a problem.After digging into it, the problem seems to come from the following statement in
app-vite/lib/modes/capacitor/capacitor-builder.js
:If I replace
process.exit(0)
withreturn
, everything works ok - Android Studio is launched.This is the console output when running with
process.exit(0)
:This is the console output when running with
return
:What did you expect to happen?
Expected the IDE to be launched
Reproduction URL
https://codepen.io/ddenev/pen/PorjvGL
How to reproduce?
quasar build -m capacitor -t android --ide
Note: No reproduction URL provided as this cannot be reproduced on the web, it's a CLI issue.
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite), Cordova Mode, Capacitor Mode
Platforms/Browsers
No response
Quasar info output
Relevant log output
No response
Additional context
I haven't tested, but I suppose the same problem exists with Cordova builder as well.
The text was updated successfully, but these errors were encountered: