GoogleSignIn-iOS icon indicating copy to clipboard operation
GoogleSignIn-iOS copied to clipboard

Running with Mac Catalyst doesn't launch browser to sign in.

Open apfritts opened this issue 2 years ago • 9 comments

Hi!

I'm trying to get Google sign-in to work with an iOS app + Mac Catalyst, but the Safari browser never launches on macOS in order to actually perform the sign-in. The same project works fine on an iPad simulator.

Modified Sample Project I have modified the sample project to try this out: https://github.com/LovebugLLC/GoogleSignIn-iOS/commit/c5ca41ffc14fdb978d24175cdda88fc524655dd4

Steps to reproduce my Sample Project edits

  1. Clone GoogleSignIn-iOS project
  2. open Samples/ObjC/SignInSample/SignInSample.xcodeproj
  3. Wait for Xcode to install dependencies
  4. Select "SignInSample" target
  5. Go to the "General" tab
  6. Add Mac Catalyst app
  7. Go to the "Signing & Capabilities" tab
  8. Select your Development Team
  9. Click "+ Capability", and add "Keychain Sharing"
  10. Run scheme SignInSample -> My Mac (Catalyst)

Steps to reproduce the issue, after running the app

  1. Tap "Sign in" and you'll see this screen: Screen Shot 2022-01-29 at 16 08 57
  2. Click "Continue"

Expected results Browser launches so I can log in

Actual results No browser shows up

Other notes If I change the run target to an iPad simulator, I am presented with the browser window and login just fine.

apfritts avatar Jan 30 '22 00:01 apfritts

Updates:

  1. switching your default browser to Chrome presents the signing window (in Chrome) correctly and lets a user continue
  2. I've tested this on the latest macOS 12.3 beta in Safari and it worked once but not twice
  3. After rebooting, it works fine. 🤷🏻‍♂️

Going to play with this a bit more and try to see what triggers it. I'll close by EOD if I can't figure it out and chalk it up to user error.

apfritts avatar Feb 07 '22 16:02 apfritts

Closing this since I can't reproduce it now.

apfritts avatar Feb 07 '22 16:02 apfritts

I am facing this issue on safari when running my iPad app on mac (Designed for iPad). Any update on this one?

idrees1378 avatar Mar 16 '22 10:03 idrees1378

@idrees1378 can you tell me what version of macOS you're seeing this on?

petea avatar Mar 16 '22 16:03 petea

***Update: I restarted my computer and now all seems to be working ok with Chrome opening up the Google Sign In screen. I wonder if a recent Chrome update caused the issue as I updated a day or two ago.
Love it when a restart just solves the issue. Wish all issues were solved so easily. ****

I am seeing this issue with my macCatalyst app. Chrome is set as my default browser. When I tap on the Google Sign In button on my app at the popup appears saying the App wants to use "google.com" sign in. Then when I tap continue, the chrome browser current window with tab shows, but no new Sign In window appears. If I then start Safari (if not opened) or shut down Safari and then start it, then the Google login window shows in a Safari popup login screen.
I am running Version 99.0.4844.74 (Official Build) (x86_64) of chrome. I am using macOS 12.3 and Xcode 13.3

This is a real problem as any macOS user that has Chrome set as the default browser will not see a Google Sign in screen unless the start Safari (if not running), or quit and restart Safari.

ghb101 avatar Mar 19 '22 17:03 ghb101

Any updates regarding this issue? In my case I have a plain AppKit macOS app and I am encountering the same exact bug.

vojtabohm avatar Dec 27 '22 16:12 vojtabohm

It ended up resolving for me by closing Chrome and then reopening Chrome. Also, perhaps check if there are any Chrome updates.

On Tue, Dec 27, 2022 at 8:19 AM Vojtěch Böhm @.***> wrote:

Any updates regarding this issue? In my case I have a plain AppKit macOS app and I am encountering the same exact bug.

— Reply to this email directly, view it on GitHub https://github.com/google/GoogleSignIn-iOS/issues/95#issuecomment-1366021474, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNVWTREHFD7UNLGZCOLA63WPMJHRANCNFSM5NDQHRMA . You are receiving this because you commented.Message ID: @.***>

ghb101 avatar Dec 27 '22 17:12 ghb101

The trouble is that this happens for my end users. They click "Sign in with Google" button, confirm the popup and no browser window is opened (until of course they restart Chrome). This is bad for the user experience and the users are churning because the browser window is not opening. Therefore this bug causes me to lose users... :/

vojtabohm avatar Dec 27 '22 17:12 vojtabohm

Yeah, I completely understand that. I have no idea if it has been fixed, as it's hard to replicate. I'm guessing not though. I tend to leave Chrome open for days or weeks at a time and not restart my computer often. So users like that are most likely still affected...although I do not know for sure.

On Tue, Dec 27, 2022 at 9:20 AM Vojtěch Böhm @.***> wrote:

The trouble is that this happens for my end users. They click "Sign in with Google" button, confirm the popup and no browser window is opened (until of course they restart Chrome). This is bad for the user experience and the users are churning because the browser window is not opening. Therefore this bug causes me to lose users... :/

— Reply to this email directly, view it on GitHub https://github.com/google/GoogleSignIn-iOS/issues/95#issuecomment-1366057899, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNVWTTWRV6IVYNGDPUISV3WPMQMTANCNFSM5NDQHRMA . You are receiving this because you commented.Message ID: @.***>

ghb101 avatar Dec 27 '22 17:12 ghb101