quasarframework / quasar

Quasar Framework - Build high-performance VueJS user interfaces in record time
https://quasar.dev
MIT License
25.29k stars 3.43k forks source link

Quasar CLI fails to open Android Studio from WSL Environment #17133

Open anyclub opened 2 weeks ago

anyclub commented 2 weeks ago

What happened?

Certainly! If you're creating a new issue on GitHub for the Quasar Framework related to the problem you're having with launching Android Studio from WSL and you need to fill in a section titled "What happened?", you can use the following template to describe your issue:


What happened?

I am encountering an issue where the Quasar CLI is unable to automatically open Android Studio when attempting to sync or build my Capacitor Android project within a WSL (Windows Subsystem for Linux) environment. Despite configuring the quasar.config.js file to point to the studio.exe using the cmd.exe command, the IDE does not launch as expected.

Here are the details of my configuration and the steps I've taken:

  1. Quasar CLI Configuration: I have set the linuxAndroidStudio path in quasar.config.js to use cmd.exe for launching Android Studio as follows:

    bin: {
     linuxAndroidStudio: 'cmd.exe /C start "" "' +
       '\\"C:\\Program Files\\Android\\Android Studio\\bin\\studio64.exe\\"'
    },
  2. Execution: When I run the Quasar CLI command to sync or build the Android project, the CLI correctly updates the capacitor.config.json but fails to open Android Studio.

  3. Error Message: The error message I receive is:

    App • ⚠️  Cannot determine path to IDE executable
    Please set quasar.config.js > bin > linuxAndroidStudio with the escaped path to your studio.sh
    Example: '/usr/local/android-studio/bin/studio.sh'
  4. Expected Behavior: I expected the CLI to open Android Studio automatically so that I could run the app within the IDE.

  5. Actual Behavior: Instead of opening, I receive the error message indicating a path resolution issue.

  6. Reproduction Steps:

    • Run quasar dev or a similar command to attempt to build or sync the Android project.
    • Observe the error message and failure to launch Android Studio.
  7. Additional Information:

    • I am using WSL 1 with the Ubuntu distribution.
    • The version of Quasar CLI being used is [quasar-app-vite1.8.0].
    • My Windows OS is [windows11].
    • The version of Android Studio installed on my system is [android-studio-2023.2.1.23-windows].

I believe this might be a bug related to how the Quasar CLI handles the path conversion for the WSL environment. Any assistance in resolving this issue would be greatly appreciated.

What did you expect to happen?

Certainly! Here's how you can fill out the "What did you expect to happen?" section for your GitHub issue:


What did you expect to happen?

I expected that upon running the Quasar CLI command to sync or build my Capacitor Android project, the CLI would successfully execute the necessary operations and then automatically launch the Android Studio IDE on Windows through the WSL environment.

Given that Android Studio is correctly installed on my Windows system and that I have provided the appropriate command to invoke it via cmd.exe within the quasar.config.js, the following sequence of actions should have occurred:

  1. CLI Command Execution: After executing a Quasar CLI command (e.g., quasar dev), the CLI should handle the project build or sync process without any issues.

  2. Android Studio Launch: Once the build or sync process is initiated, the CLI should then use the configured path to linuxAndroidStudio to start Android Studio.

  3. IDE Accessibility: Android Studio should open in a new window, allowing me to continue development within the IDE, making use of its features such as code editing, debugging, and running the app on emulators or devices.

  4. Error-Free Experience: I did not expect to encounter any error messages or have the process interrupted due to an inability to determine the path to the IDE executable.

Reproduction URL

null

How to reproduce?

  1. win11
  2. wsl1
  3. androidStudio
  4. quasar2

Flavour

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

Areas

Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite), Capacitor Mode

Platforms/Browsers

Other

Quasar info output

No response

Relevant log output

No response

Additional context

No response

github-actions[bot] commented 2 weeks ago

Hi @anyclub! 👋

It looks like you provided an invalid or unsupported reproduction URL. Do not use any service other than Codepen, jsFiddle, StackBlitz, Codesandbox, and GitHub. Make sure the URL you provided is correct and reachable. You can test it by visiting it in a private tab, another device, etc. Please edit your original post above and provide a valid reproduction URL as explained.

Without a proper reproduction, your issue will have to get closed.

Thank you for your collaboration. 👏

rstoenescu commented 2 weeks ago

Like indicating in the error message, the bin > linuxAndroidStudio should be a path, not a command to execute. Have you tried setting the path only?