google / google/GoogleSignIn-iOS

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

Abierto
#483 7 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
Objective-C
Estrellas
750
Forks
282
Merge medio
2 d 15 h
PR fusionados (30 d)
9

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.