Skip to content

js: http3 usage causes panic in Rust tooling #52

@barjin

Description

@barjin

Running the following example with npx tsx ./test.ts causes the program to panic and fail. Without using http3 (or with setting it to false), the program works as expected.

import { Impit, Browser } from 'impit';

const impit = new Impit({
    browser: Browser.Firefox,
    http3: true,
});

(async () => {
    const response = await impit.fetch('https://jindrich.bar');

    console.log(response.status);
})();

The panic in question:

thread '<unnamed>' panicked at impit/src/impit.rs:222:65:
called `Result::unwrap()` on an `Err` value: reqwest::Error { kind: Builder, source: Custom { kind: Other, error: "no async runtime found" } }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at core/src/panicking.rs:221:5:
panic in a function that cannot unwind
stack backtrace:
   0:     0x7fb841b469d2 - <unknown>
   1:     0x7fb841973fcb - <unknown>
   2:     0x7fb841b20352 - <unknown>
   3:     0x7fb841b4b588 - <unknown>
   4:     0x7fb841b4c448 - <unknown>
   5:     0x7fb841b4bef2 - <unknown>
   6:     0x7fb841b4be89 - <unknown>
   7:     0x7fb841b4be74 - <unknown>
   8:     0x7fb8419301a4 - <unknown>
   9:     0x7fb84193020c - <unknown>
  10:     0x7fb8419301b9 - <unknown>
  11:     0x7fb841956326 - <unknown>
  12:           0xf039c5 - _ZN6v8impl12_GLOBAL__N_123FunctionCallbackWrapper6InvokeERKN2v820FunctionCallbackInfoINS2_5ValueEEE
  13:          0x1290b9a - _ZN2v88internal12_GLOBAL__N_119HandleApiCallHelperILb1EEENS0_11MaybeHandleINS0_6ObjectEEEPNS0_7IsolateENS0_6HandleINS0_10HeapObjectEEENS8_INS0_20FunctionTemplateInfoEEENS8_IS4_EEPmi
  14:          0x1290eea - _ZN2v88internal26Builtin_HandleApiConstructEiPmPNS0_7IsolateE
  15:     0x7fbd73eac3b6 - <unknown>
thread caused non-unwinding panic. aborting.

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