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

Mobile App Crash on Local Authentication - Salesforce Hybrid Remote SDK V11.1.0 #3714

Open
VenkataramanK opened this issue May 20, 2024 · 5 comments

Comments

@VenkataramanK
Copy link

VenkataramanK commented May 20, 2024

Please fill out the following details:

  1. Version of Mobile SDK Used: v11.1.0
  2. Issue found in Native App or Hybrid App: Hybrid (Remote)
  3. OS Version: 17.4.1
  4. Device: iPad14,6
  5. Steps to reproduce: Clicking icon of the application, app crashes
  6. Actual behavior: Clicking icon of the application, app crashing when initialise
  7. Expected Behavior: Clicking icon of the application, displaying home screen after biometric authentication
  8. Error Log: Attached Crash Log

AppLog.docx

@wmathurin
Copy link
Contributor

Could you try with the latest version of the Mobile SDK (12.0.1)? A number of bugs were addressed in that area.

@VenkataramanK
Copy link
Author

@wmathurin : Thanks wmathurin. i will try it out. Meanwhile could you please share some other bugs id related to this context. Also, is that confirmed the bug has been fixed in V12.0 anywhere in SDK or anybody confirmed this bug has been resolved in V12.0. Please share your response..that would be grateful.

@wmathurin
Copy link
Contributor

We have not seen your bug so I don't know for sure whether it was addressed but since we don't patch old versions of the SDK, we first need to confirm it is still happening in 12.0 before investigating further.

@VenkataramanK
Copy link
Author

@wmathurin : I got a crash log analysis from apple team, it declares salesforce sdk should not call some operations in main thread. can you please look into the below url and let us know, is they any quick fix or it can taken care in next release of SDK?
https://forums.developer.apple.com/forums/thread/753237?page=1#788137022

@VenkataramanK
Copy link
Author

@wmathurin - From the Crash Log we identified, our app's last Salesforce SDK version is 9.1.0. In the latest release of our app we used Salesforce SDK version 11.1.0.

Below is the block of code_(SFSDKSalesforceSDKUpgradeManager class inside + (void)upgrade method)_ getting crashed when attempting to check accessibilityAttribute from SFSDKKeychainHelper.

From your end, any assumptions/idea why the main thread hold for a while, would be welcome.

`
if (!lastVersion || [lastVersion compare:@"9.2.1" options:NSNumericSearch] == NSOrderedAscending) {
// 9.2.0 & 9.2.1 upgrade steps both need file and keychain access, if we don't have those,
// abort the upgrade so that it can rerun

        **if (![SFSDKKeychainHelper accessibilityAttribute]) {**
            // Only update accessible attribute if the app isn't setting it
            [SFLogger log:[self class] level:SFLogLevelError format:@"Attempt keychain attribute update"];
            SFSDKKeychainResult *result = [SFSDKKeychainHelper setAccessibleAttribute:KeychainItemAccessibilityAfterFirstUnlockThisDeviceOnly];
            if (result.status == errSecInteractionNotAllowed) {
                [SFLogger log:[self class] level:SFLogLevelError format:@"Upgrade step skipped because keychain access not allowed"];
                return;
            }
        }
        
        NSArray<NSString *> *filesWithCompleteProtection = [SFSDKSalesforceSDKUpgradeManager filesWithCompleteProtection];
        if ([filesWithCompleteProtection count] > 0) {
            if (![SFApplicationHelper sharedApplication].isProtectedDataAvailable) {
                [SFLogger log:[self class] level:SFLogLevelError format:@"Upgrade step skipped because files have complete protection and protected data isn't available"];
                return;
            }
            [SFSDKSalesforceSDKUpgradeManager updateDefaultProtection:filesWithCompleteProtection];
        }
    }

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants