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

NSInternalInconsistencyException crash - Actions added to UIAlertController of style UIAlertActionStyleCancel must have a title when running in UIUserInterfaceIdiomPhone/Pad

Open trant opened this issue 1 year ago • 5 comments

Describe the bug

  • One of your localized strings for the cancel action is being returned as an empty string and crashing our app.
  • I suspect the issue is either on this line of code or this one

To Reproduce

When logging in your API needs to return the following error code. One of your locales might be returning that empty string. We support the following in our app: Image

Expected behavior App not to crash when that error is returned by your API

Screenshots

Environment

  • Device: iPhone 11, iPhone 12 Pro Max, iPhone 15 Pro Max, iPad Pro 13-inch (M4
  • OS: iOS 17.5.1, 17.6.1, iOS 18.0.1, iPad OS 17.5.1
  • Browser: [ e.g. Safari, Chrome, etc ]
  • GoogleSignIn SDK version: 7.1.0

Additional context

stack_trace_phone.txt stack_trace_pad.txt

trant avatar Oct 09 '24 12:10 trant

Hello! Thanks for submitting this issue. I'm curious if you're still running into this and if so, would you mind adding some repro steps or a recording of this happening? I'm unable to reproduce this on my end. I took a look at the two code snippets you sent and additionally when when the kScreenlockRequiredError is logged but didn't see anything unusual.

brnnmrls avatar Oct 17 '24 09:10 brnnmrls

Hey there 👋 Sadly we couldn't reproduce this either as I mentioned I can't make Charles Proxy working together with the Google sign/login flows to manipulate that error.

We now have less occurrences of the crash but it is sill happening. Some stats:

Image

Our peak of crashes happened on the 9th of October. In the last 30 days we have had 65 crash events affecting 22 users

OS/Device Distribution

Image Image `

Since this method can return a null string, would it be possible that this line of code and this handle the null value and replace it with an empty string ?

trant avatar Oct 18 '24 08:10 trant

I made https://github.com/google/GoogleSignIn-iOS/pull/373 about this over half year ago. But it doesn't got any attention.

nrurnru avatar Oct 19 '24 18:10 nrurnru

This issue is still happening for my corporate account today. Would like to use this as a bump to increase visibility.

chao2zhang avatar Feb 27 '25 20:02 chao2zhang

Hello! Going to spend some time on this this week. After some digging, I'm still not able to reproduce. Would anyone be able to share what some apps they experienced this crash on? Has anyone been able to reproduce locally?

I find it odd that something like -[GIDEMMErrorHandler cancelString] would return an empty string.

brnnmrls avatar Mar 04 '25 01:03 brnnmrls