Aws-sdk-ios: It's not possible to cast signIn errors to AWSMobileClientError

Created on 23 Nov 2018  路  12Comments  路  Source: aws-amplify/aws-sdk-ios

When the signIn function fails of the AWSMobileClient, the SDK is not trying to map the error using the exiting helper called "getMobileError". So, it's not posible to cast the error object to AWSMobileClientError when the sign In function fails and it implies that it's more difficult to handle the errors.

To Reproduce
Steps to reproduce the behavior:

  1. Try to sign In using the AWSMobileClient with an incorrect account.
  2. Try to cast the error to AWSMobileClientError

Which AWS service(s) are affected?
AWS Cognito
AWS MobileClient

Expected behavior
When an error occurs, I expect that I can cast the error to AWSMobileClientError

Environment(please complete the following information):

  • SDK Version: AWSMobileClient -> 2.7.3
  • Dependency Manager: Cocoapods
  • Swift Version : 4.1

Device Information (please complete the following information):

  • Device: iPhoneX Simulator
  • iOS Version: OS 12.1
bug mobile client

Most helpful comment

Is there any documentation that actually lets us know what these errors mean? I've been searching and cannot find any. I'm getting (AWSMobileClient.AWSMobileClientError error 26.).

What is that error?

All 12 comments

Hello @jodafm

I can acknowledge this bug. Thanks for submitting a PR! This will be merged in a future release.

Thanks,
Rohan

I still have the same problem, i don't have more information.

[NetworkInfo] Signal strength query returned error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied", descriptor:
The operation couldn鈥檛 be completed. (AWSMobileClient.AWSMobileClientError error 8.)

@tmjordan the error which you are seeing is different from the purpose of this issue. You are getting that error likely due to you not having access to unauthenticated identities. Please open a different issue with the details.

Hello,

This issue is now fixed in 2.7.4 release. Please let us know if you continue to face issues.

Thanks,
Rohan

Hello, i'm using the AWSMobileClient version ~> 2.8.0 but i still have the same problem. When i have an error from the singin method (i don't know from other methods), i'm unable to cast the error. On error object i only have localizedDescription method that give to me this message "Error The operation couldn鈥檛 be completed. (AWSMobileClient.AWSMobileClientError error 14.)" no more!

Thanks
Alessandro

Looks like you create a separate issue for this: https://github.com/aws-amplify/aws-sdk-ios/issues/1150 If that's right, let's track your issue there.

I have the same error and I use 2.7.4 version: [NetworkInfo] Signal strength query returned error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied", descriptor:

That Signal strength error can be dismissed with this:
https://stackoverflow.com/questions/37800790/hide-strange-unwanted-xcode-logs

Nevertheless, those "AWSMobileClientError 0,14,18 i don't know all the numbers" remain, even with version 2.9.3

Hello, guys. How are you today?
I have just got same error.
When I tried to login with AWS Cognito, I got following error.
(AWSMobileClient.AWSMobileClientError error 29.)

I need your urgent help.
Thanks.

@Goldenwork2016 Can you open a new issue with your details (repro steps, version of SDK, iOS & device versions) so we can investigate? Repro steps and details of your setup (how are you logging in, what auth methods are you set up to use, etc) will be super helpful.

The same error here today:

[NetworkInfo] Signal strength query returned error: 
Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied", 
descriptor: <CTServiceDescriptor 0x280d7ad80, domain=1, instance=2>

Is there any documentation that actually lets us know what these errors mean? I've been searching and cannot find any. I'm getting (AWSMobileClient.AWSMobileClientError error 26.).

What is that error?

Was this page helpful?
0 / 5 - 0 ratings