Skip to content

Conversation

siddarthkay
Copy link
Contributor

@siddarthkay siddarthkay commented Sep 4, 2025

Summary

fixes libusb being busy when app is closed and started again.

starting pcscd with /tmp/.mount_StatusKDpnfI/usr/bin/pcscd -f &
00000000 [136864157226944] ccid_usb.c:672:OpenUSBByName() Can't claim interface 3/5: LIBUSB_ERROR_BUSY
00000172 [136864157226944] ifdhandler.c:160:CreateChannelByNameOrChannel() failed
00000003 [136864157226944] ../src/readerfactory.c:1132:RFInitializeReader() Open Port 0x200000 Failed (usb:058f/9540:libudev:0:/dev/bus/usb/003/005)
00000003 [136864157226944] ../src/readerfactory.c:371:RFAddReader() Alcor Micro AU9540 init failed.
00000043 [136864157226944] ../src/hotplug_libudev.c:517:HPAddDevice() Failed adding USB device: Alcor Micro AU9540
qt.core.qobject.connect: QObject::connect(QObject, Unknown): invalid nullptr parameter

https://man.freebsd.org/cgi/man.cgi?query=pcscd&sektion=8&manpath=freebsd-release-ports#end

Screenshot 2025-09-04 at 12 11 18 PM

fixes: #18635

@siddarthkay siddarthkay self-assigned this Sep 4, 2025
@siddarthkay siddarthkay requested a review from a team as a code owner September 4, 2025 08:11
@siddarthkay siddarthkay requested review from iurimatias and removed request for a team September 4, 2025 08:11
Copy link
Member

@jakubgs jakubgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty commit body, no explanation of why the change is being made.

@status-im-auto
Copy link
Member

status-im-auto commented Sep 4, 2025

Jenkins Builds

Click to see older builds (25)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ ce3ebd1 #1 2025-09-04 08:19:44 ~7 min tests/nim 📄log
✔️ b885a0c #2 2025-09-04 08:28:50 ~7 min tests/nim 📄log
✔️ b885a0c #2 2025-09-04 08:34:58 ~13 min tests/ui 📄log
✔️ 686892d #3 2025-09-04 08:44:13 ~5 min tests/nim 📄log
686892d #3 2025-09-04 08:49:13 ~10 min linux/x86_64-nwaku 📄log
✔️ 686892d #3 2025-09-04 08:51:12 ~12 min tests/ui 📄log
✔️ 686892d #3 2025-09-04 08:51:14 ~12 min linux/x86_64 📦tgz
✔️ 686892d #3 2025-09-04 08:53:15 ~14 min macos/aarch64 🍎dmg
✔️ 686892d #3 2025-09-04 08:58:40 ~20 min macos/aarch64-nwaku 🍎dmg
✔️ 686892d pr18767 2025-09-04 09:02:46 ~11 min tests/e2e 📊rpt
✔️ 686892d #3 2025-09-04 09:17:22 ~38 min windows/x86_64 💿exe
✔️ 686892d #5 2025-09-04 15:15:13 ~16 min linux/x86_64 📦tgz
✔️ 686892d pr18767 2025-09-04 15:26:06 ~10 min tests/e2e 📊rpt
✔️ 4ef7c2f #4 2025-09-04 17:02:45 ~7 min tests/nim 📄log
✔️ 4ef7c2f #5 2025-09-04 17:08:58 ~12 min macos/aarch64 🍎dmg
✔️ 4ef7c2f #4 2025-09-04 17:09:06 ~13 min tests/ui 📄log
✔️ 4ef7c2f #6 2025-09-04 17:12:45 ~17 min linux/x86_64 📦tgz
✔️ 4ef7c2f #5 2025-09-04 17:22:19 ~18 min macos/aarch64-nwaku 🍎dmg
✔️ 4ef7c2f pr18767 2025-09-04 17:23:38 ~10 min tests/e2e 📊rpt
✔️ 4ef7c2f #4 2025-09-04 17:46:50 ~51 min windows/x86_64 💿exe
✔️ 6093c1b6 #1 2025-09-10 06:16:45 ~7 min android/arm64 🤖apk 📲
✔️ c504bc0c #3 2025-09-12 17:21:18 ~5 min android/arm64 🤖apk 📲
✔️ a444a7ab #4 2025-09-16 09:20:18 ~4 min android/arm64 🤖apk 📲
✔️ c912d020 #6 2025-09-18 09:25:13 ~9 min android/arm64 🤖apk 📲
✔️ f0fe802a #7 2025-09-19 09:22:31 ~6 min android/arm64 🤖apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 63f8ac29 #10 2025-09-24 17:25:53 ~10 min android/arm64 🤖apk 📲
✔️ 74289922 #11 2025-09-25 17:26:05 ~9 min android/arm64 🤖apk 📲

fixes `libusb` being busy when app is closed and started again.
```
starting pcscd with /tmp/.mount_StatusKDpnfI/usr/bin/pcscd -f &
00000000 [136864157226944] ccid_usb.c:672:OpenUSBByName() Can't claim interface 3/5: LIBUSB_ERROR_BUSY
00000172 [136864157226944] ifdhandler.c:160:CreateChannelByNameOrChannel() failed
00000003 [136864157226944] ../src/readerfactory.c:1132:RFInitializeReader() Open Port 0x200000 Failed (usb:058f/9540:libudev:0:/dev/bus/usb/003/005)
00000003 [136864157226944] ../src/readerfactory.c:371:RFAddReader() Alcor Micro AU9540 init failed.
00000043 [136864157226944] ../src/hotplug_libudev.c:517:HPAddDevice() Failed adding USB device: Alcor Micro AU9540
qt.core.qobject.connect: QObject::connect(QObject, Unknown): invalid nullptr parameter
```

https://man.freebsd.org/cgi/man.cgi?query=pcscd&sektion=8&manpath=freebsd-release-ports#end

<img width="713" height="153" alt="Screenshot 2025-09-04 at 12 11 18 PM" src="https://github.com/user-attachments/assets/78aa1104-7791-4e6e-9a7f-391466b089d2" />

fixes: #18635
@jrainville
Copy link
Member

@siddarthkay is it possible that this is missing the previous fix or that the docker cache wasn't refreshed? Because I see the first issue:

starting pcscd with /tmp/.mount_StatusLcJBpc/usr/bin/pcscd --foreground --auto-exit &
00000000 [127618355779520] ../src/pcscdaemon.c:629:main() cannot create /pcscd/run: No such file or directory
qt.core.qobject.connect: QObject::connect(QObject, Unknown): invalid nullptr parameter

@siddarthkay
Copy link
Contributor Author

@jrainville : its possible, let me purge docker cache in all CI hosts

@siddarthkay
Copy link
Contributor Author

@jrainville
Copy link
Member

@jrainville : please test with : https://status-im-desktop-prs.ams3.digitaloceanspaces.com/StatusIm-Desktop-250904-145902-686892-pr18767-x86_64.tar.gz

@siddarthkay I just tested. I restarted my PC for a clean state. First run was ok, but closing and then reopening, same problem

@siddarthkay
Copy link
Contributor Author

@jrainville : can you please test again ?

https://status-im-desktop-prs.ams3.digitaloceanspaces.com/StatusIm-Desktop-250904-165524-4ef7c2-pr18767-x86_64.tar.gz

_ (34)

@jrainville
Copy link
Member

Same problem, though while restarting my main release app, I found something interesting.

If I run the app, login, then quit, on the next app start, the reader works.
But then if I close before login, and reopen, the reader doesn't work.

So maybe you change needs to be applied for before login too?

@siddarthkay
Copy link
Contributor Author

Hmm interesting @jrainville : Thanks for testing! I'll mark this PR as draft and test with my linux PC tomorrow!

@siddarthkay siddarthkay marked this pull request as draft September 4, 2025 17:25
@anastasiyaig
Copy link
Contributor

sadly when i close reopen the app, the reader is invisible for the app

image

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

Successfully merging this pull request may close these issues.

Keycard reader not found/recognized in release Linux builds
6 participants