Skip to content

transferIn() is cancelled after 1000 ms #77

Open

Description

@Azq2

Bug Description:

transferIn() is cancelled after 1000 ms by default. WebUSB does not define such a timeout.

Chromium passes 0, meaning no timeout-the request remains pending until completion or cancellation.
https://chromium.googlesource.com/chromium/src/third_party/+/master/blink/renderer/modules/webusb/usb_device.cc#547

Steps to Reproduce:

import { usb } from 'usb';

const device = (await usb.getDevices()).find((candidate) => candidate.vendorId === 0x067B && candidate.productId === 0x2303);
await device.open();
if (!device.configuration)
	await device.selectConfiguration(1);
try { await device.detachKernelDriver(0); } catch (_e) { }
await device.claimInterface(0);

console.time("elapsed");
try {
	await device.transferIn(3, 64);
} catch (error) {
	console.log(error);
}
console.timeEnd("elapsed");

Additional Information

  • ArchLinux
  • NodeJS v26.10.0
  • node-usb-rs from main branch

Activity

  1. thegecko commented on Oct 5, 2026

    @thegecko
    Member

    Thanks for raising this issue, Ive implemented an initial (untested) fix in #84

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions