Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heap check fail with Safari Developer Tools #15974

Open
SkyTik opened this issue Dec 24, 2024 · 0 comments
Open

Heap check fail with Safari Developer Tools #15974

SkyTik opened this issue Dec 24, 2024 · 0 comments
Labels
bug Something isn't working debugger Something to do with `bun --inspect` or the debugger

Comments

@SkyTik
Copy link

SkyTik commented Dec 24, 2024

What version of Bun is running?

1.1.42

What platform is your computer?

Darwin 23.6.0 arm64 arm

What steps can reproduce the bug?

Here is my code to generate heap stats in framework Elysia

 .get("/memory", async () => {
    const memorySnapshot = generateHeapSnapshot();
    const filePath = "./tmp/memory-snapshot.json";
    await Bun.write(filePath, JSON.stringify(memorySnapshot, null, 2));
    return new Response(Bun.file(filePath), {
      headers: {
        "Content-Disposition": "attachment; filename=memory-snapshot.json",
        "Content-Type": "application/octet-stream",
      },
    });
  })

Here is my JSON file: memory-snapshot (3).json

What is the expected behavior?

File should be viewed successfully on Safari Developer Tools like example in this link Bun Benchmarking

What do you see instead?

Import this file to Safari Developer Tools cause Timeline Recording Import Error: invalid JSON

Additional information

No response

@SkyTik SkyTik added bug Something isn't working needs triage labels Dec 24, 2024
@RiskyMH RiskyMH added debugger Something to do with `bun --inspect` or the debugger and removed needs triage labels Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working debugger Something to do with `bun --inspect` or the debugger
Projects
None yet
Development

No branches or pull requests

2 participants