apache / apache/cordova-android
Error when using cordova-simulate
- Dominant language
- JavaScript
- Stars
- 3.8k
- Forks
- 1.6k
- Avg merge
- 16h 18m
- Merged PRs (30d)
- 11
Description
# Bug Report
## Problem
### What is expected to happen?
Start simulator in browser when debuging with VSCode
### What does actually happen?
Cannot launch simulator in web browser with VSCode
## Information
VSCode cordova uses package cordova-serve that calls Api class from each platform with no parameters. In cordova-android the root definition was changed from `this.root = path.resolve(__dirname, '..');` (v.9.1.0) to `this.root = platformRootDir;` (v.10.0.1).
When trying to set the app main path (line 66) `const appMain = path.join(this.root, 'app', 'src', 'main');` because the first parameter is undefined.
### Command or Code
### Environment, Platform, Device
### Version information
Cordova: 10.0.0
Cordova-android: 10.0.1
SO: Windows 10 PRO
## Checklist
- [ x] I searched for existing GitHub issues
- [ x] I updated all Cordova tooling to most recent version
- [ x] I included all the necessary information above
Contributor guide
Research direction
Start at the cordova-android Api class and the app-main lookup described at line 66, then trace how cordova-serve invokes that class without parameters. Reproduce the VSCode browser-simulator launch with Cordova 10.0.0 and cordova-android 10.0.1; done means the simulator starts in the browser without the undefined-path error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs, vscode
- Domain
- mobile-dev, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100