Skip to content

SFSDKCryptoUtils randomly throws error #3490

Description

@vvmusiienko

Details:

  1. Version of Mobile SDK Used: 9.1.0
  2. Issue found in Native App or Hybrid App: Native
  3. OS Version: 14,15
  4. Device: all
  5. Steps to reproduce: random
  6. Actual behaviour: SFSDKCryptoUtils randomly throws error.
  7. Expected Behavior: No errors should be thrown.
  8. Error Log: See below

From time to time we had sporadic error that threw from the SFSDK:
SFSDKCryptoUtils Error decrypting data with EC key. Error code: The operation could not be completed. (CryptoTokenKit error -2.)
or
SFSDKCryptoUtils Error decrypting data with EC key. Error code: The operation could not be completed. (CryptoTokenKit error -7.)
Which eventually would fail all SF Api requests with "INVALID_AUTH_HEADER" error while keeping user logged in.

This could happen during usage of the App, and we could not see particular patterns which precedes the error. Restarting the App won't help.
Also, we already have set KeychainHelper.setAccessibleAttribute(.afterFirstUnlock) in the app delegate during app startup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions