chromeos_smart_card_connector icon indicating copy to clipboard operation
chromeos_smart_card_connector copied to clipboard

[pcsc] Retry init on more errors, try USB reset

Open emaxx-google opened this issue 1 year ago • 4 comments

Change the init retry mechanism to be triggered on any reader initialization error, as opposed to only doing it on openDevice/claimInterface errors. Additionally, attempt resetting the USB device after a few unsuccessful retries.

This should fix occasional flaky errors we see in the field, when there's a temporary conflict between the in-session and the login-screen instances of Smart Card Connector, which may cause failures at various USB functions and accidentally receiving a reply for a request sent by a different extension ("Invalid frame detected").

emaxx-google avatar May 14 '24 11:05 emaxx-google

One of the tests failed - seems like a real problem with composite devices. Looking into it.

emaxx-google avatar May 14 '24 13:05 emaxx-google

Continuous Integration: All tests passed. C/C++ test coverage: 73.58% lines.

github-actions[bot] avatar May 14 '24 16:05 github-actions[bot]

One of the tests failed - seems like a real problem with composite devices. Looking into it.

Fixed now.

emaxx-google avatar May 14 '24 16:05 emaxx-google

Continuous Integration: All tests passed. C/C++ test coverage: 73.58% lines.

github-actions[bot] avatar May 15 '24 12:05 github-actions[bot]