Repository navigation
AssertionError [ERR_ASSERTION]: false == true #26351
Description
Activity
@nodejs/http
I don't have any insight. Too bad the
assert(parser && parser.socket === socket);wasn't two seperate asserts. I wonder ifparser.socketis the underlying net socket, and not the TLS socket?@dhirendra24 Reproduction can be difficult, for you as well as us, but it would be helpful to have more information on the app.
It is a really simple app with a single endpoint using micro and calling an another endpoint using axios. Other than that, it is using dotenv, winston & @sentry/node.
From the logs, it looks like it happens when axios throws an Error.Do you have the stacktrace from the error Axios threw? If it was thrown from inside a callback or event listener (which is pretty likely) its possible the error passed up through node.js core js and left its internal state in a mess.
- addedhttpsIssues and PRs related to the https subsystem.Issues and PRs related to the https subsystem.
on Mar 3, 2019 Stacktrace from axios error is
Error: Request failed with status code 400 at createError (/app/node_modules/axios/lib/core/createError.js:16:15) at settle (/app/node_modules/axios/lib/core/settle.js:18:12) at IncomingMessage.handleStreamEnd (/app/node_modules/axios/lib/adapters/http.js:201:11) at IncomingMessage.emit (events.js:187:15) at IncomingMessage.EventEmitter.emit (domain.js:441:20) at endReadableNT (_stream_readable.js:1094:12) at process._tickCallback (internal/process/next_tick.js:63:19)Without more information this is not actionable. Closing. Can reopen if new information is available.
- Version: v14.15.5
- Platform: Linux 5.8.0-55-generic extending options from a prototype #62~20.04.1-Ubuntu SMP Wed Jun 2 08:55:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
- Using: prettier@2.3.0
What steps will reproduce the bug?
You just need to run prettier on this file, using the html parser:
<aura:component controller="Controller" > <img src="test.jpg"> I break</img> </aura:component>Notice that there is no space between
I breakand the invalid</img>tag. Putting a space there or removing the invalid tag resolves the issue. Other tags, such as nesting into atemplateorhtml>bodydo not matter.What is the expected behavior?
(This is secondary on this repo)
Prettier is otherwise able to run on aura files. I should get either a syntax error or a positive check (need-to-format) on the file, which I get by adding the aforementioned space, but the parser breaks before.
(Primary)
The error raised should be descriptive enough to understand that this is a parsing error. Alternatively, handle the underlying error to continue parsing safely.What do you see instead?
test.html[error] test.html: AssertionError [ERR_ASSERTION]: false == true [error] at printClosingTagStartMarker (static/path/Test-repo/node_modules/prettier/index.js:58525:29) [error] at printClosingTagSuffix (static/path/Test-repo/node_modules/prettier/index.js:58475:59) [error] at Object.genericPrint$1 [as print] (static/path/Test-repo/node_modules/prettier/index.js:58158:101) [error] at callPluginPrintFunction (static/path/Test-repo/node_modules/prettier/index.js:14926:21) [error] at mainPrintInternal (static/path/Test-repo/node_modules/prettier/index.js:14864:17) [error] at mainPrint (static/path/Test-repo/node_modules/prettier/index.js:14846:14) [error] at printChild (static/path/Test-repo/node_modules/prettier/index.js:58276:12) [error] at static/path/Test-repo/node_modules/prettier/index.js:58224:14 [error] at static/path/Test-repo/node_modules/prettier/index.js:14634:23 [error] at AstPath.each (static/path/Test-repo/node_modules/prettier/index.js:14621:7)Additional information
I did not register a separate bug because it's not really terrible in my use case, but found very little information online about that error, stumbled upon this post, and thought that you could use more informations on this bug, because I think it is the same bug in both cases. Obviously using prettier I can understand that this is a parsing error, but it will be confusing for other modules, such as in OP's case.
@deStMathieu your error is independent from the one originally reported here (even though it shares the same message). If you look at the stack trace you can see that it occurred inside prettier. You could as such check prettier's issue tracker.
Duly noted. Cheers!
I've had several crashes with the following stack trace:
Additional Data: