Skip to content
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

Android Emulator is not able to open application in dev mode (doesn't see Vite server) #17725

Open
antonic901 opened this issue Dec 27, 2024 · 3 comments

Comments

@antonic901
Copy link

What happened?

When I start application for mobile development using this command:

quasar dev -m capacitor -T android

Android Studio opens, but I get error following error:
Screenshot_20241227_115129

What did you expect to happen?

App should open inside Android Emulator.

Reproduction URL

https://codepen.io/rstoenescu/pen/xxEvBLR

How to reproduce?

  1. Create initial Quasar Application using Quasar CLI
  2. Add Capacitor mode to project
  3. type quasar dev -m capacitor -T android
  4. Open Android Emulator

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Capacitor Mode

Platforms/Browsers

Android

Quasar info output

No response

Relevant log output

No response

Additional context

No response

@github-actions github-actions bot added bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite mode/capacitor labels Dec 27, 2024
@fortxin
Copy link

fortxin commented Jan 2, 2025

I encountered the same issue and haven't found the root cause yet. My guess is that Quasar might not have successfully created the service in Capacitor mode. However, you can achieve the desired functionality indirectly using the following steps:

1.Start the app service with a specified port(same port as the second command)
quasar dev -p 9000 -m capacitor -T android
2.Start another service
In a new command line window, run the default development service (default port 9000):
quasar dev
This way, the app in Android Studio will be able to run and support hot reload.

@yusufkandemir yusufkandemir added bug/2-confirmed We have reproduce the problem and confirmed that this is a bug. and removed bug/1-repro-available A reproduction is available and needs to be confirmed. labels Jan 2, 2025
@rstoenescu
Copy link
Member

Cannot reproduce.
Can you guys share more info on your setup? What OS are you using (and version). Also, what Android Studio are you on etc etc.

@rstoenescu rstoenescu removed the bug/2-confirmed We have reproduce the problem and confirmed that this is a bug. label Jan 3, 2025
@mgurzixo
Copy link

mgurzixo commented Jan 5, 2025

Hello,
I got the same problem with a real android device. The dev server starts on spa but not with capacitor-android.
I was able to make it work again by downgrading to V0.15 launching quasar dev then re-upgrading to current version.
The commands are:
npm i -g [email protected]
quasar dev -m capacitor -T android
npm i -g quasar-cli

I have no explanation why it stopped working, then why it started working again :(

My config:

  • Android studio 2024.2.1
  • @quasar/app-vite 2.0.5 (@quasar/cli 2.4.1)
  • quasar-cli 0.17.26
  • Linux ubuntu 22.04.5 LTS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants