Title: `doctor` and `run` fail on WSL2 with Android SDK installed on Windows · Issue #5819 · NativeScript/nativescript-cli · GitHub
Open Graph Title: `doctor` and `run` fail on WSL2 with Android SDK installed on Windows · Issue #5819 · NativeScript/nativescript-cli
X Title: `doctor` and `run` fail on WSL2 with Android SDK installed on Windows · Issue #5819 · NativeScript/nativescript-cli
Description: Issue Description NativeScript CLI wrongly assumes adb and emulator as executable names instead of adb.exe and emulator.exe As a workaround, you can create a symlink named adb and emulator pointing to their equivalents with the .exe exte...
Open Graph Description: Issue Description NativeScript CLI wrongly assumes adb and emulator as executable names instead of adb.exe and emulator.exe As a workaround, you can create a symlink named adb and emulator pointing...
X Description: Issue Description NativeScript CLI wrongly assumes adb and emulator as executable names instead of adb.exe and emulator.exe As a workaround, you can create a symlink named adb and emulator pointing...
Opengraph URL: https://github.com/NativeScript/nativescript-cli/issues/5819
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`doctor` and `run` fail on WSL2 with Android SDK installed on Windows","articleBody":"### Issue Description\r\n\r\nNativeScript CLI wrongly assumes `adb` and `emulator` as executable names instead of `adb.exe` and `emulator.exe`\r\n\r\nAs a workaround, you can create a symlink named `adb` and `emulator` pointing to their equivalents with the `.exe` extension\r\n\r\n### Reproduction\r\n\r\n1. install Android SDK on Windows to `C:\\android\\sdk`\r\n2. setup WSL2 with NativeScript CLI\r\n3. set `ANDROID_HOME` to `C:\\android\\sdk`, `ANDROID_SDK_ROOT` to `$ANDROID_HOME` and add `$ANDROID_HOME/platform-tools` to `$PATH`\r\n4. run `ns run android --device \u003cdevice id\u003e` or `ns doctor android`\r\n5. the command fails because it tests `adb` and `emulator` instead of `adb.exe` and `emulator.exe`\r\n\r\n### Relevant log output (if applicable)\r\n\r\n```shell\r\nns --log trace run android --device emulator-5554\r\n\r\n* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\r\n*\r\n *\r\n* The \"TRACE\" log level might print some sensitive data like secrets or access tokens in request URLs. Be careful when you share this output. *\r\n*\r\n *\r\n* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\r\n\r\n\r\nLooking for project in '/home/szymek/projects/nativescriptjazda/tamagoczi'\r\nProject directory is '/home/szymek/projects/nativescriptjazda/tamagoczi'.\r\nInitializing project identifiers. Config: {\r\n id: 'org.nativescript.tamagoczi',\r\n appPath: 'src',\r\n appResourcesPath: 'App_Resources',\r\n android: { v8Flags: '--expose_gc', markingMode: 'none' },\r\n cli: { packageManager: 'bun' }\r\n}\r\nLoading extensions.\r\nCollecting system information...\r\nSystem information:\r\n{\r\n \"platform\": \"linux\",\r\n \"shell\": \"/bin/bash\",\r\n \"os\": \"Linux DESKTOP-RJEK15K 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux\\n\",\r\n \"procArch\": \"x64\",\r\n \"nodeVer\": \"21.7.3\",\r\n \"npmVer\": \"10.5.0\",\r\n \"nodeGypVer\": \"10.2.0\",\r\n \"nativeScriptCliVersion\": \"8.8.2\",\r\n \"gitVer\": \"2.25.1\",\r\n \"dotNetVer\": null,\r\n \"javacVersion\": \"17.0.12\",\r\n \"javaVersion\": \"17.0.12\",\r\n \"javaPath\": \"java\",\r\n \"adbVer\": null,\r\n \"androidInstalled\": true,\r\n \"monoVer\": null,\r\n \"gradleVer\": null,\r\n \"isAndroidSdkConfiguredCorrectly\": false,\r\n \"xcodeprojLocation\": null,\r\n \"itunesInstalled\": false,\r\n \"isCocoaPodsWorkingCorrectly\": false,\r\n \"isCocoaPodsUpdateRequired\": false,\r\n \"pythonInfo\": null\r\n}\r\nCurrent CLI version: 8.8.2\r\nProject dir from hooksArgs is: undefined.\r\nHooks directories: [ '/home/szymek/projects/nativescriptjazda/tamagoczi/hooks' ]\r\nBeforeHookName for command resolveCommand is before-resolveCommand\r\nProject dir from hooksArgs is: undefined.\r\nAfterHookName for command resolveCommand is after-resolveCommand\r\nTrying to handle SIGINT event. CLI overrides this behavior and does not allow handling SIGINT as this causes issues with Ctrl + C in terminal.\r\nThe stackTrace of the location trying to handle SIGINT is (note: this is not an error, just a stack-trace for debugging purposes):\r\n at process.on (/home/szymek/.bun/install/global/node_modules/nativescript/lib/nativescript-cli.js:28:28)\r\n at Object.\u003canonymous\u003e (/home/szymek/.bun/install/global/node_modules/@ionic/utils-process/dist/index.js:145:13)\r\n at Module._compile (node:internal/modules/cjs/loader:1368:14)\r\n at Module._extensions..js (node:internal/modules/cjs/loader:1426:10)\r\n at Module.load (node:internal/modules/cjs/loader:1205:32)\r\n at Module._load (node:internal/modules/cjs/loader:1021:12)\r\n at Module.require (node:internal/modules/cjs/loader:1230:19)\r\n at require (node:internal/modules/helpers:179:18)\r\n at Object.\u003canonymous\u003e (/home/szymek/.bun/install/global/node_modules/@ionic/utils-subprocess/dist/index.js:6:25)\r\n at Module._compile (node:internal/modules/cjs/loader:1368:14)\r\nMigration cache path is: /home/szymek/.local/share/.nativescript-cli/should-migrate-cache-8.8.2.json\r\nTrying to handle SIGINT event. CLI overrides this behavior and does not allow handling SIGINT as this causes issues with Ctrl + C in terminal.\r\nThe stackTrace of the location trying to handle SIGINT is (note: this is not an error, just a stack-trace for debugging purposes):\r\n at process.on (/home/szymek/.bun/install/global/node_modules/nativescript/lib/nativescript-cli.js:28:28)\r\n at /home/szymek/.bun/install/global/node_modules/signal-exit/index.js:158:17\r\n at Array.filter (\u003canonymous\u003e)\r\n at load (/home/szymek/.bun/install/global/node_modules/signal-exit/index.js:156:23)\r\n at module.exports (/home/szymek/.bun/install/global/node_modules/signal-exit/index.js:62:7)\r\n at Object.\u003canonymous\u003e (/home/szymek/.bun/install/global/node_modules/proper-lockfile/lib/lockfile.js:331:1)\r\n at Module._compile (node:internal/modules/cjs/loader:1368:14)\r\n at Module._extensions..js (node:internal/modules/cjs/loader:1426:10)\r\n at Module.load (node:internal/modules/cjs/loader:1205:32)\r\n at Module._load (node:internal/modules/cjs/loader:1021:12)\r\nspawn: /usr/bin/node \"/home/szymek/.bun/install/global/node_modules/nativescript/lib/detached-processes/cleanup-process.js\" \"/home/szymek/.bun/install/global/node_modules/nativescript/lib/bootstrap.js\"\r\n(node:19089) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.\r\n(Use `node --trace-deprecation ...` to show where the warning was created)\r\nShasum of file /home/szymek/projects/nativescriptjazda/tamagoczi/package.json is 837e859413535462915b4d431c11718ac308fcf3\r\nGot cached result for shouldMigrate for platform: Android: false\r\nProject dir from hooksArgs is: /home/szymek/projects/nativescriptjazda/tamagoczi.\r\nBeforeHookName for command checkEnvironment is before-checkEnvironment\r\nInitializing analytics statuses.\r\nAnalytics statuses: { TrackFeatureUsage: 'enabled', TrackExceptions: 'enabled' }\r\nWill send the following information to Google Analytics: {\r\n type: 'googleAnalyticsData',\r\n category: 'CLI',\r\n googleAnalyticsDataType: 'event',\r\n action: 'Check Local Build Setup',\r\n label: 'Starting',\r\n customDimensions: { cd2: 'Vue.js', cd9: 'false', cd5: 'CLI' },\r\n value: undefined\r\n}\r\nspawn: /usr/bin/node \"/home/szymek/.bun/install/global/node_modules/nativescript/lib/services/analytics/analytics-broker-process.js\" \"/home/szymek/.bun/install/global/node_modules/nativescript/lib/bootstrap.js\"\r\nError while trying to parseJson data from /home/szymek/.local/share/.nativescript-cli/doctor-cache.json file. Err is: SyntaxError: Unexpected end of JSON input\r\ngetInfos cacheConfig options: { forceCheck: undefined } current info from cache: null\r\nWill send the following information to Google Analytics: {\r\n type: 'googleAnalyticsData',\r\n category: 'CLI',\r\n googleAnalyticsDataType: 'event',\r\n action: 'Check Local Build Setup',\r\n label: 'Warnings:WARNING: adb from the Android SDK is not installed or is not configured properly. __WARNING: The Android SDK is not installed or is not configured properly.',\r\n customDimensions: { cd2: 'Vue.js', cd9: 'false', cd5: 'CLI' },\r\n value: undefined\r\n}\r\n✔ Your ANDROID_HOME environment variable is set and points to correct directory.\r\n✔ A compatible Android SDK for compilation is found.\r\n✔ Javac is installed and is configured properly.\r\n✔ The Java Development Kit (JDK) is installed and is configured properly.\r\n✔ Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.\r\n✖ WARNING: adb from the Android SDK is not installed or is not configured properly.\r\n For Android-related operations, the NativeScript CLI will use a built-in version of adb.\r\nTo avoid possible issues with the native Android emulator, Genymotion or connected\r\nAndroid devices, verify that you have installed the latest Android SDK and\r\nits dependencies as described in http://developer.android.com/sdk/index.html#Requirements\r\n\r\n✖ WARNING: The Android SDK is not installed or is not configured properly.\r\n You will not be able to run your apps in the native emulator. To be able to run apps\r\nin the native Android emulator, verify that you have installed the latest Android SDK\r\nand its dependencies as described in http://developer.android.com/sdk/index.html#Requirements\r\n\r\nWill send the following information to Google Analytics: {\r\n type: 'googleAnalyticsData',\r\n category: 'CLI',\r\n googleAnalyticsDataType: 'event',\r\n action: 'Check Local Build Setup',\r\n label: 'Finished: Is setup correct: false',\r\n customDimensions: { cd2: 'Vue.js', cd9: 'false', cd5: 'CLI' },\r\n value: undefined\r\n}\r\nWill send the following information to Google Analytics: {\r\n type: 'googleAnalyticsData',\r\n category: 'CLI',\r\n googleAnalyticsDataType: 'event',\r\n action: 'Check Environment Requirements',\r\n label: 'Non-interactive terminal, unable to execute local builds.',\r\n customDimensions: { cd2: 'Vue.js', cd9: 'false', cd5: 'CLI' },\r\n value: undefined\r\n}\r\nYour environment is not configured properly and you will not be able to execute local builds.\r\nVerify that your environment is configured according to the system requirements described at\r\nhttps://docs.nativescript.org/setup/linux#setting-up-linux-for-android.\r\nError: Your environment is not configured properly and you will not be able to execute local builds.\r\nVerify that your environment is configured according to the system requirements described at\r\nhttps://docs.nativescript.org/setup/linux#setting-up-linux-for-android.\r\n at Errors.failWithOptions (/home/szymek/.bun/install/global/node_modules/nativescript/lib/common/errors.js:165:27)\r\n at Errors.fail (/home/szymek/.bun/install/global/node_modules/nativescript/lib/common/errors.js:137:21)\r\n at PlatformEnvironmentRequirements.fail (/home/szymek/.bun/install/global/node_modules/nativescript/lib/services/platform-environment-requirements.js:66:22)\r\n at PlatformEnvironmentRequirements.\u003canonymous\u003e (/home/szymek/.bun/install/global/node_modules/nativescript/lib/services/platform-environment-requirements.js:57:22)\r\n at Generator.next (\u003canonymous\u003e)\r\n at fulfilled (/home/szymek/.bun/install/global/node_modules/nativescript/lib/services/platform-environment-requirements.js:11:58)\r\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n```\r\n\r\n\r\n### Environment\r\n\r\n```yaml\r\nOS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)\r\nCPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz\r\nShell: /bin/bash\r\nnode: 21.7.3\r\nnpm: 10.5.0\r\nnativescript: Not Found\r\n\r\n# android\r\njava: 17.0.12\r\nndk: Not Found\r\napis: Not Found\r\nbuild_tools: Not Found\r\nsystem_images: Not Found\r\n\r\n# ios\r\nxcode: Not Found\r\ncocoapods: Not Found\r\npython: Not Found\r\npython3: 3.8.10\r\nruby: Not Found\r\nplatforms: Not Found\r\n```\r\n\r\n### Dependencies\r\n\r\n```json\r\n\"dependencies\": {\r\n \"@nativescript/core\": \"~8.7.0\",\r\n \"nativescript-vue\": \"3.0.0-rc.2\"\r\n},\r\n\"devDependencies\": {\r\n \"@nativescript-dom/core-types\": \"1.0.31\",\r\n \"@nativescript-dom/vue-types\": \"1.0.16\",\r\n \"@nativescript/android\": \"^8.8.6\",\r\n \"@nativescript/preview-cli\": \"^1.0.13\",\r\n \"@nativescript/types\": \"~8.7.0\",\r\n \"@nativescript/webpack\": \"~5.0.0\",\r\n \"@types/node\": \"~17.0.21\",\r\n \"typescript\": \"^5.4.5\",\r\n \"vue-tsc\": \"2.1.10\"\r\n}\r\n```\r\n\r\n### Please accept these terms\r\n\r\n- [X] I have searched the [existing issues](https://github.com/NativeScript/nativescript-cli/issues) as well as [StackOverflow](https://stackoverflow.com/questions/tagged/nativescript) and this has not been posted before\r\n- [X] This is a bug report\r\n- [X] I agree to follow this project's [Code of Conduct](https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#coc)","author":{"url":"https://github.com/dszymon","@type":"Person","name":"dszymon"},"datePublished":"2024-11-01T12:04:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/5819/nativescript-cli/issues/5819"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1ec8e042-3764-8fc3-4a00-d32473e8e56d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DE4A:4DF1B:3CB6DED:50F4251:696DDD34 |
| html-safe-nonce | d1a4dbaeff7b2fd7beda2d94e44be3df79efe17fbeb3bd8e161b153f6b5ad8c9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERTRBOjRERjFCOjNDQjZERUQ6NTBGNDI1MTo2OTZEREQzNCIsInZpc2l0b3JfaWQiOiI4MTUwMjc0ODY3NzM5ODc2NjYwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a00f1fcc462fe8eae76d6b7079b9fc4a9751ffdb0c008b052b720472a86921a8 |
| hovercard-subject-tag | issue:2628909891 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/nativescript-cli/5819/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3465a48ff1a451da024214843aa8dfe1f0720d37cd95bf0e64f5ce205328ed47/NativeScript/nativescript-cli/issues/5819 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3465a48ff1a451da024214843aa8dfe1f0720d37cd95bf0e64f5ce205328ed47/NativeScript/nativescript-cli/issues/5819 |
| og:image:alt | Issue Description NativeScript CLI wrongly assumes adb and emulator as executable names instead of adb.exe and emulator.exe As a workaround, you can create a symlink named adb and emulator pointing... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dszymon |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4922b452d03cd8dbce479d866a11bc25b59ef6ee2da23aa9b0ddefa6bd4d0064 |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/nativescript-cli git https://github.com/NativeScript/nativescript-cli.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 21347346 |
| octolytics-dimension-repository_nwo | NativeScript/nativescript-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 21347346 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/nativescript-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7e5ae23c70136152637ceee8d6faceb35596ec46 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width