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

Unable to import account from Keycard #14673

Closed
jakubgs opened this issue May 9, 2024 · 7 comments · Fixed by #14721
Closed

Unable to import account from Keycard #14673

jakubgs opened this issue May 9, 2024 · 7 comments · Fixed by #14721
Assignees
Labels
bug Something isn't working E:Desktop Keycard Bug Bug found after initial keycard development
Milestone

Comments

@jakubgs
Copy link
Member

jakubgs commented May 9, 2024

Description

When I attempt to import key from Keycard and I get to the screen that asks for card PIN I put it in and the nothing happens

image

The screen shows no new button, and pressing enter does nothing. It is possible to use backspace to undo input:

But re-adding it doesn't solve the issue. Even using a wrong password shows no change in UI.

Steps to reproduce

Try to import account from Keycard on current master or release.

Additional Info

I tested this both with v2.28.1-rc.6 release and master build from d703d0:
https://ci.infra.status.im/job/status-desktop/job/master/3549/

@jakubgs jakubgs added bug Something isn't working E:Desktop Keycard Bug Bug found after initial keycard development labels May 9, 2024
@jakubgs
Copy link
Member Author

jakubgs commented May 10, 2024

An interesting point is, if I kill the app stuck at the Enter Keycard PIN screen and then start it again it looks like import worked:

image

So it seems to me like this is a UI bug.

@jakubgs
Copy link
Member Author

jakubgs commented May 10, 2024

Here's log from when it gets stuck:

keycard - listing readers
keycard - waiting for card
keycard - card found at index 0
keycard - using reader ACS ACR39U ICC Reader 00 00
keycard - card found at index 0
keycard - using reader ACS ACR39U ICC Reader 00 00
keycard - card protocol T1
keycard - card protocol T1
keycard - listing readers
keycard - waiting for card
keycard - card found at index 0
keycard - using reader ACS ACR39U ICC Reader 00 00
keycard - card protocol T1


WRN 2024-05-10 08:48:20.619+02:00 Error decoding signal                      topics="signals-manager" tid=1023216 file=signals_manager.nim:49 err="Unknown signal received: mediaserver.started"
WRN 2024-05-10 08:48:21.920+02:00 Error decoding signal                      topics="signals-manager" tid=1023216 file=signals_manager.nim:49 err="Unknown signal received: mediaserver.started"
INF 2024-05-10 08:48:28.005+02:00 received                                   topics="signals-manager" tid=1023216 file=messages.nim:72 signal=messages.new messageID=0xb9ab14c1ae9fe3e92176b332d93ef9529c3c1f94e55b54c19d4e105245b40007
INF 2024-05-10 08:48:28.005+02:00 received                                   topics="signals-manager" tid=1023216 file=messages.nim:72 signal=messages.new messageID=0xb2492b02ca2832ccdf342ae44b78c1e4a33d8a7cf57c8c4f0a0e5f91d5bbe1ae

The gap in the logs is where I do the PIN entry.

@jakubgs
Copy link
Member Author

jakubgs commented May 10, 2024

Here's the same log but with --log-level=DEBUG flag used:

keycard - listing readers
keycard - waiting for card
keycard - card found at index 0
keycard - using reader ACS ACR39U ICC Reader 00 00
keycard - card protocol T1
DBG 2024-05-10 09:06:43.487+02:00 on_keycard_response                        topics="app-controller" tid=1044887 file=module.nim:474 currFlow=FirstRunOldUserKeycardImport currState=KeycardPluginReader
DBG 2024-05-10 09:06:43.494+02:00 on_keycard_response - set state            topics="app-controller" tid=1044887 file=module.nim:479 setCurrFlow=FirstRunOldUserKeycardImport setCurrState=KeycardRecognizedKeycard
DBG 2024-05-10 09:06:44.436+02:00 primary_action                             topics="app-controller" tid=1044887 file=module.nim:205 currFlow=FirstRunOldUserKeycardImport currState=KeycardRecognizedKeycard
DBG 2024-05-10 09:06:44.443+02:00 primary_action - set state                 topics="app-controller" tid=1044887 file=module.nim:211 setCurrFlow=FirstRunOldUserKeycardImport setCurrState=KeycardEnterPin
DBG 2024-05-10 09:06:49.760+02:00 primary_action                             topics="app-controller" tid=1044887 file=module.nim:205 currFlow=FirstRunOldUserKeycardImport currState=KeycardEnterPin
DBG 2024-05-10 09:06:50.198+02:00 primary_action                             topics="app-controller" tid=1044887 file=module.nim:205 currFlow=FirstRunOldUserKeycardImport currState=KeycardEnterPin
DBG 2024-05-10 09:06:50.742+02:00 primary_action                             topics="app-controller" tid=1044887 file=module.nim:205 currFlow=FirstRunOldUserKeycardImport currState=KeycardEnterPin
DBG 2024-05-10 09:06:51.392+02:00 primary_action                             topics="app-controller" tid=1044887 file=module.nim:205 currFlow=FirstRunOldUserKeycardImport currState=KeycardEnterPin
DBG 2024-05-10 09:06:51.674+02:00 primary_action                             topics="app-controller" tid=1044887 file=module.nim:205 currFlow=FirstRunOldUserKeycardImport currState=KeycardEnterPin
DBG 2024-05-10 09:06:52.061+02:00 primary_action                             topics="app-controller" tid=1044887 file=module.nim:205 currFlow=FirstRunOldUserKeycardImport currState=KeycardEnterPin
DBG 2024-05-10 09:06:54.616+02:00 on_keycard_response                        topics="app-controller" tid=1044887 file=module.nim:474 currFlow=FirstRunOldUserKeycardImport currState=KeycardEnterPin
DBG 2024-05-10 09:06:54.618+02:00 Account saved succesfully                  topics="accounts-service" tid=1044887 file=service.nim:177
WRN 2024-05-10 09:06:56.162+02:00 Error decoding signal                      topics="signals-manager" tid=1044887 file=signals_manager.nim:49 err="Unknown signal received: mediaserver.started"
DBG 2024-05-10 09:06:56.860+02:00 NewBE_callPrivateRPC                       topics="rpc" tid=1044887 file=core.nim:27 rpc_method=wakuext_startMessenger
WRN 2024-05-10 09:06:57.557+02:00 Error decoding signal                      topics="signals-manager" tid=1044887 file=signals_manager.nim:49 err="Unknown signal received: mediaserver.started"
INF 2024-05-10 09:07:02.643+02:00 received                                   topics="signals-manager" tid=1044887 file=messages.nim:72 signal=messages.new messageID=0xb9ab14c1ae9fe3e92176b332d93ef9529c3c1f94e55b54c19d4e105245b40007
INF 2024-05-10 09:07:02.643+02:00 received                                   topics="signals-manager" tid=1044887 file=messages.nim:72 signal=messages.new messageID=0xb2492b02ca2832ccdf342ae44b78c1e4a33d8a7cf57c8c4f0a0e5f91d5bbe1ae

@jakubgs
Copy link
Member Author

jakubgs commented May 10, 2024

Here's logs with a dev build:

keycard - listing readers
keycard - waiting for card
keycard - card found at index 0
keycard - using reader ACS ACR39U ICC Reader 00 00
keycard - card protocol T1
keycard - listing readers
keycard - waiting for card
keycard - card found at index 0
keycard - using reader ACS ACR39U ICC Reader 00 00
keycard - card protocol T1
keycard - listing readers
keycard - waiting for card
keycard - card found at index 0
keycard - using reader ACS ACR39U ICC Reader 00 00
keycard - card protocol T1
DBG 2024-05-10 10:25:35.049+02:00 keycard_signal                             topics="keycard-service" tid=1107619 file=service.nim:113 response="{\"type\":\"keycard.flow-result\",\"event\":{\"instance-uid\":\"57410ca9739b3c1f3eec5698c4bb4f61\",\"key-uid\":\"e41cd39a7527a08469fd7fcc763a2a304169710e34fde43cd11823d8f488d8b6\"}}"
DBG 2024-05-10 10:25:35.049+02:00 on_keycard_response                        topics="app-controller" tid=1107619 file=module.nim:474 currFlow=FirstRunOldUserKeycardImport currState=KeycardRepeatPin
DBG 2024-05-10 10:25:35.049+02:00 keycardCancelFlow                          topics="keycard-service" tid=1107619 file=service.nim:180 kcServiceCurrFlow=NoFlow response="cannot cancel idle flow"
DBG 2024-05-10 10:25:35.049+02:00 keycardStartFlow                           topics="keycard-service" tid=1107619 file=service.nim:163 kcServiceCurrFlow=StoreMetadata payload="{\"pin\":\"000000\",\"card-name\":\"jakubgs\",\"wallet-paths\":[\"m/44'/60'/0'/0/0\"]}" response=ok
keycard - listing readers
keycard - waiting for card
keycard - card found at index 0
keycard - using reader ACS ACR39U ICC Reader 00 00
keycard - card protocol T1
DBG 2024-05-10 10:25:35.943+02:00 keycard_signal                             topics="keycard-service" tid=1107619 file=service.nim:113 response="{\"type\":\"keycard.flow-result\",\"event\":{\"instance-uid\":\"57410ca9739b3c1f3eec5698c4bb4f61\",\"key-uid\":\"e41cd39a7527a08469fd7fcc763a2a304169710e34fde43cd11823d8f488d8b6\"}}"
DBG 2024-05-10 10:25:35.943+02:00 on_keycard_response                        topics="app-controller" tid=1107619 file=module.nim:474 currFlow=FirstRunOldUserKeycardImport currState=KeycardRepeatPin
DBG 2024-05-10 10:25:35.948+02:00 on_keycard_response - set state            topics="app-controller" tid=1107619 file=module.nim:479 setCurrFlow=FirstRunOldUserKeycardImport setCurrState=KeycardPinSet
DBG 2024-05-10 10:25:36.908+02:00 primary_action                             topics="app-controller" tid=1107619 file=module.nim:205 currFlow=FirstRunOldUserKeycardImport currState=KeycardPinSet
DBG 2024-05-10 10:25:36.919+02:00 Account saved succesfully                  topics="accounts-service" tid=1107619 file=service.nim:177
WRN 2024-05-10 10:25:38.469+02:00 Error decoding signal                      topics="signals-manager" tid=1107619 file=signals_manager.nim:49 err="Unknown signal received: mediaserver.started"
DBG 2024-05-10 10:25:39.117+02:00 NewBE_callPrivateRPC                       topics="rpc" tid=1107619 file=core.nim:27 rpc_method=wakuext_startMessenger
WRN 2024-05-10 10:25:39.128+02:00 Error decoding signal                      topics="signals-manager" tid=1107619 file=signals_manager.nim:49 err="Unknown signal received: mediaserver.started"

@jakubgs
Copy link
Member Author

jakubgs commented May 10, 2024

This time around it asked me to reset the PIN, but after I did it got stuck on this screen:

image

@jakubgs
Copy link
Member Author

jakubgs commented May 10, 2024

Also, i see messages being received in logs:

NF 2024-05-10 10:25:43.280+02:00 received                                   topics="signals-manager" tid=1107619 file=messages.nim:72 signal=messages.new messageID=0xb9ab14c1ae9fe3e92176b332d93ef9529c3c1f94e55b54c19d4e105245b40007
INF 2024-05-10 10:25:43.281+02:00 received                                   topics="signals-manager" tid=1107619 file=messages.nim:72 signal=messages.new messageID=0xb2492b02ca2832ccdf342ae44b78c1e4a33d8a7cf57c8c4f0a0e5f91d5bbe1ae
INF 2024-05-10 10:26:04.248+02:00 received                                   topics="signals-manager" tid=1107619 file=messages.nim:72 signal=messages.new messageID=0x7d88d6442fd9ea046408293d9d41df0f79a70f29922ac1d36783a01e82c2a546

And yet the app has the screen stuck on Keycard PIN set.

@jakubgs
Copy link
Member Author

jakubgs commented May 10, 2024

Here's log from normal import flow:

keycard - listing readers
keycard - waiting for card
keycard - card found at index 0
keycard - using reader ACS ACR39U ICC Reader 00 00
keycard - card protocol T1
DBG 2024-05-10 10:44:17.988+02:00 keycard_signal                             topics="keycard-service" tid=1126440 file=service.nim:113 response="{\"type\":\"keycard.action.enter-pin\",\"event\":{\"error\":\"\",\"free-pairing-slots\":4,\"instance-uid\":\"57410ca9739b3c1f3eec5698c4bb4f61\",\"key-uid\":\"e41cd39a7527a08469fd7fcc763a2a304169710e34fde43cd11823d8f488d8b6\",\"pin-retries\":3,\"puk-retries\":5}}"
DBG 2024-05-10 10:44:17.989+02:00 on_keycard_response                        topics="app-controller" tid=1126440 file=module.nim:474 currFlow=FirstRunOldUserKeycardImport currState=KeycardPluginReader
DBG 2024-05-10 10:44:17.997+02:00 on_keycard_response - set state            topics="app-controller" tid=1126440 file=module.nim:479 setCurrFlow=FirstRunOldUserKeycardImport setCurrState=KeycardRecognizedKeycard
DBG 2024-05-10 10:44:19.024+02:00 primary_action                             topics="app-controller" tid=1126440 file=module.nim:205 currFlow=FirstRunOldUserKeycardImport currState=KeycardRecognizedKeycard
DBG 2024-05-10 10:44:19.034+02:00 primary_action - set state                 topics="app-controller" tid=1126440 file=module.nim:211 setCurrFlow=FirstRunOldUserKeycardImport setCurrState=KeycardEnterPin
DBG 2024-05-10 10:44:21.495+02:00 primary_action                             topics="app-controller" tid=1126440 file=module.nim:205 currFlow=FirstRunOldUserKeycardImport currState=KeycardEnterPin
DBG 2024-05-10 10:44:21.881+02:00 primary_action                             topics="app-controller" tid=1126440 file=module.nim:205 currFlow=FirstRunOldUserKeycardImport currState=KeycardEnterPin
DBG 2024-05-10 10:44:22.190+02:00 primary_action                             topics="app-controller" tid=1126440 file=module.nim:205 currFlow=FirstRunOldUserKeycardImport currState=KeycardEnterPin
DBG 2024-05-10 10:44:22.674+02:00 primary_action                             topics="app-controller" tid=1126440 file=module.nim:205 currFlow=FirstRunOldUserKeycardImport currState=KeycardEnterPin
DBG 2024-05-10 10:44:22.940+02:00 primary_action                             topics="app-controller" tid=1126440 file=module.nim:205 currFlow=FirstRunOldUserKeycardImport currState=KeycardEnterPin
DBG 2024-05-10 10:44:23.232+02:00 primary_action                             topics="app-controller" tid=1126440 file=module.nim:205 currFlow=FirstRunOldUserKeycardImport currState=KeycardEnterPin
DBG 2024-05-10 10:44:23.234+02:00 keycardResumeFlow                          topics="keycard-service" tid=1126440 file=service.nim:172 kcServiceCurrFlow=RecoverAccount payload="{\"pin\":\"000000\"}" response=ok
DBG 2024-05-10 10:44:25.799+02:00 keycard_signal                             topics="keycard-service" tid=1126440 file=service.nim:113 response="{\"type\":\"keycard.flow-result\",\"event\":{\"eip1581-key\":{\"address\":\"0xABC\",\"publicKey\":\"BC\"},\"encryption-key\":{\"address\":\"0xABC\",\"publicKey\":\"ABC\",\"privateKey\":\"ABC\"},\"instance-uid\":\"ABC\",\"key-uid\":\"ABC\",\"master-key\":{\"address\":\"ABC\",\"publicKey\":\"ABC\"},\"wallet-key\":{\"address\":\"ABC\",\"publicKey\":\"ABC\"},\"wallet-root-key\":{\"address\":\"ABC\",\"publicKey\":\"ABC\"},\"whisper-key\":{\"address\":\"ABC\",\"publicKey\":\"ABC\",\"privateKey\":\"ABC\"}}}"
DBG 2024-05-10 10:44:25.800+02:00 on_keycard_response                        topics="app-controller" tid=1126440 file=module.nim:474 currFlow=FirstRunOldUserKeycardImport currState=KeycardEnterPin
DBG 2024-05-10 10:44:25.810+02:00 Account saved succesfully                  topics="accounts-service" tid=1126440 file=service.nim:177
WRN 2024-05-10 10:44:27.634+02:00 Error decoding signal                      topics="signals-manager" tid=1126440 file=signals_manager.nim:49 err="Unknown signal received: mediaserver.started"
DBG 2024-05-10 10:44:28.739+02:00 NewBE_callPrivateRPC                       topics="rpc" tid=1126440 file=core.nim:27 rpc_method=wakuext_startMessenger
WRN 2024-05-10 10:44:28.753+02:00 Error decoding signal                      topics="signals-manager" tid=1126440 file=signals_manager.nim:49 err="Unknown signal received: mediaserver.started"

@saledjenic saledjenic self-assigned this May 10, 2024
@saledjenic saledjenic added this to the 2.29.0 Beta milestone May 10, 2024
saledjenic added a commit that referenced this issue May 12, 2024
Handling for recovering Status profile for Linux updated since we don't use biometrics for Linux
and that requires slightly different flow.

Closes: #14673
saledjenic added a commit that referenced this issue May 16, 2024
Handling for recovering Status profile for Linux updated since we don't use biometrics for Linux
and that requires slightly different flow.

Closes: #14673
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working E:Desktop Keycard Bug Bug found after initial keycard development
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants