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

panic(main thread): napi: napi_define_properties Error::Error #11149

Open
FierraCodes opened this issue May 17, 2024 · 0 comments
Open

panic(main thread): napi: napi_define_properties Error::Error #11149

FierraCodes opened this issue May 17, 2024 · 0 comments
Labels
crash An issue that could cause a crash

Comments

@FierraCodes
Copy link

FierraCodes commented May 17, 2024

How can we reproduce the crash?

I have no idea honestly, but maybe try doing an sqlite3 query.

JavaScript/TypeScript code that reproduces the crash?

const sqlite3 = require("sqlite3");

let db = new sqlite3.Database("./tokens.db", (err) => {
  if (err) {
    console.error(err.message);
  }
  console.log("Connected to the tokens database.");
});

function stuff(token) {
  db.get(
    `SELECT token tkn, ip ipaddr FROM tokens WHERE token = ?`,
    [token],
    (err, row) => {
      if (err) {
        console.log(err);
        return { code: 500, res: err.message };
      }
      if (ipaddr != ip) {
        return { code: 409, res: "Token Invalidated." };
      }
      return { code: 200, res: "Authenticated." };
    }
  );
}

console.log(
  stuff(
    "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2NjAxN2VjMjNiOTc4NmRiYjY2Y2U2ODQiLCJpYXQiOjE3MTU5NTI5MTV9.hy-WobLwtjkzVfTSV_wR48qCK8nggKAqqGwtFdnhHy4"
  )
);

Relevant log output

just instantly crashes yay

Stack Trace (bun.report)

Bun v1.1.8 (89d2580) on linux x86_64 [AutoCommand]

panic: napi: napi_define_properties
Error::Error

@FierraCodes FierraCodes added the crash An issue that could cause a crash label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash An issue that could cause a crash
Projects
None yet
Development

No branches or pull requests

1 participant