I am trying to launch my app in an emulator but Im getting lots of generic console errors as if it were in a browser... anyone got any clue why this is this is one of the errors
console.warn: Native: tried calling Facebook.login, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator
and this is the command I am using, the desired outcome is having livereload in the device and also having it emulated.. at the moment it acts as though it is in a browser and outputs the above error when I try to use facebook authentication
ionic emulate ios "--port" "8000" "--address" "192.168.56.1" "--liveReloadPort" "8000" "--nobrowser" "--consolelogs" "--serverlogs" -l
Any changes to plugins will require a full rebuild. So if you have added Facebook plugin after live reload try rebuilding.
Related
I am working with flutter currently and everything was fine suddenly when I uninstalled the app from the device and rerun flutter run from the terminal it's suddenly not able to install the apk.
maybe when i including firebase in the flutter app then i facing this error.
Want to Know where is wrong my device or flutter code or something......
can show how the error appears in the debug console.
maybe you can try to follow on the documentation page here
This question is related to ionic 3 and I want to know how to run an ionic app using a real device.
I have developed an hybrid application and I was not able to connect my app with server. It works fine in my laptop browser. But it does not work in devApp and android apk.
I have tried many solutions but was not able to get the perfect solution. I have made a proxy server to access the api by ionic devApp but it doesn't even show a single error.
I think this problem is related about CORS.
Use the additional parameter of --devapp when running your ionic serve.
ionic serve --devapp
Should work now.
For me allowing port 8100 in my firewall was needed. Then everythig works.
CORS is not a problem when you build your app on a real device.
To run your app on android device :
ionic cordova platform add android
ionic cordova build android
ionic cordova run android (Connect your device before executing this)
Try Reinstalling cordova-plugin-whitelist plugin.
I'd the same problem. But I just uninstalled and installed again the ionic DevApp and it solved it.
Try using the command ionic serve -c this for view the app into Ionic devApp
I am not sure if this helps now - In your DevAPp you have settings where you can manually enter IP address and port. This will be the private IP (192.x.x.x) and 8100 that is displayed when you start the ionic serve --devapp from the terminal.
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.
I've created an Ionic app and I'm trying to use the Custom Authentication option eg. Ionic.Auth.login('custom', authOptions, data).then(success, failure); However, I get an error message in the failure saying "Missing InAppBrowser plugin".
The plugin is installed and I've tried to uninstall and reinstall the plugin with no luck. When I use 'basic' the request goes through fine.
How do I fix this or get around it?
Plugins only work when running in native devices. You can't use them on browser with ionic serve.
You may want to start testing on a real android device or emulator.
Alternatively, there's a chrome plugin called Ripple that emulate an real devices with native-like features, allowing you to use some plugins on browser.
my ionic project works fine with ionic serve --lab ,but while copied the.apk file in build folder to my phone and install the app but blank screen appears ,
Please can anyone suggest what might be my problem
my app is using google maps,key is provieded for both app and browser in index.html
Have you tried running it in the emulator ? Since its much easier to see the error logs . Try ionic emulate android -l or ios -l (whichever OS you are building for) and then once the execution starts run the command consolelogs it will log all the activity and you will have a better understanding about why its not working.
+1 for using Chrome Remote Debugging feature. It give you the same output as you would receive from running you app in the browser.
Additionally, I have found that sometimes if your app is already compiled, the ionic CLI doesnt always copy your current files into the APK, and uses the older cached files instead. If you are banging your head against the wall, run the following commands to make sure you have your latest code in your APK.
ionic platform remove android
ionic platform add android
ionic run android
I suggest you use the Chrome Remote Debugging feature. I encountered the same, and looked for answers to my symptom for hours. Once I connected to the chrome remote debugger, I got the console.log back, and noticed there was a problem in my routing setup.
It was a problem with ionic CLI. I've updated it to the latest and reinstalled all dependencies.