Skip to content

(wasm) data in copyToWasm() can be undefined #19

@guest271314

Description

@guest271314

Firefox WebTransport client.

TypeError: Cannot read properties of undefined (reading 'byteLength')
    at copyToWasm (webtransport-example.js:94:12)
    at writeStreamData (webtransport-example.js:305:3)
    at Object.onStreamData (webtransport-example.js:396:7)
    at pollEvents (webtransport-example.js:225:32)
    at webtransport-example.js:492:7
TypeError: Cannot read properties of undefined (reading 'byteLength')
    at copyToWasm (webtransport-example.js:94:12)
    at writeStreamData (webtransport-example.js:305:3)
    at Object.onStreamData (webtransport-example.js:396:7)
    at pollEvents (webtransport-example.js:225:32)
    at webtransport-example.js:508:7
Image

I've done

if (data === void 0 || data.byteLength === 0) {
    return fn(0, 0);
  }

though I don't think data is ever expected to be undefined?

Additionally, if I send 1 MiB to Firefox client Firefox never completes the roundtrip, and I think retains the connection and data after connection lost.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions