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

Closed
antonic901 opened this issue Dec 27, 2024 · 26 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

EDIT 01/07 In fact, this does not work. The dev server does not start

@Noxdor
Copy link

Noxdor commented Jan 6, 2025

I've run into the same issue:

Screenshot From 2025-01-06 15-15-13

It appears to me as if the dev server doesn't start. The first output is the result of running curl on my machines local ip address after I started up quasar dev. The second and third are while quasar dev -m capacitor -T android is running.
image

EDIT: What I want to show with the last picture: The server is up and running after calling quasar dev, but appears to not be up and running after calling quasar dev -m capacitor -T android.

npx quasar --version gives me @quasar/app-vite 2.0.5. Please tell me any further information I can provide to help fixing this issue.

@dominicenglish
Copy link

dominicenglish commented Jan 7, 2025

I have the same problem after upgrading to @quasar/app-vite@2.

  • quasar dev command works fine
  • quasar dev -m capacitor -T android doesn't throw any errors or warnings, appears to set up the android project fine but the dev server can't be connected to (ERR_CONNECTION_REFUSED). This includes manually going to the generated dev server url so doesn't appear to be anything to do with android studio or the android project directly.

EDIT: This comment originally had information about reproducing the error with a brand new quasar app but after rebooting my machine the dev server for the new quasar app now works correctly. Unfortunately my app is still broken with the same error.

@e32wong
Copy link

e32wong commented Jan 10, 2025

This can be reproduced on both Windows and Linux on a brand new Quasar project.

  • yarn create quasar (pick Vite 6)
  • quasar mode add capacitor
  • yarn quasar dev -m capacitor -T android
  • press "run" on Android studio after Gradle loads and you will see it fail to connect to the dev server

Repeat the same command except pick Vite 2 on the first step, and the app will connect to the dev server successfully.

@nicobao
Copy link

nicobao commented Jan 10, 2025

@rstoenescu
Same error. This is a real issue. Everyone in our developer team experiences it. Cannot use capacitor in dev mode with vite 6.

Besides GitHub, on Quasar Discord, many people say experiencing the same bug.

image

Brand new template:

yarn create quasar
=> choose vite 6

Then:

quasar mode add capacitor

Then:

quasar dev -m capacitor -T android

I've pushed the resulting repro there, so you can see all the dependencies in package.json: https://github.com/nicobao/quasar-repro-capacitor-dev-issue

Android Studio Version:

± |main U:1 ?:1 ✗| → studio.sh --version
CompileCommand: exclude com/intellij/openapi/vfs/impl/FilePartNodeRoot.trieDescend bool exclude = true
Android Studio Iguana | 2023.2.1 Patch 2
Build #AI-232.10300.40.2321.11668458

OS: Debian GNU/Linux 12 (bookworm)

± |main U:1 ?:1 ✗| → uname -a
Linux nicobao 6.1.0-28-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1 (2024-11-22) x86_64 GNU/Linux

Android Studio logcat logs (Pixel 3a emulated app):

2025-01-10 17:06:05.870  8622-8622  Compatibil...geReporter org.capacitor.quasar.app             D  Compat change id reported: 171979766; UID 10190; state: ENABLED
2025-01-10 17:06:05.871  8622-8622  Compatibil...geReporter org.capacitor.quasar.app             D  Compat change id reported: 242716250; UID 10190; state: ENABLED
2025-01-10 17:06:06.030  8622-8622  ziparchive              org.capacitor.quasar.app             W  Unable to open '/data/app/~~JlHbBSMJhO4NzPWf7TWKEw==/org.capacitor.quasar.app-5FVrfW8PBVFWa2VUuOdXQQ==/base.dm': No such file or directory
2025-01-10 17:06:06.031  8622-8622  ziparchive              org.capacitor.quasar.app             W  Unable to open '/data/app/~~JlHbBSMJhO4NzPWf7TWKEw==/org.capacitor.quasar.app-5FVrfW8PBVFWa2VUuOdXQQ==/base.dm': No such file or directory
2025-01-10 17:06:06.624  8622-8622  nativeloader            org.capacitor.quasar.app             D  Configuring clns-6 for other apk /data/app/~~JlHbBSMJhO4NzPWf7TWKEw==/org.capacitor.quasar.app-5FVrfW8PBVFWa2VUuOdXQQ==/base.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/~~JlHbBSMJhO4NzPWf7TWKEw==/org.capacitor.quasar.app-5FVrfW8PBVFWa2VUuOdXQQ==/lib/x86_64, permitted_path=/data:/mnt/expand:/data/user/0/org.capacitor.quasar.app
2025-01-10 17:06:06.677  8622-8622  GraphicsEnvironment     org.capacitor.quasar.app             V  Currently set values for:
2025-01-10 17:06:06.687  8622-8622  GraphicsEnvironment     org.capacitor.quasar.app             V    angle_gl_driver_selection_pkgs=[]
2025-01-10 17:06:06.688  8622-8622  GraphicsEnvironment     org.capacitor.quasar.app             V    angle_gl_driver_selection_values=[]
2025-01-10 17:06:06.689  8622-8622  GraphicsEnvironment     org.capacitor.quasar.app             V  ANGLE GameManagerService for org.capacitor.quasar.app: false
2025-01-10 17:06:06.690  8622-8622  GraphicsEnvironment     org.capacitor.quasar.app             V  org.capacitor.quasar.app is not listed in per-application setting
2025-01-10 17:06:06.690  8622-8622  GraphicsEnvironment     org.capacitor.quasar.app             V  Neither updatable production driver nor prerelease driver is supported.
2025-01-10 17:06:06.877  8622-8675  libEGL                  org.capacitor.quasar.app             D  loaded /vendor/lib64/egl/libEGL_emulation.so
2025-01-10 17:06:06.889  8622-8622  AppCompatDelegate       org.capacitor.quasar.app             D  Checking for metadata for AppLocalesMetadataHolderService : Service not found
2025-01-10 17:06:06.922  8622-8675  libEGL                  org.capacitor.quasar.app             D  loaded /vendor/lib64/egl/libGLESv1_CM_emulation.so
2025-01-10 17:06:06.981  8622-8675  libEGL                  org.capacitor.quasar.app             D  loaded /vendor/lib64/egl/libGLESv2_emulation.so
2025-01-10 17:06:07.180  8622-8622  itor.quasar.app         org.capacitor.quasar.app             W  Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed)
2025-01-10 17:06:07.182  8622-8622  itor.quasar.app         org.capacitor.quasar.app             W  Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed)
2025-01-10 17:06:07.270  8622-8622  WebViewFactory          org.capacitor.quasar.app             I  Loading com.google.android.webview version 113.0.5672.136 (code 567263637)
2025-01-10 17:06:07.296  8622-8622  ziparchive              org.capacitor.quasar.app             W  Unable to open '/data/app/~~RzYeZFkf0CS8VZ4ThumMxw==/com.google.android.trichromelibrary_567263637-ZcZrGbL1vJXwe1UcQQy0GQ==/TrichromeLibrary.dm': No such file or directory
2025-01-10 17:06:07.296  8622-8622  ziparchive              org.capacitor.quasar.app             W  Unable to open '/data/app/~~RzYeZFkf0CS8VZ4ThumMxw==/com.google.android.trichromelibrary_567263637-ZcZrGbL1vJXwe1UcQQy0GQ==/TrichromeLibrary.dm': No such file or directory
2025-01-10 17:06:07.301  8622-8622  itor.quasar.app         org.capacitor.quasar.app             W  Entry not found
2025-01-10 17:06:07.379  8622-8622  nativeloader            org.capacitor.quasar.app             D  Configuring clns-7 for other apk /data/app/~~RzYeZFkf0CS8VZ4ThumMxw==/com.google.android.trichromelibrary_567263637-ZcZrGbL1vJXwe1UcQQy0GQ==/TrichromeLibrary.apk. target_sdk_version=34, uses_libraries=ALL, library_path=/data/app/~~KAWkhwi9OEryKxdmoBHyJw==/com.google.android.webview-bQJEdnc-11-0cCZFzuA8zA==/lib/x86_64:/data/app/~~KAWkhwi9OEryKxdmoBHyJw==/com.google.android.webview-bQJEdnc-11-0cCZFzuA8zA==/WebViewGoogle.apk!/lib/x86_64:/data/app/~~RzYeZFkf0CS8VZ4ThumMxw==/com.google.android.trichromelibrary_567263637-ZcZrGbL1vJXwe1UcQQy0GQ==/TrichromeLibrary.apk!/lib/x86_64, permitted_path=/data:/mnt/expand
2025-01-10 17:06:07.398  8622-8622  nativeloader            org.capacitor.quasar.app             D  Configuring clns-8 for other apk /data/app/~~KAWkhwi9OEryKxdmoBHyJw==/com.google.android.webview-bQJEdnc-11-0cCZFzuA8zA==/WebViewGoogle.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/~~KAWkhwi9OEryKxdmoBHyJw==/com.google.android.webview-bQJEdnc-11-0cCZFzuA8zA==/lib/x86_64:/data/app/~~KAWkhwi9OEryKxdmoBHyJw==/com.google.android.webview-bQJEdnc-11-0cCZFzuA8zA==/WebViewGoogle.apk!/lib/x86_64:/data/app/~~RzYeZFkf0CS8VZ4ThumMxw==/com.google.android.trichromelibrary_567263637-ZcZrGbL1vJXwe1UcQQy0GQ==/TrichromeLibrary.apk!/lib/x86_64, permitted_path=/data:/mnt/expand
2025-01-10 17:06:07.728  8622-8622  itor.quasar.app         org.capacitor.quasar.app             W  Accessing hidden method Landroid/os/Trace;->isTagEnabled(J)Z (unsupported, reflection, allowed)
2025-01-10 17:06:07.728  8622-8622  itor.quasar.app         org.capacitor.quasar.app             W  Accessing hidden method Landroid/os/Trace;->traceBegin(JLjava/lang/String;)V (unsupported, reflection, allowed)
2025-01-10 17:06:07.729  8622-8622  itor.quasar.app         org.capacitor.quasar.app             W  Accessing hidden method Landroid/os/Trace;->traceEnd(J)V (unsupported, reflection, allowed)
2025-01-10 17:06:07.729  8622-8622  itor.quasar.app         org.capacitor.quasar.app             W  Accessing hidden method Landroid/os/Trace;->asyncTraceBegin(JLjava/lang/String;I)V (unsupported, reflection, allowed)
2025-01-10 17:06:07.729  8622-8622  itor.quasar.app         org.capacitor.quasar.app             W  Accessing hidden method Landroid/os/Trace;->asyncTraceEnd(JLjava/lang/String;I)V (unsupported, reflection, allowed)
2025-01-10 17:06:07.738  8622-8622  cr_WVCFactoryProvider   org.capacitor.quasar.app             I  Loaded version=113.0.5672.136 minSdkVersion=29 isBundle=false multiprocess=true packageId=2
2025-01-10 17:06:07.777  8622-8680  cr_VariationsUtils      org.capacitor.quasar.app             I  Failed reading seed file "/data/user/0/org.capacitor.quasar.app/app_webview/variations_seed_new"
2025-01-10 17:06:07.784  8622-8680  cr_VariationsUtils      org.capacitor.quasar.app             I  Failed reading seed file "/data/user/0/org.capacitor.quasar.app/app_webview/variations_seed"
2025-01-10 17:06:07.804  8622-8622  cr_LibraryLoader        org.capacitor.quasar.app             I  Successfully loaded native library
2025-01-10 17:06:07.806  8622-8622  cr_CachingUmaRecorder   org.capacitor.quasar.app             I  Flushed 8 samples from 8 histograms.
2025-01-10 17:06:07.909  8622-8622  Compatibil...geReporter org.capacitor.quasar.app             D  Compat change id reported: 183155436; UID 10190; state: ENABLED
2025-01-10 17:06:08.040  8622-8702  chromium                org.capacitor.quasar.app             W  [WARNING:dns_config_service_android.cc(115)] Failed to read DnsConfig.
2025-01-10 17:06:08.095  8622-8622  Compatibil...geReporter org.capacitor.quasar.app             D  Compat change id reported: 214741472; UID 10190; state: ENABLED
2025-01-10 17:06:08.103  8622-8622  Compatibil...geReporter org.capacitor.quasar.app             D  Compat change id reported: 171228096; UID 10190; state: ENABLED
2025-01-10 17:06:08.169  8622-8622  AutofillManager         org.capacitor.quasar.app             D  Fill dialog is enabled:false, hints=[password, passwordAuto, creditCardNumber, creditCardSecurityCode, creditCardExpirationDate]
2025-01-10 17:06:08.204  8622-8622  Capacitor               org.capacitor.quasar.app             D  Starting BridgeActivity
2025-01-10 17:06:08.247  8622-8622  Capacitor               org.capacitor.quasar.app             D  Registering plugin instance: CapacitorCookies
2025-01-10 17:06:08.255  8622-8622  Capacitor               org.capacitor.quasar.app             D  Registering plugin instance: WebView
2025-01-10 17:06:08.259  8622-8622  Capacitor               org.capacitor.quasar.app             D  Registering plugin instance: CapacitorHttp
2025-01-10 17:06:08.264  8622-8622  Capacitor               org.capacitor.quasar.app             D  Registering plugin instance: App
2025-01-10 17:06:08.339  8622-8622  Capacitor               org.capacitor.quasar.app             W  Unable to read file at path public/plugins
2025-01-10 17:06:08.350  8622-8622  Capacitor               org.capacitor.quasar.app             D  Loading app at http://192.168.10.10:9500
2025-01-10 17:06:08.371  8622-8703  cr_media                org.capacitor.quasar.app             W  BLUETOOTH_CONNECT permission is missing.
2025-01-10 17:06:08.374  8622-8703  cr_media                org.capacitor.quasar.app             W  registerBluetoothIntentsIfNeeded: Requires BLUETOOTH permission
2025-01-10 17:06:08.440  8622-8622  Capacitor               org.capacitor.quasar.app             D  App started
2025-01-10 17:06:08.447  8622-8622  WindowOnBackDispatcher  org.capacitor.quasar.app             W  OnBackInvokedCallback is not enabled for the application.
                                                                                                    Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
2025-01-10 17:06:08.452  8622-8622  Capacitor/AppPlugin     org.capacitor.quasar.app             D  Firing change: true
2025-01-10 17:06:08.454  8622-8622  Capacitor/AppPlugin     org.capacitor.quasar.app             V  Notifying listeners for event appStateChange
2025-01-10 17:06:08.455  8622-8622  Capacitor/AppPlugin     org.capacitor.quasar.app             D  No listeners found for event appStateChange
2025-01-10 17:06:08.456  8622-8622  Capacitor               org.capacitor.quasar.app             D  App resumed
2025-01-10 17:06:08.465  8622-8622  Compatibil...geReporter org.capacitor.quasar.app             D  Compat change id reported: 237531167; UID 10190; state: DISABLED
2025-01-10 17:06:08.469  8622-8622  OpenGLRenderer          org.capacitor.quasar.app             W  Unknown dataspace 0
2025-01-10 17:06:08.663  8622-8622  Choreographer           org.capacitor.quasar.app             I  Skipped 115 frames!  The application may be doing too much work on its main thread.
2025-01-10 17:06:08.705  8622-8622  Compatibil...geReporter org.capacitor.quasar.app             D  Compat change id reported: 193247900; UID 10190; state: ENABLED
2025-01-10 17:06:08.956  8622-8673  OpenGLRenderer          org.capacitor.quasar.app             W  Failed to initialize 101010-2 format, error = EGL_SUCCESS
2025-01-10 17:06:09.238  8622-8673  Gralloc4                org.capacitor.quasar.app             I  mapper 4.x is not supported
2025-01-10 17:06:10.174  8622-8750  SurfaceSyncGroup        org.capacitor.quasar.app             E  Failed to receive transaction ready in 1000ms. Marking SurfaceSyncGroup(wmsSync-VRI[MainActivity]#0) as ready
2025-01-10 17:06:10.250  8622-8750  SurfaceSyncGroup        org.capacitor.quasar.app             E  Failed to receive transaction ready in 1000ms. Marking SurfaceSyncGroup(VRI[MainActivity]#1) as ready
2025-01-10 17:06:11.460  8622-8714  OpenGLRenderer          org.capacitor.quasar.app             I  Davey! duration=4694ms; Flags=1, FrameTimelineVsyncId=16005, IntendedVsync=1230414786004, Vsync=1232331452594, InputEventId=0, HandleInputStart=1232354767239, AnimationStart=1232354775374, PerformTraversalsStart=1232362292022, DrawStart=1233704919780, FrameDeadline=1230431452670, FrameInterval=1232347761412, FrameStartTime=16666666, SyncQueued=1233858270606, SyncStart=1233859038444, IssueDrawCommandsStart=1233947199440, SwapBuffers=1234658067710, FrameCompleted=1235110358703, DequeueBufferDuration=5160, QueueBufferDuration=331164, GpuCompleted=1234658067710, SwapBuffersCompleted=1235110358703, DisplayPresentTime=0, CommandSubmissionCompleted=1234658067710, 
2025-01-10 17:06:11.616  8622-8622  Choreographer           org.capacitor.quasar.app             I  Skipped 176 frames!  The application may be doing too much work on its main thread.
2025-01-10 17:06:11.710  8622-8714  OpenGLRenderer          org.capacitor.quasar.app             I  Davey! duration=2979ms; Flags=0, FrameTimelineVsyncId=16189, IntendedVsync=1232364785926, Vsync=1235298119142, InputEventId=0, HandleInputStart=1235310125861, AnimationStart=1235310129703, PerformTraversalsStart=1235310297801, DrawStart=1235311785127, FrameDeadline=1234681452500, FrameInterval=1235301609727, FrameStartTime=16666666, SyncQueued=1235315406639, SyncStart=1235315447697, IssueDrawCommandsStart=1235315584803, SwapBuffers=1235316562023, FrameCompleted=1235343965464, DequeueBufferDuration=4330, QueueBufferDuration=181441, GpuCompleted=1235316562023, SwapBuffersCompleted=1235343965464, DisplayPresentTime=0, CommandSubmissionCompleted=1235316562023, 
2025-01-10 17:06:12.081  8622-8760  itor.quasar.app         org.capacitor.quasar.app             W  Verification of void androidx.emoji2.text.FontRequestEmojiCompatConfig$FontRequestMetadataLoader.createMetadata() took 202.213ms (865.42 bytecodes/s) (6568B approximate peak alloc)
2025-01-10 17:06:14.556  8622-8673  EGL_emulation           org.capacitor.quasar.app             D  app_time_stats: avg=443.91ms min=72.33ms max=2338.17ms count=7
2025-01-10 17:06:14.651  8622-8770  ProfileInstaller        org.capacitor.quasar.app             D  Installing profile for org.capacitor.quasar.app
2025-01-10 17:06:57.736  8818-8818  ziparchive              org.capacitor.quasar.app             W  Unable to open '/data/app/~~JlHbBSMJhO4NzPWf7TWKEw==/org.capacitor.quasar.app-5FVrfW8PBVFWa2VUuOdXQQ==/base.dm': No such file or directory
2025-01-10 17:06:57.737  8818-8818  ziparchive              org.capacitor.quasar.app             W  Unable to open '/data/app/~~JlHbBSMJhO4NzPWf7TWKEw==/org.capacitor.quasar.app-5FVrfW8PBVFWa2VUuOdXQQ==/base.dm': No such file or directory
2025-01-10 17:06:58.009  8818-8818  nativeloader            org.capacitor.quasar.app             D  Configuring clns-6 for other apk /data/app/~~JlHbBSMJhO4NzPWf7TWKEw==/org.capacitor.quasar.app-5FVrfW8PBVFWa2VUuOdXQQ==/base.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/~~JlHbBSMJhO4NzPWf7TWKEw==/org.capacitor.quasar.app-5FVrfW8PBVFWa2VUuOdXQQ==/lib/x86_64, permitted_path=/data:/mnt/expand:/data/user/0/org.capacitor.quasar.app
2025-01-10 17:06:58.054  8818-8818  GraphicsEnvironment     org.capacitor.quasar.app             V  Currently set values for:
2025-01-10 17:06:58.054  8818-8818  GraphicsEnvironment     org.capacitor.quasar.app             V    angle_gl_driver_selection_pkgs=[]
2025-01-10 17:06:58.055  8818-8818  GraphicsEnvironment     org.capacitor.quasar.app             V    angle_gl_driver_selection_values=[]
2025-01-10 17:06:58.056  8818-8818  GraphicsEnvironment     org.capacitor.quasar.app             V  ANGLE GameManagerService for org.capacitor.quasar.app: false
2025-01-10 17:06:58.056  8818-8818  GraphicsEnvironment     org.capacitor.quasar.app             V  org.capacitor.quasar.app is not listed in per-application setting
2025-01-10 17:06:58.057  8818-8818  GraphicsEnvironment     org.capacitor.quasar.app             V  Neither updatable production driver nor prerelease driver is supported.
2025-01-10 17:06:58.237  8818-8818  AppCompatDelegate       org.capacitor.quasar.app             D  Checking for metadata for AppLocalesMetadataHolderService : Service not found
2025-01-10 17:06:58.276  8818-8836  libEGL                  org.capacitor.quasar.app             D  loaded /vendor/lib64/egl/libEGL_emulation.so
2025-01-10 17:06:58.300  8818-8836  libEGL                  org.capacitor.quasar.app             D  loaded /vendor/lib64/egl/libGLESv1_CM_emulation.so
2025-01-10 17:06:58.308  8818-8836  libEGL                  org.capacitor.quasar.app             D  loaded /vendor/lib64/egl/libGLESv2_emulation.so
2025-01-10 17:06:58.604  8818-8818  itor.quasar.app         org.capacitor.quasar.app             W  Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed)
2025-01-10 17:06:58.605  8818-8818  itor.quasar.app         org.capacitor.quasar.app             W  Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed)
2025-01-10 17:06:58.648  8818-8818  WebViewFactory          org.capacitor.quasar.app             I  Loading com.google.android.webview version 113.0.5672.136 (code 567263637)
2025-01-10 17:06:58.657  8818-8818  ziparchive              org.capacitor.quasar.app             W  Unable to open '/data/app/~~RzYeZFkf0CS8VZ4ThumMxw==/com.google.android.trichromelibrary_567263637-ZcZrGbL1vJXwe1UcQQy0GQ==/TrichromeLibrary.dm': No such file or directory
2025-01-10 17:06:58.657  8818-8818  ziparchive              org.capacitor.quasar.app             W  Unable to open '/data/app/~~RzYeZFkf0CS8VZ4ThumMxw==/com.google.android.trichromelibrary_567263637-ZcZrGbL1vJXwe1UcQQy0GQ==/TrichromeLibrary.dm': No such file or directory
2025-01-10 17:06:58.657  8818-8818  itor.quasar.app         org.capacitor.quasar.app             W  Entry not found
2025-01-10 17:06:58.661  8818-8818  nativeloader            org.capacitor.quasar.app             D  Configuring clns-7 for other apk /data/app/~~RzYeZFkf0CS8VZ4ThumMxw==/com.google.android.trichromelibrary_567263637-ZcZrGbL1vJXwe1UcQQy0GQ==/TrichromeLibrary.apk. target_sdk_version=34, uses_libraries=ALL, library_path=/data/app/~~KAWkhwi9OEryKxdmoBHyJw==/com.google.android.webview-bQJEdnc-11-0cCZFzuA8zA==/lib/x86_64:/data/app/~~KAWkhwi9OEryKxdmoBHyJw==/com.google.android.webview-bQJEdnc-11-0cCZFzuA8zA==/WebViewGoogle.apk!/lib/x86_64:/data/app/~~RzYeZFkf0CS8VZ4ThumMxw==/com.google.android.trichromelibrary_567263637-ZcZrGbL1vJXwe1UcQQy0GQ==/TrichromeLibrary.apk!/lib/x86_64, permitted_path=/data:/mnt/expand
2025-01-10 17:06:58.681  8818-8818  nativeloader            org.capacitor.quasar.app             D  Configuring clns-8 for other apk /data/app/~~KAWkhwi9OEryKxdmoBHyJw==/com.google.android.webview-bQJEdnc-11-0cCZFzuA8zA==/WebViewGoogle.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/~~KAWkhwi9OEryKxdmoBHyJw==/com.google.android.webview-bQJEdnc-11-0cCZFzuA8zA==/lib/x86_64:/data/app/~~KAWkhwi9OEryKxdmoBHyJw==/com.google.android.webview-bQJEdnc-11-0cCZFzuA8zA==/WebViewGoogle.apk!/lib/x86_64:/data/app/~~RzYeZFkf0CS8VZ4ThumMxw==/com.google.android.trichromelibrary_567263637-ZcZrGbL1vJXwe1UcQQy0GQ==/TrichromeLibrary.apk!/lib/x86_64, permitted_path=/data:/mnt/expand
2025-01-10 17:06:58.768  8818-8818  itor.quasar.app         org.capacitor.quasar.app             W  Accessing hidden method Landroid/os/Trace;->isTagEnabled(J)Z (unsupported, reflection, allowed)
2025-01-10 17:06:58.769  8818-8818  itor.quasar.app         org.capacitor.quasar.app             W  Accessing hidden method Landroid/os/Trace;->traceBegin(JLjava/lang/String;)V (unsupported, reflection, allowed)
2025-01-10 17:06:58.769  8818-8818  itor.quasar.app         org.capacitor.quasar.app             W  Accessing hidden method Landroid/os/Trace;->traceEnd(J)V (unsupported, reflection, allowed)
2025-01-10 17:06:58.769  8818-8818  itor.quasar.app         org.capacitor.quasar.app             W  Accessing hidden method Landroid/os/Trace;->asyncTraceBegin(JLjava/lang/String;I)V (unsupported, reflection, allowed)
2025-01-10 17:06:58.769  8818-8818  itor.quasar.app         org.capacitor.quasar.app             W  Accessing hidden method Landroid/os/Trace;->asyncTraceEnd(JLjava/lang/String;I)V (unsupported, reflection, allowed)
2025-01-10 17:06:58.806  8818-8818  cr_WVCFactoryProvider   org.capacitor.quasar.app             I  Loaded version=113.0.5672.136 minSdkVersion=29 isBundle=false multiprocess=true packageId=2
2025-01-10 17:06:58.908  8818-8841  cr_VariationsUtils      org.capacitor.quasar.app             I  Failed reading seed file "/data/user/0/org.capacitor.quasar.app/app_webview/variations_seed_new"
2025-01-10 17:06:58.943  8818-8841  cr_VariationsUtils      org.capacitor.quasar.app             I  Failed reading seed file "/data/user/0/org.capacitor.quasar.app/app_webview/variations_seed"
2025-01-10 17:06:58.947  8818-8818  cr_LibraryLoader        org.capacitor.quasar.app             I  Successfully loaded native library
2025-01-10 17:06:58.955  8818-8818  cr_CachingUmaRecorder   org.capacitor.quasar.app             I  Flushed 8 samples from 8 histograms.
2025-01-10 17:06:59.022  8818-8818  Compatibil...geReporter org.capacitor.quasar.app             D  Compat change id reported: 183155436; UID 10190; state: ENABLED
2025-01-10 17:06:59.197  8818-8846  chromium                org.capacitor.quasar.app             W  [WARNING:dns_config_service_android.cc(115)] Failed to read DnsConfig.
2025-01-10 17:06:59.252  8818-8867  chromium                org.capacitor.quasar.app             E  [ERROR:simple_version_upgrade.cc(152)] Failed to write a new fake index.
2025-01-10 17:06:59.254  8818-8862  chromium                org.capacitor.quasar.app             E  [ERROR:simple_file_enumerator.cc(21)] opendir /data/user/0/org.capacitor.quasar.app/cache/WebView/Default/HTTP Cache/Code Cache/js: No such file or directory (2)
2025-01-10 17:06:59.254  8818-8862  chromium                org.capacitor.quasar.app             E  [ERROR:simple_index_file.cc(614)] Could not reconstruct index from disk
2025-01-10 17:06:59.321  8818-8818  Compatibil...geReporter org.capacitor.quasar.app             D  Compat change id reported: 214741472; UID 10190; state: ENABLED
2025-01-10 17:06:59.338  8818-8818  Compatibil...geReporter org.capacitor.quasar.app             D  Compat change id reported: 171228096; UID 10190; state: ENABLED
2025-01-10 17:06:59.368  8818-8818  AutofillManager         org.capacitor.quasar.app             D  Fill dialog is enabled:false, hints=[password, passwordAuto, creditCardNumber, creditCardSecurityCode, creditCardExpirationDate]
2025-01-10 17:06:59.389  8818-8818  Capacitor               org.capacitor.quasar.app             D  Starting BridgeActivity
2025-01-10 17:06:59.416  8818-8818  Capacitor               org.capacitor.quasar.app             D  Registering plugin instance: CapacitorCookies
2025-01-10 17:06:59.423  8818-8818  Capacitor               org.capacitor.quasar.app             D  Registering plugin instance: WebView
2025-01-10 17:06:59.428  8818-8818  Capacitor               org.capacitor.quasar.app             D  Registering plugin instance: CapacitorHttp
2025-01-10 17:06:59.432  8818-8818  Capacitor               org.capacitor.quasar.app             D  Registering plugin instance: App
2025-01-10 17:06:59.493  8818-8818  Capacitor               org.capacitor.quasar.app             W  Unable to read file at path public/plugins
2025-01-10 17:06:59.501  8818-8818  Capacitor               org.capacitor.quasar.app             D  Loading app at http://192.168.10.10:9500
2025-01-10 17:06:59.520  8818-8864  cr_media                org.capacitor.quasar.app             W  BLUETOOTH_CONNECT permission is missing.
2025-01-10 17:06:59.522  8818-8864  cr_media                org.capacitor.quasar.app             W  registerBluetoothIntentsIfNeeded: Requires BLUETOOTH permission
2025-01-10 17:06:59.586  8818-8818  Capacitor               org.capacitor.quasar.app             D  App started
2025-01-10 17:06:59.592  8818-8818  WindowOnBackDispatcher  org.capacitor.quasar.app             W  OnBackInvokedCallback is not enabled for the application.
                                                                                                    Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
2025-01-10 17:06:59.595  8818-8818  Capacitor/AppPlugin     org.capacitor.quasar.app             D  Firing change: true
2025-01-10 17:06:59.596  8818-8818  Capacitor/AppPlugin     org.capacitor.quasar.app             V  Notifying listeners for event appStateChange
2025-01-10 17:06:59.597  8818-8818  Capacitor/AppPlugin     org.capacitor.quasar.app             D  No listeners found for event appStateChange
2025-01-10 17:06:59.598  8818-8818  Capacitor               org.capacitor.quasar.app             D  App resumed
2025-01-10 17:06:59.606  8818-8818  Compatibil...geReporter org.capacitor.quasar.app             D  Compat change id reported: 237531167; UID 10190; state: DISABLED
2025-01-10 17:06:59.618  8818-8818  OpenGLRenderer          org.capacitor.quasar.app             W  Unknown dataspace 0
2025-01-10 17:06:59.750  8818-8818  Choreographer           org.capacitor.quasar.app             I  Skipped 97 frames!  The application may be doing too much work on its main thread.
2025-01-10 17:06:59.757  8818-8818  Compatibil...geReporter org.capacitor.quasar.app             D  Compat change id reported: 193247900; UID 10190; state: ENABLED
2025-01-10 17:06:59.896  8818-8834  OpenGLRenderer          org.capacitor.quasar.app             W  Failed to initialize 101010-2 format, error = EGL_SUCCESS
2025-01-10 17:06:59.915  8818-8834  Gralloc4                org.capacitor.quasar.app             I  mapper 4.x is not supported
2025-01-10 17:07:00.408  8818-8830  OpenGLRenderer          org.capacitor.quasar.app             I  Davey! duration=2259ms; Flags=1, FrameTimelineVsyncId=17809, IntendedVsync=1281814795043, Vsync=1283431461451, InputEventId=0, HandleInputStart=1283436476555, AnimationStart=1283436483378, PerformTraversalsStart=1283438393005, DrawStart=1283661044875, FrameDeadline=1281831461709, FrameInterval=1283435430544, FrameStartTime=16666664, SyncQueued=1283696173725, SyncStart=1283697334728, IssueDrawCommandsStart=1283707901960, SwapBuffers=1283823844809, FrameCompleted=1284075833551, DequeueBufferDuration=3977, QueueBufferDuration=535935, GpuCompleted=1283823844809, SwapBuffersCompleted=1284075833551, DisplayPresentTime=16496969387776, CommandSubmissionCompleted=1283823844809, 
2025-01-10 17:07:00.630  8818-8818  Choreographer           org.capacitor.quasar.app             I  Skipped 52 frames!  The application may be doing too much work on its main thread.
2025-01-10 17:07:00.823  8818-8829  OpenGLRenderer          org.capacitor.quasar.app             I  Davey! duration=933ms; Flags=0, FrameTimelineVsyncId=18071, IntendedVsync=1283448122766, Vsync=1284314789346, InputEventId=0, HandleInputStart=1284315873974, AnimationStart=1284315879165, PerformTraversalsStart=1284316136480, DrawStart=1284318471172, FrameDeadline=1283848128053, FrameInterval=1284315405950, FrameStartTime=16666665, SyncQueued=1284319637723, SyncStart=1284359178936, IssueDrawCommandsStart=1284359279499, SwapBuffers=1284361804775, FrameCompleted=1284420785210, DequeueBufferDuration=4814, QueueBufferDuration=183326, GpuCompleted=1284361804775, SwapBuffersCompleted=1284420785210, DisplayPresentTime=20401094660746, CommandSubmissionCompleted=1284361804775, 
2025-01-10 17:07:01.757  8818-8834  EGL_emulation           org.capacitor.quasar.app             D  app_time_stats: avg=341.81ms min=37.83ms max=769.46ms count=4
2025-01-10 17:07:02.723  8818-8905  OpenGLRenderer          org.capacitor.quasar.app             I  Davey! duration=721ms; Flags=0, FrameTimelineVsyncId=18499, IntendedVsync=1285598117130, Vsync=1285598117130, InputEventId=0, HandleInputStart=1285601404605, AnimationStart=1285601408744, PerformTraversalsStart=1285602107932, DrawStart=1285602363935, FrameDeadline=1285614783796, FrameInterval=1285601383339, FrameStartTime=16666666, SyncQueued=1285605063336, SyncStart=1285605112945, IssueDrawCommandsStart=1285605149578, SwapBuffers=1286176540227, FrameCompleted=1286319763254, DequeueBufferDuration=4809, QueueBufferDuration=468752, GpuCompleted=1286176540227, SwapBuffersCompleted=1286319763254, DisplayPresentTime=184868277364748, CommandSubmissionCompleted=1286176540227, 
2025-01-10 17:07:05.401  8818-8908  ProfileInstaller        org.capacitor.quasar.app             D  Installing profile for org.capacitor.quasar.app

@ddenev
Copy link
Contributor

ddenev commented Jan 11, 2025

Seems the actual problem with the emulator comes from the fact that the dev server is actually not being started or bound to port 9500 - ss -tunl on linux does not list the 9500 port at all (means there is nothing that listens on it).

@rstoenescu
Copy link
Member

@ddenev

  1. Open up a local browser on the URL and see if it can access it. Should have errors in the console, but that's not important.
  2. Are you sure that you don't have a firewall or something tampering with the ports?

@ddenev
Copy link
Contributor

ddenev commented Jan 11, 2025

@rstoenescu

there is no service listening on port 9500. I opened a browser on my-ip:9500 but it shows 'not available' (expected).

no, I don't have any firewall that blocks, but again - as I mentioned, there is no service that listens on port 9500 after running quasar dev -m capacitor -T android:

ss -tunl | grep 9500

shows nothing. Same result with:

lsof -i -P -n | grep LISTEN

If I run quasar dev, then I can properly access the app on my-ip:9000. It doesn't work only when running in capacitor mode.

@ddenev
Copy link
Contributor

ddenev commented Jan 11, 2025

just to mention - this was working just fine couple of weeks ago on my system. Today I upgraded Quasar (and quasar/app-vite) to the latest versions and now it doesn't work.

@rstoenescu
Copy link
Member

Can you downgrade to the version that was working and tell me which that is, pls?

@ddenev
Copy link
Contributor

ddenev commented Jan 11, 2025

hm....

I downgraded to quasar 2.17.4 with app-vite 2.0.0 but observe the same problem.

Are there any logs that I could check (on linux)? Alternatively, how can I run the vite dev server on the command line - the one quasar is invoking when running quasar dev -m capacitor -T android?

@ddenev
Copy link
Contributor

ddenev commented Jan 11, 2025

@rstoenescu

unfortunately I'm not able to revert to a working setup.

The strange thing is that quasar dev works just fine - I can open the app on port 9000.

My setup is:

  • linux
  • node v22
  • yarn v1.22.22
  • quasar-cli installed via npm -g install @quasar-cli

I have also tried running quasar dev -p 9000 -m capacitor -T android to try with port 9000 but it was not working again - so it is not a port issue.

@dominicenglish
Copy link

I think this had to have been caused by a cached file. Make sure you've deleted .quasar folder and maybe node_modules/.q-cache. I've been upgrading so many of my apps that I assume I overlooked it in the app where I had this issue.

I ended up commenting out most of my quasar.config.ts and reducing my app to an empty App.vue file and it started working again. I assume this inadvertently fixed my cache as reverting all my changes and my capacitor dev server works again.

@nicobao
Copy link

nicobao commented Jan 13, 2025

I think this had to have been caused by a cached file. Make sure you've deleted .quasar folder and maybe node_modules/.q-cache. I've been upgrading so many of my apps that I assume I overlooked it in the app where I had this issue.

I ended up commenting out most of my quasar.config.ts and reducing my app to an empty App.vue file and it started working again. I assume this inadvertently fixed my cache as reverting all my changes and my capacitor dev server works again.

Hi, no it's not an old cache.

It doesn't work with a brand new project created from the CLI, see repro https://github.com/nicobao/quasar-repro-capacitor-dev-issue

#17725 (comment)

@rstoenescu
Copy link
Member

What linux are you using (and version)?
Also, if port 9000 works, can you set quasar.config > devServer > port to 9000 and try a capacitor dev again? Does it fails the same way?

@ddenev
Copy link
Contributor

ddenev commented Jan 13, 2025

I think this had to have been caused by a cached file. Make sure you've deleted .quasar folder and maybe node_modules/.q-cache. I've been upgrading so many of my apps that I assume I overlooked it in the app where I had this issue.

I ended up commenting out most of my quasar.config.ts and reducing my app to an empty App.vue file and it started working again. I assume this inadvertently fixed my cache as reverting all my changes and my capacitor dev server works again.

I confirm that is not the solution. Thank you for the suggestion, though!

@ddenev
Copy link
Contributor

ddenev commented Jan 13, 2025

@rstoenescu

What linux are you using (and version)? Also, if port 9000 works, can you set quasar.config > devServer > port to 9000 and try a capacitor dev again? Does it fails the same way?

I am using Tuxedo OS, which is based on Ubuntu 24.04:

uname -a                                                                                                                                                             ─╯
Linux r2-d2 6.11.0-108013-tuxedo #14tuxnoble1 SMP PREEMPT_DYNAMIC Mon Dec 16 18:07:37 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

I added port: 9000 to quasar.config.js > devServer as you suggested, but still the same - there is no service started that listens on port 9000.

Please check this comment above as well - they have the same issue with brand new quasar project on Debian 12.

Additional info, if that would help:
I have installed node v22 via nvm: https://nodejs.org/en/download
I have installed yarn v1.22.22 via corepack enable (I have added "packageManager": "[email protected]" to my package.json file
I have installed Quasar CLI via npm -g install @quasar/cli

@ddenev
Copy link
Contributor

ddenev commented Jan 15, 2025

@rstoenescu

Update: this also happens on Windows 11!

I just ran my project on a Windows 11 machine and same issue is happening - there is no node process listening on port 9500 when running quasar dev -m capacitor -T android.

Running quasar dev properly listens on port 9000.

On this Windows machine I am running node v20.11 with yarn v1.22.22.

Here is my quasar.conf.js:

// Configuration for your app
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-file

import { defineConfig } from '#q-app/wrappers'
import { fileURLToPath } from 'node:url'

export default defineConfig((ctx) => {
  return {
    // https://v2.quasar.dev/quasar-cli-vite/prefetch-feature
    // preFetch: true,

    // app boot file (/src/boot)
    // --> boot files are part of "main.js"
    // https://v2.quasar.dev/quasar-cli-vite/boot-files
    boot: [
      'event-bus',
      'appwrite',
      ctx.mode.capacitor ? 'capacitor' : '',
      'router',
      'app-init'
    ],

    // https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#css
    css: [
      'app.scss'
    ],

    // https://github.com/quasarframework/quasar/tree/dev/extras
    extras: [
      // 'ionicons-v4',
      // 'mdi-v7',
      // 'fontawesome-v6',
      // 'eva-icons',
      // 'themify',
      // 'line-awesome',
      // 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!

      'roboto-font', // optional, you are not bound to it
      'material-icons', // optional, you are not bound to it
      'material-icons-outlined',
      'mdi-v7'
    ],

    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#build
    build: {
      target: {
        browser: ['es2022', 'firefox115', 'chrome115', 'safari14'],
        node: 'node20'
      },

      vueRouterMode: 'history', // available values: 'hash', 'history'
      // vueRouterBase,
      // vueDevtools,
      // vueOptionsAPI: false,

      // rebuildCache: true, // rebuilds Vite/linter/etc cache on startup

      // publicPath: '/',
      // analyze: true,
      // env: {},
      // rawDefine: {}
      // ignorePublicFolder: true,
      // minify: false,
      // polyfillModulePreload: true,
      // distDir

      // extendViteConf (viteConf) {},
      // viteVuePluginOptions: {},

      vitePlugins: [
        ['vite-plugin-checker', {
          eslint: {
            lintCommand: 'eslint -c ./eslint.config.js "./src*/**/*.{js,mjs,cjs,vue}"',
            useFlatConfig: true
          }
        }, { server: false }]
      ],

      alias: {
        includes: fileURLToPath(new URL('./src/includes', import.meta.url)),
        classes: fileURLToPath(new URL('./src/classes', import.meta.url)),
        composables: fileURLToPath(new URL('./src/composables', import.meta.url)),
        '@capacitor': fileURLToPath(new URL('./src-capacitor/node_modules/@capacitor', import.meta.url)),
        '@hugotomazi': fileURLToPath(new URL('./src-capacitor/node_modules/@hugotomazi', import.meta.url))
      }
    },

    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#devserver
    devServer: {
      https: true,
      open: false // opens browser window automatically
    },

    // https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#framework
    framework: {
      config: {
        // global config for Loading plugin
        loading: {
          boxClass: 'bg-grey-10',
          spinnerSize: 60
        },
        capacitor: {
          backButton: false
        }
      },

      // iconSet: 'material-icons', // Quasar icon set
      // lang: 'en-US', // Quasar language pack

      // For special cases outside of where the auto-import strategy can have an impact
      // (like functional components as one of the examples),
      // you can manually specify Quasar components/directives to be available everywhere:
      //
      // components: [],
      // directives: [],

      // Quasar plugins
      plugins: [
        'BottomSheet',
        'Dialog',
        'Loading',
        'LocalStorage',
        'Notify'
      ]
    },

    animations: 'all', // --- includes all animations
    // https://v2.quasar.dev/options/animations
    // animations: [],

    // https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#sourcefiles
    // sourceFiles: {
    //   rootComponent: 'src/App.vue',
    //   router: 'src/router/index',
    //   store: 'src/store/index',
    //   pwaRegisterServiceWorker: 'src-pwa/register-service-worker',
    //   pwaServiceWorker: 'src-pwa/custom-service-worker',
    //   pwaManifestFile: 'src-pwa/manifest.json',
    //   electronMain: 'src-electron/electron-main',
    //   electronPreload: 'src-electron/electron-preload'
    //   bexManifestFile: 'src-bex/manifest.json
    // },

    // https://v2.quasar.dev/quasar-cli-vite/developing-ssr/configuring-ssr
    ssr: {
      prodPort: 3000, // The default port that the production server should use
      // (gets superseded if process.env.PORT is specified at runtime)

      middlewares: [
        'render' // keep this as last one
      ],

      // extendPackageJson (json) {},
      // extendSSRWebserverConf (esbuildConf) {},

      // manualStoreSerialization: true,
      // manualStoreSsrContextInjection: true,
      // manualStoreHydration: true,
      // manualPostHydrationTrigger: true,

      pwa: false
      // pwaOfflineHtmlFilename: 'offline.html', // do NOT use index.html as name!

      // pwaExtendGenerateSWOptions (cfg) {},
      // pwaExtendInjectManifestOptions (cfg) {}
    },

    // https://v2.quasar.dev/quasar-cli-vite/developing-pwa/configuring-pwa
    pwa: {
      workboxMode: 'GenerateSW' // 'GenerateSW' or 'InjectManifest'
      // swFilename: 'sw.js',
      // manifestFilename: 'manifest.json'
      // extendManifestJson (json) {},
      // useCredentialsForManifestTag: true,
      // injectPwaMetaTags: false,
      // extendPWACustomSWConf (esbuildConf) {},
      // extendGenerateSWOptions (cfg) {},
      // extendInjectManifestOptions (cfg) {}
    },

    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-cordova-apps/configuring-cordova
    cordova: {
      // noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
    },

    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-capacitor-apps/configuring-capacitor
    capacitor: {
      hideSplashscreen: true
    },

    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron
    electron: {
      // extendElectronMainConf (esbuildConf) {},
      // extendElectronPreloadConf (esbuildConf) {},

      // extendPackageJson (json) {},

      // Electron preload scripts (if any) from /src-electron, WITHOUT file extension
      preloadScripts: ['electron-preload'],

      // specify the debugging port to use for the Electron app when running in development mode
      inspectPort: 5858,

      bundler: 'packager', // 'packager' or 'builder'

      packager: {
        // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options

        // OS X / Mac App Store
        // appBundleId: '',
        // appCategoryType: '',
        // osxSign: '',
        // protocol: 'myapp://path',

        // Windows only
        // win32metadata: { ... }
      },

      builder: {
        // https://www.electron.build/configuration/configuration

        appId: 'quasar-upgrade'
      }
    },

    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
    bex: {
      // extendBexScriptsConf (esbuildConf) {},
      // extendBexManifestJson (json) {},

      /**
       * The list of extra scripts (js/ts) not in your bex manifest that you want to
       * compile and use in your browser extension. Maybe dynamic use them?
       *
       * Each entry in the list should be a relative filename to /src-bex/
       *
       * @example [ 'my-script.ts', 'sub-folder/my-other-script.js' ]
       */
      extraScripts: []
    }
  }
})

@rstoenescu
Copy link
Member

I'm starting to think that there is something with your specific project folder or with Vite, but not with Quasar.
Please do these two steps and share your findings:

  1. Create a new Quasar project folder. Do not change anything in it and run quasar dev -m capacitor -T android for it. Does it works?

  2. I'm seeing quasar.config > boot > ctx.mode.capacitor ? 'capacitor' : '', -- what is the contents of this file? I bet that this (or some other area) makes Vite fail to start, but it does so silently. Can you start removing from it and test until the devserver starts listening on the specified port? Remove bit by bit, until it works (assuming point no 1 from above works). And please share what line exactly is the culprit.
    Alternatively, can you share the project folder (privately, obviously)? I'm only interested in figuring out what the underlying issue is. If you agree, can you contact me on Discord, pls?

@rstoenescu
Copy link
Member

To add more to this on why I think that yours is a case of Vite silently failing: I have tested with a new Quasar project folder on a Linux and Windows and it works correctly.

@ddenev
Copy link
Contributor

ddenev commented Jan 15, 2025

Seems like you are right - I have installed a new Quasar project with yarn create quasar and then ran quasar dev -m capacitor -T android - now I can see that vite is starting and properly listens on port 9500.

Let me dig deeper into my project setup and try to find what could be the problem.

@ddenev
Copy link
Contributor

ddenev commented Jan 15, 2025

ok, found the culprit - deleting both node_modules and yarn.lock and then running yarn install resolved the issue. I was previously deleting only node_modules. It seems there were some old packages in node_modules that were left there after I upgraded to app-vite v2 and keeping the old yarn.lock just installed them again. so stupid of me...

thank you very much, @rstoenescu, for your help and guidance!

@rstoenescu
Copy link
Member

Glad you got to the bottom of it!

@rstoenescu
Copy link
Member

If it's not much, would you show this to your company pls? https://donate.quasar.dev

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

10 participants