Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Google Plus window not loading! #82

Open
ullasmohan opened this issue Jul 21, 2015 · 7 comments
Open

Google Plus window not loading! #82

ullasmohan opened this issue Jul 21, 2015 · 7 comments

Comments

@ullasmohan
Copy link

Am using cordova-plugin-googleplus plugin for my "ionic iOS" app.
But when i try to open google plus login i always getting an error like

"WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: Your app must support the following URL schemes: com.app.test, com.googleusercontent.apps.341564304804-34qnbg69vdmfon5b0ja5tutqta3n3l9h"

I feel i missed something but i lost my 12 hours for make it works but still having same issue..
please help.. :-(

@bau720123
Copy link

hi @ullasmohan
you have the 100% same problem just like me
#104
hope @EddyVerbruggen can solve this

@EddyVerbruggen
Copy link
Owner

Hi @ullasmohan can you check your app's .plist file in platforms/ios? It should contain a section with CFBundleURLTypes values.

Also, on iOS9 it seems we also need a section with LSApplicationQueriesSchemes which I will add later today.

@bau720123
Copy link

hi @EddyVerbruggen
thanks your reply and sorry for the bother
I feedback my Info.plist content first

<key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>fb197653916921532</string>
            </array>
        </dict>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLName</key>
            <string>io.cordova.hellocordova</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>io.cordova.hellocordova</string>
            </array>
        </dict>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLName</key>
            <string>REVERSED_CLIENT_ID</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>com.googleusercontent.apps.909119150051-0g74v62g7ifqf1qflvejg1lvf62ih16j</string>
            </array>
        </dict>
    </array>

and...you can search the keyword "REVERSED_CLIENT_ID"、"CFBundleURLSchemes"

EddyVerbruggen added a commit that referenced this issue Sep 13, 2015
#113 Not getting user extras (e.g. imageUrl) in callback object. Re-added imageUrl for iOS
@EddyVerbruggen
Copy link
Owner

@bau720123 Perhaps Facebook is clashing - can you remove that and try again? Also, please try the latest version which adds whitelisting, but that's really only relevant for iOS9.

@bau720123
Copy link

hi @EddyVerbruggen
after I remove the Facebook plugin from config.xml

<gap:plugin name="nickreed.com.phonegap.plugins.facebookconnect" source="plugins.cordova.io" version="0.11.1">
 <param name="APP_ID" value="111112222333" />
 <param name="APP_NAME" value="myappname" />
</gap:plugin>

my Info.plist content become these

<key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLName</key>
            <string>com.littlebau.phonegap</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>com.littlebau.phonegap</string>
            </array>
        </dict>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLName</key>
            <string>REVERSED_CLIENT_ID</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>com.googleusercontent.apps.909119150051-0g74v62g7ifqf1qflvejg1lvf62ih16j</string>
            </array>
        </dict>
    </array>

finally...
the "login" and "trySilentLogin" method all work perfect in iOS

@Moussawi7
Copy link

Hi @EddyVerbruggen ,
I already installed the latest version, and encountered exactly the same issue.

this is my .plist file:

<key>CFBundleURLTypes</key>
    <array>
      <dict>
        <key>CFBundleTypeRole</key>
        <string>Editor</string>
        <key>CFBundleURLName</key>
        <string>com.xxx.xxxApp</string>
        <key>CFBundleURLSchemes</key>
        <array>
          <string>com.xxx.xxxApp</string>
        </array>
      </dict>
      <dict>
        <key>CFBundleTypeRole</key>
        <string>Editor</string>
        <key>CFBundleURLName</key>
        <string>REVERSED_CLIENT_ID</string>
        <key>CFBundleURLSchemes</key>
        <array>
          <string>com.googleusercontent.apps.1234567890-abcdefghijklmnopqrstuvwxyz</string>
        </array>
      </dict>
      <dict>
        <key>CFBundleTypeRole</key>
        <string>Editor</string>
        <key>CFBundleURLName</key>
        <string>com.xxx.xxxApp</string>
        <key>CFBundleURLSchemes</key>
        <array>
          <string>com.xxx.xxxApp</string>
        </array>
      </dict>
      <dict>
        <key>CFBundleTypeRole</key>
        <string>Editor</string>
        <key>CFBundleURLName</key>
        <string>REVERSED_CLIENT_ID</string>
        <key>CFBundleURLSchemes</key>
        <array>
          <string>com.googleusercontent.apps.1234567890-abcdefghijklmnopqrstuvwxyz</string>
        </array>
      </dict>
    </array>
    <key>LSApplicationQueriesSchemes</key>
    <array>
      <string>com.xxx.xxxApp</string>
      <string>com.googleusercontent.apps.1234567890-abcdefghijklmnopqrstuvwxyz</string>
      <string>com-google-gidconsent</string>
      <string>com-google-gidconsent-google</string>
      <string>com.google.gppconsent.2.4.0</string>
      <string>com.google.gppconsent.2.4.1</string>
    </array>

it seem that a part is repeated.
Thank you.

shinyMetilda pushed a commit to shinyMetilda/cordova-plugin-googleplus that referenced this issue Mar 22, 2016
EddyVerbruggen#113 Not getting user extras (e.g. imageUrl) in callback object. Re-added imageUrl for iOS
@sammugg
Copy link

sammugg commented Mar 30, 2016

Hey @ullasmohan and @bau720123,

I just merged a significant update yesterday that updated the Android side to use Google Sign-In and refactored plugin usage. The current documentation is up to date with those changes. You should check it out. Let me know if you have any questions!

~Sam
P.S. If your issue gets resolved, please close it!

pwbs pushed a commit to pwbs/cordova-plugin-googleplus that referenced this issue Jun 27, 2017
# This is the 1st commit message:
# This is a combination of 3 commits.
# This is the 1st commit message:
# This is a combination of 2 commits.
# This is the 1st commit message:

# This is a combination of 2 commits.
# This is the 1st commit message:

# This is a combination of 2 commits.
# This is the 1st commit message:

# This is a combination of 2 commits.
# This is the 1st commit message:

# This is a combination of 7 commits.
# This is the 1st commit message:
# This is a combination of 3 commits.
# This is the 1st commit message:
# This is a combination of 3 commits.
# This is the 1st commit message:
# This is a combination of 2 commits.
# This is the 1st commit message:

# This is a combination of 6 commits.
# This is the 1st commit message:
# This is a combination of 10 commits.
# This is the 1st commit message:
Finished implementation

# The commit message EddyVerbruggen#2 will be skipped:

#	Attempt at some decent documentation

# The commit message EddyVerbruggen#3 will be skipped:

#	Attempt at some decent documentation

# The commit message EddyVerbruggen#4 will be skipped:

#	Added iOS screenshots

# The commit message EddyVerbruggen#5 will be skipped:

#	cleanup

# The commit message EddyVerbruggen#6 will be skipped:

#	Added a permission for Android preventing a crash on some devices

# The commit message EddyVerbruggen#7 will be skipped:

#	Cleanup

# The commit message EddyVerbruggen#8 will be skipped:

#	iOSApiKey is for iOS, not for Android :)

# The commit message EddyVerbruggen#9 will be skipped:

#	EddyVerbruggen#3 redirect url not handled when redirected from Google+ app on iOS

# The commit message EddyVerbruggen#10 will be skipped:

#	EddyVerbruggen#6 ADD Birthday and AgeRange

# The commit message EddyVerbruggen#1 will be skipped:

#	EddyVerbruggen#6 ADD Birthday and AgeRange (wasn't really happy with the PR, so I changed it a bit and added iOS support). Thanks for the help!

# The commit message EddyVerbruggen#2 will be skipped:

#	EddyVerbruggen#6 addtional checks on Android

# The commit message EddyVerbruggen#3 will be skipped:

#	Add userId property to let developer to get Google user ID for business logic.

# The commit message EddyVerbruggen#4 will be skipped:

#	EddyVerbruggen#7, needed to manually merge

# The commit message EddyVerbruggen#5 will be skipped:

#	EddyVerbruggen#7, needed additional flag

# The commit message EddyVerbruggen#6 will be skipped:

#	Missing dependency for iOS 8 SDK

# The commit message EddyVerbruggen#7 will be skipped:

#	Android - play services jar fixed version

# The commit message EddyVerbruggen#8 will be skipped:

#	Android playservices updated to 21

# The commit message EddyVerbruggen#9 will be skipped:

#	Update README.md
#
#	Fix typo. I believe this is for iOS only right now and not Android yet if I'm not mistaken.

# The commit message EddyVerbruggen#10 will be skipped:

#	A note about Android config

# The commit message EddyVerbruggen#1 will be skipped:

#	EddyVerbruggen#15 added troubleshooting section

# The commit message EddyVerbruggen#2 will be skipped:

#	Adding idToken to Android
#
#	Based on this gist [1] I'm adding support for getting the auth oauth2 token
#	that Google generates after the user accepts the login.
#
#	[1] https://gist.github.com/ianbarber/5170508

# The commit message EddyVerbruggen#3 will be skipped:

#	Introducing idToken and oauthToken
#
#	Allow the user to configure the service so any of the 3 possibles can be reached
#	when the user passes webApiKey in the credentials dictionary will get a JWT token
#	id, if androidApiKey is set in the credentials then an off-line capable oauth2
#	token bearer will be generated in the oauthToken value, while if no argument is
#	set a simple oauth2 token will get generated.

# The commit message EddyVerbruggen#4 will be skipped:

#	Adding extra necessary permissions

# The commit message EddyVerbruggen#5 will be skipped:

#	EddyVerbruggen#12 oauthToken for iOS

# The commit message EddyVerbruggen#6 will be skipped:

#	EddyVerbruggen#22 User-cancelled login on iOS - Neither the success nor error callbacks are called

# The commit message EddyVerbruggen#7 will be skipped:

#	EddyVerbruggen#26 Preparing submission to plugins.cordova.io

# The commit message EddyVerbruggen#8 will be skipped:

#	Prep plugin registry release (as tarball, to circumvent an npm symlink issue)

# The commit message EddyVerbruggen#9 will be skipped:

#	Added a warning about the current state of the plugman publish command

# The commit message EddyVerbruggen#10 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#1 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#2 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#3 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#4 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#5 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#6 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#7 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#8 will be skipped:

#	EddyVerbruggen#37 Google+ login using web browser is rejected on the App Store.

# The commit message EddyVerbruggen#9 will be skipped:

#	From Cordova 4 setActivityResultCallback is on CordovaInterfaceImpl

# The commit message EddyVerbruggen#10 will be skipped:

#	Not importing android-support-v4

# The commit message EddyVerbruggen#1 will be skipped:

#	EddyVerbruggen#45 login and trySilendLogin now return userdata on Android

# The commit message EddyVerbruggen#2 will be skipped:

#	Update plugin.xml

# The commit message EddyVerbruggen#3 will be skipped:

#	Update plugin.xml

# The commit message EddyVerbruggen#4 will be skipped:

#	EddyVerbruggen#56 new playservices version

# The commit message EddyVerbruggen#5 will be skipped:

#	npm

# The commit message EddyVerbruggen#6 will be skipped:

#	or not to npm..

# The commit message EddyVerbruggen#7 will be skipped:

#	replace deprecated dependency plugin

# The commit message EddyVerbruggen#8 will be skipped:

#	New ID, published to npm

# The commit message EddyVerbruggen#9 will be skipped:

#	New ID, published to npm

# The commit message EddyVerbruggen#10 will be skipped:

#	PGB note

# The commit message EddyVerbruggen#1 will be skipped:

#	Update dependencies to gradle format to fix EddyVerbruggen#64

# The commit message EddyVerbruggen#2 will be skipped:

#	bump

# The commit message EddyVerbruggen#3 will be skipped:

#	Switch to Google Sign-In SDK for iOS
#
#	This should fix Apple rejection from popping up Safari.
#	Will update README soon.
#	Update version to 3.0.0.

# The commit message EddyVerbruggen#4 will be skipped:

#	Allowed scope to be passed into signin

# The commit message EddyVerbruggen#5 will be skipped:

#	Attempt to fix offline screen

# The commit message EddyVerbruggen#6 will be skipped:

#	Cleanup for google plus connection with scopes and offline access

# The commit message EddyVerbruggen#7 will be skipped:

#	Fixed REVERSED_CLIENT_ID variable

# The commit message EddyVerbruggen#8 will be skipped:

#	Invalid quotes (according to my IDE)

# The commit message EddyVerbruggen#9 will be skipped:

#	Made ios use scopes

# The commit message EddyVerbruggen#10 will be skipped:

#	Added server auth code logic for ios

# The commit message EddyVerbruggen#1 will be skipped:

#	Made server auth code not throw a null reference

# The commit message EddyVerbruggen#2 will be skipped:

#	Plugin update to 4.0.0:
#	- Changed the ID to cordova-plugin-googleplus (again)
#	- Wider Android dependent fwk compatibility
#	- Documented scopes feature
#	- Removed the need for the iosApiKey

# The commit message EddyVerbruggen#3 will be skipped:

#	Fixed npm reference in doc

# The commit message EddyVerbruggen#4 will be skipped:

#	EddyVerbruggen#95 Crash when using isAvailable method before login

# The commit message EddyVerbruggen#5 will be skipped:

#	access_token fix for iOS
#
#	The access_token will now be returned as: accessToken

# The commit message EddyVerbruggen#6 will be skipped:

#	* generate both oauthToken and idToken

# The commit message EddyVerbruggen#7 will be skipped:

#	Added an "offline" parameter to enable getting a server auth token even without androidApiKey.

# The commit message EddyVerbruggen#8 will be skipped:

#	Added info to README about the API key for serverClientId.

# The commit message EddyVerbruggen#9 will be skipped:

#	Google decided to change a link without adding a nice redirect

# The commit message EddyVerbruggen#10 will be skipped:

#	Enabled getting serverAuthCode when the webApiKey param is set.

# The commit message EddyVerbruggen#2 will be skipped:

#	EddyVerbruggen#108 Added an option to generate access token for offline access on Android

# The commit message EddyVerbruggen#3 will be skipped:

#	EddyVerbruggen#82 Google Plus window not loading!
#	EddyVerbruggen#113 Not getting user extras (e.g. imageUrl) in callback object. Re-added imageUrl for iOS

# The commit message EddyVerbruggen#4 will be skipped:

#	Android: Ensure a new one time token on each login
#
#	When using the androidApiKey parameter a short-lived one time token
#	is generated, which can then be passed to the server where it can be
#	exchanged for a proper access and refresh token. Since all tokens get
#	cached by GoogleAuthUtil logging in a second time will cause the token
#	to be invalid if it was used before or some time has passed.

# The commit message EddyVerbruggen#5 will be skipped:

#	EddyVerbruggen#118 App Crash

# The commit message EddyVerbruggen#6 will be skipped:

#	EddyVerbruggen#147 Android fwk tags

# The commit message EddyVerbruggen#7 will be skipped:

#	Android 6.0
#
#	Added call to request permission

# The commit message EddyVerbruggen#8 will be skipped:

#	EddyVerbruggen#149 Android 6.0

# The commit message EddyVerbruggen#9 will be skipped:

#	IOS Build fails with compilation errors EddyVerbruggen#150

# The commit message EddyVerbruggen#10 will be skipped:

#	IOS Build fails with compilation errors EddyVerbruggen#150

# The commit message EddyVerbruggen#1 will be skipped:

#	Android: Gets a new offline token on each login
#
#	Based on EddyVerbruggen#119
#	I tested this on an app I'm working where every authentication attempt returned the same invalid token. After applying this change, the authentication works fine each time.

# The commit message EddyVerbruggen#2 will be skipped:

#	Get refreshToken on iOS sign in
#
#	The refresh token is a useful token for third party apps, to refresh the access token and keep users logged in.

# The commit message EddyVerbruggen#3 will be skipped:

#	Update README.md

# The commit message EddyVerbruggen#4 will be skipped:

#	Updated Google Sign-In iOS SDK to 2.4.0

# The commit message EddyVerbruggen#5 will be skipped:

#	Enabled GoogleOpenSource.framework explicitely

# The commit message EddyVerbruggen#6 will be skipped:

#	EddyVerbruggen#153 Ios updated google framework

# The commit message EddyVerbruggen#2 will be skipped:

#	EddyVerbruggen#168 IOS Build failure with this plugin

# The commit message EddyVerbruggen#2 will be skipped:

#	Added a few npm keywords

# The commit message EddyVerbruggen#3 will be skipped:

#	Update GooglePlus.java
#
#	Fix for app crash on android 6

# The commit message EddyVerbruggen#2 will be skipped:

#	A note about failing Android builds

# The commit message EddyVerbruggen#3 will be skipped:

#	Adding a link to how to use keytool

# The commit message EddyVerbruggen#2 will be skipped:

#	Update README.md

# The commit message EddyVerbruggen#3 will be skipped:

#	Update README.md

# The commit message EddyVerbruggen#4 will be skipped:

#	Google success login redirects to google.com issue fixed

# The commit message EddyVerbruggen#5 will be skipped:

#	iOS readme updated to include latest Google SDK changes

# The commit message EddyVerbruggen#6 will be skipped:

#	Update README.md

# The commit message EddyVerbruggen#7 will be skipped:

#	Update README.md

# The commit message EddyVerbruggen#2 will be skipped:

#	Remove OpenSource and Plus libraries.

# The commit message EddyVerbruggen#2 will be skipped:

#	ignoring some more files

# The commit message EddyVerbruggen#2 will be skipped:

#	Google SignIn framework bump

# The commit message EddyVerbruggen#2 will be skipped:

#	ignore

# The commit message EddyVerbruggen#2 will be skipped:

#	testing sth

# The commit message EddyVerbruggen#3 will be skipped:

#	testing sth

# The commit message EddyVerbruggen#2 will be skipped:

#	new demos for firebase and ionic2+firebase

# The commit message EddyVerbruggen#3 will be skipped:

#	typo fix
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants