Skip to content

ESLint with SafeQL crashes on Windows with error code 3221226505 #1900

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

Closed
ProchaLu opened this issue Jul 9, 2024 · 5 comments
Closed

ESLint with SafeQL crashes on Windows with error code 3221226505 #1900

ProchaLu opened this issue Jul 9, 2024 · 5 comments
Labels
info-needed Issue requires more information from poster

Comments

@ProchaLu
Copy link

ProchaLu commented Jul 9, 2024

In the Next.js forked repository, ESLint crashes frequently on Windows. Specifically, it crashed five times in the last three minutes.

Screenshot 2024-07-09 141747

Also when running ESLint in the terminal, ESLint doesn't report any issues.

$ pnpm eslint . --max-warnings 0
(node:19500) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
[Info  - 2:33:01 PM] ESLint server is starting.
[Info  - 2:33:01 PM] ESLint server running in node v20.12.2
[Info  - 2:33:01 PM] ESLint server is running.
[Info  - 2:33:04 PM] ESLint library loaded from: C:\Users\chlod\projects\finalpro\node_modules\.pnpm\[email protected]\node_modules\eslint\lib\api.js
(node:38232) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
[Error - 2:33:10 PM] Server process exited with code 3221226505.
[Info  - 2:33:10 PM] Connection to server got closed. Server will restart.
true
[Info  - 2:33:10 PM] ESLint server stopped.
[Info  - 2:33:10 PM] ESLint server is starting.
[Info  - 2:33:10 PM] ESLint server running in node v20.12.2
[Info  - 2:33:10 PM] ESLint server is running.
[Info  - 2:33:11 PM] ESLint library loaded from: C:\Users\chlod\projects\finalpro\node_modules\.pnpm\[email protected]\node_modules\eslint\lib\api.js
(node:35816) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
[Error - 2:33:17 PM] Server process exited with code 3221226505.
[Info  - 2:33:17 PM] Connection to server got closed. Server will restart.
true
[Info  - 2:33:17 PM] ESLint server stopped.
[Info  - 2:33:17 PM] ESLint server is starting.
[Info  - 2:33:17 PM] ESLint server running in node v20.12.2
[Info  - 2:33:17 PM] ESLint server is running.
[Info  - 2:33:18 PM] ESLint library loaded from: C:\Users\chlod\projects\finalpro\node_modules\.pnpm\[email protected]\node_modules\eslint\lib\api.js
(node:20736) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
[Error - 2:33:23 PM] Server process exited with code 3221226505.
[Info  - 2:33:23 PM] Connection to server got closed. Server will restart.
true
[Info  - 2:33:23 PM] ESLint server stopped.
[Info  - 2:33:23 PM] ESLint server is starting.
[Info  - 2:33:24 PM] ESLint server running in node v20.12.2
[Info  - 2:33:24 PM] ESLint server is running.
[Info  - 2:33:25 PM] ESLint library loaded from: C:\Users\chlod\projects\finalpro\node_modules\.pnpm\[email protected]\node_modules\eslint\lib\api.js
(node:27292) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
[Error - 2:33:30 PM] Server process exited with code 3221226505.
[Info  - 2:33:30 PM] Connection to server got closed. Server will restart.
true
[Info  - 2:33:30 PM] ESLint server stopped.
[Info  - 2:33:30 PM] ESLint server is starting.
[Info  - 2:33:30 PM] ESLint server running in node v20.12.2
[Info  - 2:33:30 PM] ESLint server is running.
[Info  - 2:33:32 PM] ESLint library loaded from: C:\Users\chlod\projects\finalpro\node_modules\.pnpm\[email protected]\node_modules\eslint\lib\api.js
(node:20312) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
[Error - 2:33:37 PM] Server process exited with code 3221226505.
[Error - 2:33:37 PM] The ESLint server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Info  - 2:33:37 PM] ESLint server stopped.
$ DEBUG=eslint:* pnpm eslint . --max-warnings 0
  eslint:cli CLI args: [ '.', '--max-warnings', '0' ] +0ms
  eslint:cli Using flat config? true +3ms
  eslint:cli Running on files +5ms
  eslint:eslint Using file patterns: . +0ms
  eslint:eslint Searching for eslint.config.js +0ms
  eslint:eslint Loading config from C:\Users\chlod\projects\finalpro\eslint.config.js +2ms       
  eslint:eslint Config file URL is file:///C:/Users/chlod/projects/finalpro/eslint.config.js +1ms
  eslint:rules Loading rule 'consistent-return' (remaining=289) +0ms
  eslint:rules Loading rule 'dot-notation' (remaining=288) +17ms    
  eslint:rules Loading rule 'init-declarations' (remaining=287) +7ms
  eslint:rules Loading rule 'max-params' (remaining=286) +2ms       
  eslint:rules Loading rule 'no-dupe-class-members' (remaining=285) +29ms
  eslint:rules Loading rule 'no-empty-function' (remaining=284) +4ms
  eslint:rules Loading rule 'no-invalid-this' (remaining=283) +16ms 
  eslint:rules Loading rule 'no-loop-func' (remaining=282) +3ms     
  eslint:rules Loading rule 'no-loss-of-precision' (remaining=281) +1ms
  eslint:rules Loading rule 'no-magic-numbers' (remaining=280) +2ms    
  eslint:rules Loading rule 'no-restricted-imports' (remaining=279) +30ms
  eslint:rules Loading rule 'no-unused-expressions' (remaining=278) +63ms
  eslint:rules Loading rule 'no-useless-constructor' (remaining=277) +5ms
  eslint:rules Loading rule 'prefer-destructuring' (remaining=276) +11ms
  eslint:rules Loading rule 'no-warning-comments' (remaining=275) +1s
(node:14212) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
  eslint:eslint Deleting cache file at C:\Users\chlod\projects\finalpro\.eslintcache +3s
  eslint:rules Loading rule 'array-callback-return' (remaining=274) +465ms
  eslint:rules Loading rule 'default-case' (remaining=273) +6ms
  eslint:rules Loading rule 'dot-location' (remaining=272) +2ms
  eslint:rules Loading rule 'eqeqeq' (remaining=271) +2ms
  eslint:rules Loading rule 'new-parens' (remaining=270) +3ms
  eslint:rules Loading rule 'no-caller' (remaining=269) +2ms
  eslint:rules Loading rule 'no-cond-assign' (remaining=268) +2ms
  eslint:rules Loading rule 'no-const-assign' (remaining=267) +1ms
  eslint:rules Loading rule 'no-control-regex' (remaining=266) +1ms        
  eslint:rules Loading rule 'no-delete-var' (remaining=265) +2ms
  eslint:rules Loading rule 'no-dupe-args' (remaining=264) +1ms
  eslint:rules Loading rule 'no-dupe-keys' (remaining=263) +1ms
  eslint:rules Loading rule 'no-duplicate-case' (remaining=262) +2ms       
  eslint:rules Loading rule 'no-empty-character-class' (remaining=261) +1ms
  eslint:rules Loading rule 'no-empty-pattern' (remaining=260) +2ms        
  eslint:rules Loading rule 'no-eval' (remaining=259) +3ms
  eslint:rules Loading rule 'no-ex-assign' (remaining=258) +2ms    
  eslint:rules Loading rule 'no-extend-native' (remaining=257) +1ms
  eslint:rules Loading rule 'no-extra-bind' (remaining=256) +3ms   
  eslint:rules Loading rule 'no-extra-label' (remaining=255) +1ms  
  eslint:rules Loading rule 'no-fallthrough' (remaining=254) +1ms  
  eslint:rules Loading rule 'no-func-assign' (remaining=253) +2ms
  eslint:rules Loading rule 'no-implied-eval' (remaining=252) +2ms
  eslint:rules Loading rule 'no-invalid-regexp' (remaining=251) +2ms
  eslint:rules Loading rule 'no-iterator' (remaining=250) +3ms
  eslint:rules Loading rule 'no-label-var' (remaining=249) +1ms
  eslint:rules Loading rule 'no-labels' (remaining=248) +2ms
  eslint:rules Loading rule 'no-lone-blocks' (remaining=247) +2ms
  eslint:rules Loading rule 'no-mixed-operators' (remaining=246) +1ms
  eslint:rules Loading rule 'no-multi-str' (remaining=245) +3ms
  eslint:rules Loading rule 'no-global-assign' (remaining=244) +1ms
  eslint:rules Loading rule 'no-unsafe-negation' (remaining=243) +2ms
  eslint:rules Loading rule 'no-new-func' (remaining=242) +2ms
  eslint:rules Loading rule 'no-new-object' (remaining=241) +2ms
  eslint:rules Loading rule 'no-new-symbol' (remaining=240) +2ms
  eslint:rules Loading rule 'no-new-wrappers' (remaining=239) +1ms
  eslint:rules Loading rule 'no-obj-calls' (remaining=238) +1ms
  eslint:rules Loading rule 'no-octal' (remaining=237) +3ms
  eslint:rules Loading rule 'no-octal-escape' (remaining=236) +2ms
  eslint:rules Loading rule 'no-regex-spaces' (remaining=235) +2ms
  eslint:rules Loading rule 'no-script-url' (remaining=234) +2ms
  eslint:rules Loading rule 'no-self-assign' (remaining=233) +2ms
  eslint:rules Loading rule 'no-self-compare' (remaining=232) +3ms
  eslint:rules Loading rule 'no-sequences' (remaining=231) +2ms
  eslint:rules Loading rule 'no-shadow-restricted-names' (remaining=230) +2ms
  eslint:rules Loading rule 'no-sparse-arrays' (remaining=229) +1ms
  eslint:rules Loading rule 'no-template-curly-in-string' (remaining=228) +2ms
  eslint:rules Loading rule 'no-this-before-super' (remaining=227) +1ms
  eslint:rules Loading rule 'no-throw-literal' (remaining=226) +3ms
  eslint:rules Loading rule 'no-undef' (remaining=225) +3ms
  eslint:rules Loading rule 'no-restricted-globals' (remaining=224) +1ms
  eslint:rules Loading rule 'no-unreachable' (remaining=223) +4ms
  eslint:rules Loading rule 'no-unused-labels' (remaining=222) +1ms
  eslint:rules Loading rule 'no-useless-computed-key' (remaining=221) +2ms
  eslint:rules Loading rule 'no-useless-concat' (remaining=220) +2ms
  eslint:rules Loading rule 'no-useless-escape' (remaining=219) +1ms
  eslint:rules Loading rule 'no-useless-rename' (remaining=218) +3ms
  eslint:rules Loading rule 'no-with' (remaining=217) +3ms
  eslint:rules Loading rule 'no-whitespace-before-property' (remaining=216) +1ms
  eslint:rules Loading rule 'require-yield' (remaining=215) +2ms
  eslint:rules Loading rule 'rest-spread-spacing' (remaining=214) +2ms
  eslint:rules Loading rule 'strict' (remaining=213) +1ms
  eslint:rules Loading rule 'unicode-bom' (remaining=212) +2ms
  eslint:rules Loading rule 'use-isnan' (remaining=211) +2ms
  eslint:rules Loading rule 'valid-typeof' (remaining=210) +3ms
  eslint:rules Loading rule 'no-restricted-properties' (remaining=209) +2ms
  eslint:rules Loading rule 'getter-return' (remaining=208) +4ms
  eslint:rules Loading rule 'curly' (remaining=207) +113ms
  eslint:rules Loading rule 'no-async-promise-executor' (remaining=206) +5ms
  eslint:rules Loading rule 'no-constant-binary-expression' (remaining=205) +1ms
  eslint:rules Loading rule 'no-promise-executor-return' (remaining=204) +1ms
  eslint:rules Loading rule 'no-restricted-syntax' (remaining=203) +2ms
  eslint:rules Loading rule 'no-var' (remaining=202) +2ms
  eslint:rules Loading rule 'prefer-const' (remaining=201) +2ms
  eslint:rules Loading rule 'prefer-promise-reject-errors' (remaining=200) +2ms
  eslint:rules Loading rule 'require-await' (remaining=199) +7ms
  eslint:rules Loading rule 'spaced-comment' (remaining=198) +1ms
  eslint:eslint 31 files found in: 395ms +395ms
  eslint:eslint Lint C:\Users\chlod\projects\finalpro\databaseExample.js +3ms
  eslint:linter Linting code for C:\Users\chlod\projects\finalpro\databaseExample.js (pass 1) +0ms
  eslint:linter Verify +1ms
  eslint:linter With flat config: C:\Users\chlod\projects\finalpro\databaseExample.js +0ms
  eslint:languages:js Parsing: C:\Users\chlod\projects\finalpro\databaseExample.js +0ms
  eslint:languages:js Parsing successful: C:\Users\chlod\projects\finalpro\databaseExample.js +2s
  eslint:languages:js Scope analysis: C:\Users\chlod\projects\finalpro\databaseExample.js +1ms
  eslint:languages:js Scope analysis successful: C:\Users\chlod\projects\finalpro\databaseExample.js +0ms
  eslint:code-path onCodePathStart s1 +0ms
  eslint:code-path onCodePathSegmentStart s1_1 +1ms
  eslint:code-path s1_1) Program +0ms
  eslint:code-path s1_1) ImportDeclaration +1ms
  eslint:code-path s1_1) ImportSpecifier +1ms
  eslint:code-path s1_1) Identifier +0ms
  eslint:code-path s1_1) Identifier:exit +1ms
  eslint:code-path s1_1) Identifier +0ms
  eslint:code-path s1_1) Identifier:exit +0ms
  eslint:code-path s1_1) ImportSpecifier:exit +1ms
  eslint:code-path s1_1) Literal +0ms
  eslint:code-path s1_1) Literal:exit +0ms
  eslint:code-path s1_1) ImportDeclaration:exit +1ms
  eslint:code-path s1_1) ImportDeclaration +0ms
  eslint:code-path s1_1) ImportDefaultSpecifier +0ms
  eslint:code-path s1_1) Identifier +1ms
  eslint:code-path s1_1) Identifier:exit +0ms
  eslint:code-path s1_1) ImportDefaultSpecifier:exit +0ms
  eslint:code-path s1_1) Literal +1ms
  eslint:code-path s1_1) Literal:exit +0ms
  eslint:code-path s1_1) ImportDeclaration:exit +0ms
  eslint:code-path s1_1) ExpressionStatement +1ms
  eslint:code-path s1_1) CallExpression +0ms
  eslint:code-path s1_1) Identifier +0ms
  eslint:code-path s1_1) Identifier:exit +1ms
  eslint:code-path s1_1) CallExpression:exit +0ms
  eslint:code-path s1_1) ExpressionStatement:exit +1ms
  eslint:code-path s1_1) VariableDeclaration +0ms
  eslint:code-path s1_1) VariableDeclarator +0ms
  eslint:code-path s1_1) Identifier +0ms
  eslint:code-path s1_1) Identifier:exit +1ms
  eslint:code-path s1_1) CallExpression +0ms
  eslint:code-path s1_1) Identifier +0ms
  eslint:code-path s1_1) Identifier:exit +0ms
  eslint:code-path s1_1) CallExpression:exit +1ms
  eslint:code-path s1_1) VariableDeclarator:exit +0ms
  eslint:code-path s1_1) VariableDeclaration:exit +0ms
  eslint:code-path s1_1) ExpressionStatement +1ms
  eslint:code-path s1_1) CallExpression +0ms
  eslint:code-path s1_1) MemberExpression +0ms
  eslint:code-path s1_1) Identifier +1ms
  eslint:code-path s1_1) Identifier:exit +0ms
  eslint:code-path s1_1) Identifier +0ms
  eslint:code-path s1_1) Identifier:exit +1ms
  eslint:code-path s1_1) MemberExpression:exit +0ms
  eslint:code-path s1_1) AwaitExpression +1ms
  eslint:code-path s1_1) TaggedTemplateExpression +0ms
  eslint:code-path s1_1) Identifier +0ms
  eslint:code-path s1_1) Identifier:exit +1ms
  eslint:code-path s1_1) TemplateLiteral +0ms
  eslint:code-path s1_1) TemplateElement +0ms
  eslint:code-path s1_1) TemplateElement:exit +0ms
  eslint:code-path s1_1) TemplateLiteral:exit +1ms
  eslint:code-path s1_1) TaggedTemplateExpression:exit +0ms
  eslint:code-path s1_1) AwaitExpression:exit +0ms
  eslint:code-path s1_1) CallExpression:exit +0ms
  eslint:code-path s1_1) ExpressionStatement:exit +1ms
  eslint:code-path s1_1) ExpressionStatement +0ms
  eslint:code-path s1_1) AwaitExpression +0ms
  eslint:code-path s1_1) CallExpression +1ms
  eslint:code-path s1_1) MemberExpression +0ms
  eslint:code-path s1_1) Identifier +0ms
  eslint:code-path s1_1) Identifier:exit +0ms
  eslint:code-path s1_1) Identifier +0ms
  eslint:code-path s1_1) Identifier:exit +0ms
  eslint:code-path s1_1) MemberExpression:exit +1ms
  eslint:code-path s1_1) CallExpression:exit +0ms
  eslint:code-path s1_1) AwaitExpression:exit +0ms
  eslint:code-path s1_1) ExpressionStatement:exit +0ms
  eslint:code-path s1_1) Program:exit +0ms
  eslint:code-path onCodePathSegmentEnd s1_1 +1ms
  eslint:code-path onCodePathEnd s1 +0ms
  eslint:code-path DOT

Steps to Reproduce on Windows

  • Clone the repository: git clone https://github.com/ProchaLu/finalpro.git
  • Navigate to the project directory: cd finalpro
  • Install dependencies: pnpm install
  • Run ESLint: $ pnpm eslint . --max-warnings 0

Expected Behavior

ESLint should run without crashing and should report any linting issues found in the project files.

Actual Behavior

ESLint crashes with error code 3221226505 and does not report any linting issues.

Additional Information

  • Running the same command on macOS does not result in any crashes, and ESLint works as intended
  • Simple test cases, such as var a = 1; do not cause ESLint to report any issues on Windows
  • The issue appears to be specific to the Windows environment

Is there anything else I can check or any additional information needed to troubleshoot this issue?

@dbaeumer
Copy link
Member

I cloned the repository but running eslint (even in the terminal) already fails with:

Error: ENOENT: no such file or directory, open 'C:\Users\xxxx\Projects\finalpro\.env.example'
    at Object.open (node:internal/fs/sync:78:18)
    at Object.openSync (node:fs:565:17)
    at Object.readFileSync (node:fs:445:35)

@dbaeumer dbaeumer added the info-needed Issue requires more information from poster label Jul 10, 2024
@ProchaLu
Copy link
Author

@dbaeumer , thank you for cloning the repository. I’ve updated the forked repo to include an .env.example file. There’s an additional step required now, setting up the .env file.

@dbaeumer
Copy link
Member

@ProchaLu what kind of steps. After pulling I still get exceptions that the environment can't be read.

I would also like to ask that you look into providing me with a GitHub repository with a minimal setup to reproduce this. The repository you gave me requires quite some setup and it will make it hard to track down the problem.

@ProchaLu
Copy link
Author

ProchaLu commented Jul 12, 2024

@dbaeumer, I was not able to create a small repro because this issue is Windows related and I am using macOS. In the last day we narrowed the issue down and this issue seems to be coming from SafeQL and [email protected]. The database/users.ts file had 3 issues:

  • incorrect table name (user instead of users)
  • missing comma
  • curly brackets instead of parentheses

and those issues cause crashes on Windows with exit code 127:

$ pnpm eslint . --max-warnings 0
(node:11440) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
$ echo $?
127

This also caused crashes in the editor. I will report this in a new issue for SafeQL.

@dbaeumer
Copy link
Member

@ProchaLu thanks for letting me know. I will close the issue. Please ping if you thing there is anything that needs to be done in the extension itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants