Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT reconnect in background getIdentityRef error: -25308 #3423

Closed
mikeper031 opened this issue Feb 7, 2021 · 6 comments
Closed

MQTT reconnect in background getIdentityRef error: -25308 #3423

mikeper031 opened this issue Feb 7, 2021 · 6 comments
Assignees
Labels
closing soon iot Issues related to the IoT SDK pending-community-response Issue is pending response from the issue requestor

Comments

@mikeper031
Copy link

mikeper031 commented Feb 7, 2021

Hi. We are experiencing connection issues using the IotDataManager mqtt API in the following circumstances

  1. connect the app to IOT using iotDataManager.connect(...) when app in foreground - success publish/subscribe
  2. issue disconnect after a while when app is in foreground
  3. issue a connection after a while when the app is in background using iotDataManager.connect(...) i get the error:
    getIdentityRef error: -25308
    Could not find SecIdentityRef
  4. issue a connection after a while when app is in background using iotDataManager.connectUsingWebSocket(...) - success publish/subscribe

AWS IOS SDK version: 2.21.0

@royjit royjit added iot Issues related to the IoT SDK pending-triage Issue is pending triage labels Feb 10, 2021
@gadget-man
Copy link

gadget-man commented May 12, 2022

I'm having exactly the same issue (AWS iOS SDK version : 2.27.6. I'd love to know if this issue was ever resolved (or a workaround identified)

I think it's somehow linked to needing to save the SecIdentityRef in the keychain using kSecAttrAccessible : kSecAttrAccessibleAfterFirstUnlock so that it's accessible from the background, but I can't work out where this needs to be added.

@royjit royjit self-assigned this May 13, 2022
@gadget-man
Copy link

Searching around on the internet for similar issues from others, I also wonder whether this is relevant:
evgenyneu/keychain-swift#78 (comment)

@harsh62
Copy link
Member

harsh62 commented May 16, 2022

@gadget-man Our team is investigating the issue the will provide an update soon.

@gadget-man
Copy link

@harsh62 are you able to provide any update (or timescales) for this fix? Currently, Apple Watch apps that need to call the AWS iOS SDK on their paired phone in the background are unable to work.

@royjit
Copy link
Contributor

royjit commented Jun 1, 2022

We have a PR to add accessibility level to the IoT SDK - #4159 , We will let you know here when this is released, in the mean time you can try this dev branch royjit.keychain and test.

@royjit
Copy link
Contributor

royjit commented Jun 3, 2022

The change has been released in version 2.27.10 https://github.com/aws-amplify/aws-sdk-ios/releases/tag/2.27.10

@royjit royjit added pending-community-response Issue is pending response from the issue requestor closing soon and removed pending-triage Issue is pending triage labels Jun 3, 2022
@ameter ameter closed this as completed Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closing soon iot Issues related to the IoT SDK pending-community-response Issue is pending response from the issue requestor
Projects
None yet
Development

No branches or pull requests

5 participants