google / google/GoogleSignIn-iOS

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

オープン
#483 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Objective-C
スター
750
フォーク
282
平均マージ
2日 15時間
マージ済み PR(30日)
9

説明

**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](https://github.com/google/GoogleSignIn-iOS/blob/main/GoogleSignIn/Sources/GIDEMMErrorHandler.m#L213) line of code or [this](https://github.com/google/GoogleSignIn-iOS/blob/main/GoogleSignIn/Sources/GIDEMMErrorHandler.m#L225) one

**To Reproduce**

When logging in your API needs to return the following [error code](https://github.com/google/GoogleSignIn-iOS/blob/main/GoogleSignIn/Sources/GIDEMMErrorHandler.m#L31C1-L32C1).
One of your locales might be returning that empty string. We support the following in our app: ![Image](https://github.com/user-attachments/assets/295a68fc-4a0b-4e45-be6e-8eb6724e3c1d)

**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](https://github.com/user-attachments/files/17308491/stack_trace_phone.txt)
[stack_trace_pad.txt](https://github.com/user-attachments/files/17308492/stack_trace_pad.txt)

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。