google / GoogleSignIn-iOS

Enables iOS and macOS apps to sign in with Google.
https://developers.google.com/identity/sign-in/ios
Apache License 2.0
501 stars 200 forks source link

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

Open trant opened 1 week ago

trant commented 1 week ago

Describe the bug

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

Additional context

stack_trace_phone.txt stack_trace_pad.txt

brnnmrls commented 3 days ago

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.

trant commented 2 days ago

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 ?

nrurnru commented 1 day ago

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