cieid-android-sdk icon indicating copy to clipboard operation
cieid-android-sdk copied to clipboard

An handled exception causes crash

Open Undermaken opened this issue 3 years ago • 0 comments

This PR adds the handling of exception that could cause crash This could happen when the authorization URL is not valid (it depends on how it is set from outside)

the unhandled exception

io.reactivex.exceptions.UndeliverableException: The exception could not be delivered to the consumer because it has already canceled/disposed the flow or the exception has nowhere to go to begin with.

more details https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling

how to reproduce

  • force the authorization URI to this invalid URI (setUrl(url))
https://idserver.servizicie.interno.gov.it/OpenApp?nextUrl=https://idserver.servizicie.interno.gov.it/idp/Authn/X509&name=conversation&value=e1s2&authnRequestString=_ec725700fad278600a2a&OpText=Inserisci le ultime 4 cifre del PIN ricevute insieme alla tua Carta di Identità Elettronica per accedere a https://app-backend.io.italia.it&imgUrl=https://idserver.servizicie.interno.gov.it/idpimages/cielogo.pngshould
  • set the PIN of your CIE card
  • read your NFC card
  • 💥

⛑️ special thanks to @fabriziofff to find this issue https://github.com/pagopa/io-cie-sdk/pull/37

Undermaken avatar Sep 21 '21 15:09 Undermaken