-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
ERR_INTERNAL_ASSERTION from console.log(), TypeError: Converting circular structure to JSON #55539
Comments
Hi! Can you provide a minimal reproduction without the external library? |
No, I don't know how to. |
Unfortunately, we can't reproduce as this requires API tokens and such, do you happen to have a reproduction (even if it's not minimal) without the login process? |
I tried without login but then it did not trigger the bug. import {Bot, ChatMessage} from "@skyware/bot";
var bot = new Bot();
var message = new ChatMessage({text: "asdf", sender: {did: "did:plc:u4gngygg2w5egsigxu5g7byu"}}, bot);
console.log(message);
This code triggers the bug without any extra steps, but requires password. import {Bot} from "@skyware/bot";
var bot = new Bot();
await bot.login({
identifier: "testeststet.bsky.social",
password: "..."
});
var conv = await bot.getConversationForMembers(["did:plc:u4gngygg2w5egsigxu5g7byu"]);
var message = await conv.sendMessage({text: "test"});
console.log(message);
Perhaps I can give you password to test account privately? |
No. I would prefer not to transfer information privately. Rather, someone will see this and help to provide a minimal reproduction. I'll also try myself. Hopefully, in a few days, we'll have a minimal reproduction. |
This seems to reproduce the issue: const { inspect } = require('node:util');
const y = {
get [Symbol.toStringTag]() {
return JSON.stringify(this);
}
};
const x = { y };
y.x = x;
inspect(x); You can get an even simpler repro stack trace if you It's because this line triggers a getter that throws in the |
PR-URL: nodejs#55544 Fixes: nodejs#55539 Reviewed-By: James M Snell <jasnell@gmail.com> Co-Authored-By: Colin Ihrig <cjihrig@gmail.com>
Version
v20.18.0, v23.1.0
Platform
Subsystem
No response
What steps will reproduce the bug?
Then send chat message to the bot
How often does it reproduce? Is there a required condition?
100%, I cannot console.log() an object from someone's library.
What is the expected behavior? Why is that the expected behavior?
Usually console.log() can log absolutely anything and will never error, circular references would just display [Circular].
What do you see instead?
Additional information
No response
The text was updated successfully, but these errors were encountered: