forceng icon indicating copy to clipboard operation
forceng copied to clipboard

oauthPlugin = cordova.require("com.salesforce.plugin.oauth"); Issue

Open jduelfer opened this issue 9 years ago • 9 comments

Hey, I have tried you app using force-server and it runs perfectly, great tutorial. However, I am trying to run your app on an Android device, but it opens up to a blank screen and the code stops at the oauthPlugin = cordova.require("com.salesforce.plugin.oauth"); line. Now I don't believe this is an issue on your part, as it seems more of a problem with my configuration of cordova. But have you come across this issue before or have any possible solutions?

Thanks!

jduelfer avatar Dec 16 '15 10:12 jduelfer

Hi jduelfer did you manage to get it working with Ionic-View?http://view.ionic.io/

sfofthings avatar Jan 22 '16 11:01 sfofthings

@jduelfer @bonhomie Were you able to fix this issue? I am also having the same problem. The application works fine for iOS. But with Android, I am not able to get past the oauth.

Thanks in advance

udaykumarbpatel avatar Feb 04 '16 05:02 udaykumarbpatel

@bonhomie I have not tried using Ionic-View, when I have some time again I trying working with that and see how it goes. @udaykumarbpatel no, I wasn't. I could also manage to get it going on iOS, but I'm working in Spain and nobody uses iOS, so it's kind of a bummer. For Android, I have tried different things and anytime with oauth using plugins, there are issues with the way Android displays WebViews. Please me know if you get anything working.

jduelfer avatar Feb 04 '16 08:02 jduelfer

I'm having the same issue: Uncaught module com.salesforce.plugin.oauth not found

Using Ionic Salesforce template with plugin com.salesforce 4.0.2 "SalesforceMobileSDK Plugins"

darrenatyurgosky avatar Feb 08 '16 14:02 darrenatyurgosky

This looks like the problem, when adding android platform

Updated the hooks directory to have execute permissions Adding android project... Creating Cordova project for the Android platform: Path: platforms/android Package: com.ionicframework.starter Name: HelloCordova Activity: MainActivity Android target: android-23 Android project created with [email protected] Running command: /Users/Darren/IonicApp/hooks/after_prepare/010_add_platform_class.js /Users/Darren/IonicApp add to body class: platform-android Installing "com.salesforce" for android Plugin doesn't support this project's cordova-android version. cordova-android: 5.1.0, failed version requirement: 5.0.0 Skipping 'com.salesforce' for android

After downgrading to cordova 5.0.0, "cordova/ionic run" doesn't do anything

darrenatyurgosky avatar Feb 08 '16 14:02 darrenatyurgosky

@darrenatyurgosky you can use $ ionic platform add [email protected] to add proper version. But even with proper version, I am still getting white screen, iOS simulator works well. There is no error on Chrome console. @jduelfer did you figure out the problem yet?

frankyanwang avatar Apr 26 '16 00:04 frankyanwang

Hi everybody. I have the same issue. Did you find the solution?

feda8891 avatar Jul 21 '16 22:07 feda8891

I'm having the same issue as well.. weird that this didn't get solved since December.

smukov avatar Sep 08 '16 06:09 smukov

Hi smukov. It is a matter of tools version. I've written an article about Ionic and SFDC where I show all the versions required for working. Give a check, maybe you can use it to solve your problem. Kind regards http://www.sales4k.com/sfdc/salesforce-mobile-ionic-project-android-ios/

follow us on @salesfork on twitter. We write about solutions

feda8891 avatar Sep 08 '16 07:09 feda8891