-
Couldn't load subscription status.
- Fork 279
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
If I run this script, I get the following panic:
'use scrict'
import puppeteer from 'puppeteer-core';
const browser = await puppeteer.connect({
browserWSEndpoint: 'ws://127.0.0.1:9222',
});
const context = await browser.createBrowserContext();
const page = await context.newPage();
await page.goto("https://httpbin.io/xhr/get");
const html = await page.content()
console.log(html)
await page.close();
await context.close();
await browser.disconnect();$ zig build run
info(server): accepting new conn...
info(server): client connected
info(page): GET https://httpbin.io/xhr/get 200
info(server): accepting new conn...
info(xhr): GET https://httpbin.io/get 200
Segmentation fault at address 0x73c99a5df658
/usr/local/zig-0.14.0/lib/std/heap/arena_allocator.zig:180:50: 0x280a2f7 in alloc (lightpanda)
var cur_node = if (self.state.buffer_list.first) |first_node|
^
/usr/local/zig-0.14.0/lib/std/mem/Allocator.zig:129:26: 0x281577a in allocBytesWithAlignment__anon_14149 (lightpanda)
return a.vtable.alloc(a.ptr, len, alignment, ret_addr);
^
/usr/local/zig-0.14.0/lib/std/mem/Allocator.zig:260:40: 0x28059d2 in allocWithSizeAndAlignment__anon_11428 (lightpanda)
return self.allocBytesWithAlignment(alignment, byte_count, return_address);
^
/usr/local/zig-0.14.0/lib/std/mem/Allocator.zig:254:75: 0x27ec0f8 in alloc__anon_8592 (lightpanda)
const ptr: [*]align(a) T = @ptrCast(try self.allocWithSizeAndAlignment(@sizeOf(T), a, n, return_address));
^
/usr/local/zig-0.14.0/lib/std/mem/Allocator.zig:411:40: 0x27ebef7 in dupe__anon_8582 (lightpanda)
const new_buf = try allocator.alloc(T, m.len);
^
/home/pierre/wrk/browser/src/browser/xhr/xhr.zig:169:43: 0x2dd5a2f in append (lightpanda)
const kk = try self.arena.dupe(u8, k);
^
/home/pierre/wrk/browser/src/browser/xhr/xhr.zig:477:49: 0x2f036c2 in onHttpResponse (lightpanda)
try self.response_headers.append(hdr.name, hdr.value);
^
/home/pierre/wrk/browser/src/http/client.zig:987:48: 0x2f5aaed in processData (lightpanda)
self.handler.onHttpResponse(.{
^
/home/pierre/wrk/browser/src/http/client.zig:1084:57: 0x2f59e3f in received (lightpanda)
status = handler.processData(data[0..cleartext_pos]);
^
/home/pierre/wrk/browser/src/http/client.zig:831:46: 0x2f3e88d in received (lightpanda)
const status = self.conn.received(self.read_buf[0 .. self.read_pos + n]) catch |err| {
^
/home/pierre/wrk/browser/src/runtime/loop.zig:304:20: 0x2f20f24 in onRecv (lightpanda)
cbk(@alignCast(@ptrCast(callback.ctx)), completion_, res);
^
/home/pierre/.cache/zig/p/tigerbeetle_io-0.0.0-ViLgxpyRBAB5BMfIcj3KMXfbJzwARs9uSl8aRy2OXULd/io/linux.zig:1219:29: 0x2f03ecd in wrapper (lightpanda)
callback(
^
/home/pierre/.cache/zig/p/tigerbeetle_io-0.0.0-ViLgxpyRBAB5BMfIcj3KMXfbJzwARs9uSl8aRy2OXULd/io/linux.zig:742:40: 0x287ff3a in complete (lightpanda)
completion.callback(completion.context, completion, &result);
^
/home/pierre/.cache/zig/p/tigerbeetle_io-0.0.0-ViLgxpyRBAB5BMfIcj3KMXfbJzwARs9uSl8aRy2OXULd/io/linux.zig:193:49: 0x287e4cb in flush (lightpanda)
.inactive => completion.complete(),
^
/home/pierre/.cache/zig/p/tigerbeetle_io-0.0.0-ViLgxpyRBAB5BMfIcj3KMXfbJzwARs9uSl8aRy2OXULd/io/linux.zig:148:27: 0x2880d36 in run_for_ns (lightpanda)
try self.flush(1, &timeouts, &etime);
^
/home/pierre/wrk/browser/src/server.zig:1044:31: 0x2881541 in run (lightpanda)
try loop.io.run_for_ns(10 * std.time.ns_per_ms);
^
/home/pierre/wrk/browser/src/main.zig:88:23: 0x28c3c1f in main (lightpanda)
server.run(app, address, timeout) catch |err| {
^
/usr/local/zig-0.14.0/lib/std/start.zig:656:37: 0x28c56d7 in main (lightpanda)
const result = root.main() catch |err| {
^
../sysdeps/nptl/libc_start_call_main.h:58:16: 0x73c9a322a1c9 in __libc_start_call_main (../sysdeps/x86/libc-start.c)
../csu/libc-start.c:360:3: 0x73c9a322a28a in __libc_start_main_impl (../sysdeps/x86/libc-start.c)
???:?:?: 0x27c4024 in ??? (???)
???:?:?: 0x0 in ??? (???)
run
└─ run lightpanda failure
error: the following command terminated unexpectedly:
/home/pierre/wrk/browser/.zig-cache/o/dc48b26828f6d8e4dc8e67be48530cc4/lightpanda
Build Summary: 3/5 steps succeeded; 1 failed
run transitive failure
└─ run lightpanda failure
error: the following build command failed with exit code 1:
/home/pierre/wrk/browser/.zig-cache/o/07583f381956c0639e3103736469339a/build /usr/local/zig-0.14.0/zig /usr/local/zig-0.14.0/lib /home/pierre/wrk/browser /home/pierre/wrk/browser/.zig-cache /home/pierre/.cache/zig --seed 0x855d2d51 -Z65f288cb185e531d runBut it works correctly with the fetch command:
$ zig build run -- fetch --dump https://httpbin.io/xhr/get
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working