NSInternalInconsistencyException crash - Actions added to UIAlertController of style UIAlertActionStyleCancel must have a title when running in UIUserInterfaceIdiomPhone/Pad
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:
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
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.
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:
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
`
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 ?
I made https://github.com/google/GoogleSignIn-iOS/pull/373 about this over half year ago. But it doesn't got any attention.
This issue is still happening for my corporate account today. Would like to use this as a bump to increase visibility.
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.