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

Error starting the simulation after updating to VS Code 1.20.0 #371

Closed
weinand opened this issue Feb 14, 2018 · 11 comments
Closed

Error starting the simulation after updating to VS Code 1.20.0 #371

weinand opened this issue Feb 14, 2018 · 11 comments

Comments

@weinand
Copy link

weinand commented Feb 14, 2018

From @avinashbhalki on February 14, 2018 5:48

Unable to use Simulate Android to Browser after updating the Visual Studio Code to version 1.20.0.
Error:
Launching for android (This may take a while)...
An error occurred while attaching to the debugger. Error starting the simulation
Error starting the simulation

  • VSCode Version: 1.20.0
  • OS Version: Windows 7

Steps to Reproduce:

Does this issue occur when all extensions are disabled?: Yes/No

Copied from original issue: microsoft/vscode#43634

@weinand
Copy link
Author

weinand commented Feb 14, 2018

What debugger extension are you using?

@weinand
Copy link
Author

weinand commented Feb 14, 2018

From @avinashbhalki on February 14, 2018 7:45

Debugger for Chrome

@weinand
Copy link
Author

weinand commented Feb 14, 2018

Please provide more detailed steps so that we can reproduce.
What exact error occurred? Screenshot?
How does your launch config look like?

@weinand
Copy link
Author

weinand commented Feb 14, 2018

From @avinashbhalki on February 14, 2018 10:2

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

    {
        "name": "Run Android on device",
        "type": "cordova",
        "request": "launch",
        "platform": "android",
        "target": "device",
        "port": 9222,
        "sourceMaps": true,
        "cwd": "${workspaceRoot}",
        "ionicLiveReload": false
    },
    {
        "name": "Run iOS on device",
        "type": "cordova",
        "request": "launch",
        "platform": "ios",
        "target": "device",
        "port": 9220,
        "sourceMaps": true,
        "cwd": "${workspaceRoot}",
        "ionicLiveReload": false
    },
    {
        "name": "Attach to running android on device",
        "type": "cordova",
        "request": "attach",
        "platform": "android",
        "target": "device",
        "port": 9222,
        "sourceMaps": true,
        "cwd": "${workspaceRoot}"
    },
    {
        "name": "Attach to running iOS on device",
        "type": "cordova",
        "request": "attach",
        "platform": "ios",
        "target": "device",
        "port": 9220,
        "sourceMaps": true,
        "cwd": "${workspaceRoot}"
    },
    {
        "name": "Run Android on emulator",
        "type": "cordova",
        "request": "launch",
        "platform": "android",
        "target": "emulator",
        "port": 9222,
        "sourceMaps": true,
        "cwd": "${workspaceRoot}",
        "ionicLiveReload": false
    },
    {
        "name": "Run iOS on simulator",
        "type": "cordova",
        "request": "launch",
        "platform": "ios",
        "target": "emulator",
        "port": 9220,
        "sourceMaps": true,
        "cwd": "${workspaceRoot}",
        "ionicLiveReload": false
    },
    {
        "name": "Attach to running android on emulator",
        "type": "cordova",
        "request": "attach",
        "platform": "android",
        "target": "emulator",
        "port": 9222,
        "sourceMaps": true,
        "cwd": "${workspaceRoot}"
    },
    {
        "name": "Attach to running iOS on simulator",
        "type": "cordova",
        "request": "attach",
        "platform": "ios",
        "target": "emulator",
        "port": 9220,
        "sourceMaps": true,
        "cwd": "${workspaceRoot}"
    },
    {
        "name": "Serve to the browser (ionic serve)",
        "type": "cordova",
        "request": "launch",
        "platform": "serve",
        "cwd": "${workspaceRoot}",
        "devServerAddress": "localhost",
        "sourceMaps": true,
        "ionicLiveReload": true
    },
    {
        "name": "Simulate Android in browser",
        "type": "cordova",
        "request": "launch",
        "platform": "android",
        "target": "chrome",
        "simulatePort": 8000,
        "livereload": true,
        "sourceMaps": true,
        "cwd": "${workspaceRoot}"
    },
    {
        "name": "Simulate iOS in browser",
        "type": "cordova",
        "request": "launch",
        "platform": "ios",
        "target": "chrome",
        "simulatePort": 8000,
        "livereload": true,
        "sourceMaps": true,
        "cwd": "${workspaceRoot}"
    },
    {
        "name": "Run Browser",
        "type": "cordova",
        "request": "launch",
        "platform": "browser",
        "target": "chrome",
        "simulatePort": 8000,
        "livereload": true,
        "sourceMaps": true,
        "cwd": "${workspaceRoot}"
    }
]

}
error

@avinashbhalki
Copy link

Any Help appreciated, Many Thanks...

@sergey-akhalkov
Copy link
Contributor

Hey guys @weinand, @avinashbhalki, could you please take a look at #368 (comment) and let me know if it helps?

@avinashbhalki
Copy link

@sergey-akhalkov @weinand It's not working for me...

@jalmansa88
Copy link

Same happens here.

@ultimatetag
Copy link

ultimatetag commented Apr 22, 2018

Same issue here. My Ionic app scripts is putting Android platform here:

@ ionic/app-scripts/dist/dev-server/serve-config.js:
exports.ANDROID_PLATFORM_PATH = path.join('platforms', 'android', 'app', 'src', 'main', 'assets', 'www');

But I think the simulator expects the folder to be here:
platforms/android/assets/www

Is there any way to pass the expected folder through the launch.json task?

@itoys
Copy link
Contributor

itoys commented May 11, 2018

Hi there,
We use cordova-serve under the hood to run simulation.
It has PR to fix this issue.
We will update our dependency as soon as this PR will be merged and new release will be published.

As a workaround you can manually apply patch from a PR in your node_modules

Thanks!

@itoys
Copy link
Contributor

itoys commented May 28, 2018

upd. Fixed there apache/cordova-serve#7

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

8 participants