google / google/GoogleSignIn-iOS

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

Đang mở
#483 7 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Objective-C
Star
750
Fork
282
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
9

Mô tả

**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)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.