Ionic 3 error Cordova_not_available in browser


#1

Hello, I have an Ionic 3 app and added Google sign in. When I use ionic serve the app starts but when i push the google button to log in i get the error “Cordova_not_available”.

I read something about using a MOCK? How can I use that for GooglePlus?

Greetings Renzo


#2

Cordova and the Cordova plugins are not available when running ionic serve. You will have to test this on a real device or emulator/simulator.


#3

Ok, I understand that but what is that with a mock? Is that that it skips that part and the error is not on the browser site?


#4

Mocking is a way to replace a specific object or functionality with a “dummy” version in specific environments - like native stuff when running in browser where native stuff is not available. But I don’t really know how this would help you here.


#5

I understand now what it is. I dont use the part what gives the error during developping for now, only when I want to test on my android device or ios device


#6

please help me with this error
after i enter cordova run android --device
this is the error

Android Studio project detected
ANDROID_HOME=C:\Users\dave\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_131
studio
Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

  • What went wrong:
    Unable to start the daemon process.
    This problem might be caused by incorrect configuration of the daemon.
    For example, an unrecognized jvm option is used.
    Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.1/userguide/gradle_daemon.html
    Please read the following process output to find out more:

Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org
    (node:5280) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:
    FAILURE: Build failed with an exception.

  • What went wrong:
    Unable to start the daemon process.
    This problem might be caused by incorrect configuration of the daemon.
    For example, an unrecognized jvm option is used.
    Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.1/userguide/gradle_daemon.html
    Please read the following process output to find out more:


Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org
    at ChildProcess.whenDone (C:\Users\dave\Desktop\budgetivityApp\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
    (node:5280) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
    (node:5280) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.