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

App crashing while connecting Yubikey when app is prompting to connect #1

Open
nickqlx opened this issue Dec 5, 2022 · 1 comment

Comments

@nickqlx
Copy link

nickqlx commented Dec 5, 2022

App is crashing in YKFAccessoryConnection.m file and Xcode is pointing it to the below method as
Thread 1: EXC_BAD_ACCESS (code=1, address=0x940e92a3b930)

  • (void)accessoryDidConnect:(NSNotification *)notification {
    EAAccessory *accessory = [[notification userInfo] objectForKey:EAAccessoryKey];
    if (![self shouldAcceptAccessory:accessory]) { // Here App is crashing
    return;
    }

Here I have attached a screenshot of the Xcode crash. I am using the latest library yubikit-ios-4.3.0 and using yubico-ctk-extension demo code. My project is in objective c so I linked the source in my project as mentioned in the Readme notes.

Note: I am not using Cocoapods or Swift package dependency. I have added the library manually and using it. Also, it only crashes when I try to connect 5Ci Yubikey after I get a prompt for connection. If Yubikey is already connected then the connection is established successfully also it worked with NFC Yubikey in all ways.

Screenshot 2022-12-05 at 12 51 38 PM

@nickqlx
Copy link
Author

nickqlx commented Dec 5, 2022

I found the problem. Somehow YKFAccessoryConnectionConfiguration object is released every time this scenario happens. Can you please help me to solve this? I don't understand what I am doing wrong.

Screenshot 2022-12-05 at 5 57 19 PM

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

1 participant