Error when trying using Device plugin ionic 4 - ionic-framework

I am trying to use the “Device” plugin in ionic 4 (4.10.2) with the same commands indicated in the ionic page and when trying to run the app I get the following error.
Ionic Error
PS: I’m trying to make a console.log of the device version.
console.log(this.device.uuid);
Ionic doc: https://ionicframework.com/docs/native/device#usage
Any solution?
Thank you

Related

ionic framework error when run the command ionic capacitor build android

I am using the ionic framework. I am trying to run the command ionic capacitor run android,
i got the error like the attachment.
Can any one help me to resolve this issue.
I just replace the ...\AppData\Roaming\npm with my old data. Then it is working fine.

Ionic Auth0 error: "Cannot read property 'isAvailable' of undefined"

I downloaded the example project from Auth0's website. When I run the project with the ionic serve command the main page pulls up fine, but when I press login it throws the error Cannot read property 'isAvailable' of undefined. I have tried running this app on an Android device and it does work. Any ideas on how to fix this error? Thanks.
#cyberabis is correct in his comment.
ionic serve does not load cordova plugins.
Auth0 uses auth0-cordova plugin which in turn requires:
cordova-plugin-safariviewcontroller
cordova-plugin-customurlscheme
All these require you to run the ionic app in your device or emulator if you want to test the login functionality.

ionic v2 error ionic view

I'm developing an ionic v2 app but even working on ionic lab it gets a complete white screen on the ionic view. If I do the same withe the ionic v1 it works.
ionic start sample --v2
cd sample
ionic lab
ionic upload
It shows white but
ionic start sample
cd sample
ionic lab
ionic upload
It works perfectly. No changes on the code at all
Thanks
ionic 2 needs at least 4.4 android to work, lost a lot of time on this and there is nothing on the ionic website informing about that. Writing down here to help anyone in the future.
Ionic v2 supports android 4.4 and up. The older browser on pre-4.4 devices do not have the features needed for ionic2 and angular 2 to work. Though this can be fixed with crosswalk.
The supported platforms are list here:
http://ionicframework.com/docs/overview/#browser-support
You can go back to 4.1 with crosswalk it states.
ionic 2 needs at least 4.4 android to work,.. for more info debug app in chrome.
from ionic 2 Ionic officially stops to use ionic lab.
You can run and test your app in browser using command "ionic serve".
Ionic2 app was initially created with --v2 flag but now they removed it . So nothing happens with --v2
Better way to solve the code 1st time by running directly into android devices by
Ionic cordova run android or
Ionic run android
Then connect your device with your system and open chrome and enter chrome://inspect to the url
Now you can console log the the error and can find the way of solutions.
Now try to run by ionic view
Remove the platform and then add it again.
please try eionic start sample --type=ionic-angular

How do I install a specific version of crosswalk using ionic cli2

I currently have an ionic 1 project, but have just switched to using ionic cli2. I previously used to add crosswalk into my project, by running the following command, as mentioned here.
ionic browser add crosswalk
However, ionic cli2 no longer supports the browser command, and I am unsure how to install it in the correct way.
Any help would be appreciated.
It seems the answer is as follows:
I need to run
ionic plugin add cordova-plugin-crosswalk-webview

Ionic + PushWoosh Error Cordova.js not found

I'm trying to test pushwoosh with this application
https://github.com/alvaroziqar/ionic-pushwoosh
I did ionic add platofrm android
Then ionic build
But the notification isn't working. Pushwoosh panel shows 0 android devices. Please help.
Make sure you follow the guide correctly:
http://docs.pushwoosh.com/docs/cordova-phonegap
Please note that for ionic you add pushwoosh plugins as:
ionic plugin add pushwoosh-cordova-plugin
Also you can try Pushwoosh Ionic sample here:
https://github.com/Pushwoosh/pushwoosh-phonegap-cordova-sample/tree/master/Ionic