amplify-swift: Unexpected error occurred with message: Could not retreive AWS credentials, credential value is nil or empty. #2527
Describe the bug
This is referencing the same bug listed here:
https://github.com/aws-amplify/amplify-swift/issues/2527
After releasing the update with the most up to date version of Amplify - it seems our effected users are still experiencing this issue. For reference - this is our Podfile.lock - please let me know if I am on an outdated/incorrect version.
PODS:
- Amplify (1.28.2):
- Amplify/Default (= 1.28.2)
- Amplify/Default (1.28.2)
- AmplifyPlugins/AWSCognitoAuthPlugin (1.28.2):
- AWSAuthCore (~> 2.28.0)
- AWSCognitoIdentityProvider (~> 2.28.0)
- AWSCognitoIdentityProviderASF (~> 2.28.0)
- AWSCore (~> 2.28.0)
- AWSMobileClient (~> 2.28.0)
- AWSPluginsCore (= 1.28.2)
- AWSAuthCore (2.28.3):
- AWSCore (= 2.28.3)
- AWSCognitoIdentityProvider (2.28.3):
- AWSCognitoIdentityProviderASF (= 2.28.3)
- AWSCore (= 2.28.3)
- AWSCognitoIdentityProviderASF (2.28.3):
- AWSCore (= 2.28.3)
- AWSCore (2.28.3)
- AWSMobileClient (2.28.3):
- AWSAuthCore (= 2.28.3)
- AWSCognitoIdentityProvider (= 2.28.3)
- AWSCognitoIdentityProviderASF (= 2.28.3)
- AWSCore (= 2.28.3)
- AWSPluginsCore (1.28.2):
- Amplify (= 1.28.2)
- AWSCore (~> 2.28.0)
- mamba (2.2.1)
- SwiftCheck (0.12.0)
- SwiftLint (0.49.1)
- SwiftUIPager (2.5.0)
Steps To Reproduce
As mentioned
https://github.com/aws-amplify/amplify-swift/issues/2527
Expected behavior
As mentioned https://github.com/aws-amplify/amplify-swift/issues/2527
Amplify Framework Version
1.28.2
Amplify Categories
Auth
Dependency manager
Cocoapods
Swift version
5.0
CLI version
4.41.2
Xcode version
14
Relevant log output
<details>
<summary>Log Messages</summary>
INSERT LOG MESSAGES HERE
```
Is this a regression?
Yes
Regression additional context
No response
Device
iPhone 14
iOS Version
iOS 16
Specific to simulators
No response
Additional context
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (10 by maintainers)
@michaeljajou @okharajpoot @edgillett Thanks for reporting and following up with additional information. We are working to reproduce this issue and identify the root cause.
In the meantime, a potential work-around would be to detect this state by checking to if both Auth.getCurrentUser() == nil and Auth.fetchAuthSession() -> isLoggedIn == true and then call Amplify.Auth.signOut() to return to a proper signed out state.
@atierian any update on this issue? Just received the same issue from another user after they purchased a new phone and restored from iCloud backup.