Debug console error Unimplemented console API: undefined

Hello,

I am getting

Unimplemented console API: undefined

when I try to debug in Visual Studio Code on Android device. It was working perfectly until about one week ago and I am not sure what made it behave like that. The app is starting, but I don’t see any exception message or console.log message. For every message I should receive, I get the error above.
I searched on google with the error message, but I can’t find any good result.

It also happens on a new project.

ionic info

Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.1
Ionic App Lib Version: 2.1.1
Ionic App Scripts Version: 0.0.36
OS:
Node Version: v6.7.0

vscode

version 1.6.1

Can anyone help me, please?

Thank you,
Bogdan

1 Like

Can you paste your tsconfig.json?

{
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "declaration": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "lib": [
      "dom",
      "es2015"
    ],
    "module": "es2015",
    "moduleResolution": "node",
    "target": "es5"
  },
  "exclude": [
    "node_modules"
  ],
  "compileOnSave": false,
  "atom": {
    "rewriteTsconfig": false
  }
}

hello,

i am also having the same error. even in an empty project.

did you find any solution?

best,

same problem here, any solution ?

I’m experiencing the same issue (on Windows 10).

Any resolution or workarounds? This issue is critical! We’re driving blind without console logs.

I’ve the same problem but only on a physical tablet that has been automatically updated today.

In the emulator this error doesn’t happens.

I suspect that the last WebView update has broken “console”.

Any ideas?

This happens to me as well when attached with Visual Studio Code and Android. It was working for me last week and just stopped. I updated my Cordova Android platform so not sure if it is tied to that or not.

For your interest seems there is a “bug” in VS Code. The solution can be found here:

The steps to work around this bug are:

  1. go to your vscode extension directory, either C:\Users<user>.vscode\extensions\ or ~/.vscode/extensions
  2. then go to vsmobile.cordova-tools-1.2.3/node_modules/vscode-chrome-debug-core/out/src/chrome/ and open up consoleHelper.js.
  3. look around line 37 for outputText = 'Unimplemented console API: ’ + m.type;
  4. change that to outputText = m.text;