Skip to content

TS Server fatal error: Debug Failure. False expression. #39704

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
CKiOne opened this issue Jul 22, 2020 · 8 comments
Closed

TS Server fatal error: Debug Failure. False expression. #39704

CKiOne opened this issue Jul 22, 2020 · 8 comments
Assignees
Labels
Duplicate An existing issue was already created Fix Available A PR has been opened for this issue
Milestone

Comments

@CKiOne
Copy link

CKiOne commented Jul 22, 2020

TypeScript Version: 3.9,7

Version 3.8.3 works but 3.9.7 throws error:

tsc --build tsconfig.json

C:\Users\b36.BAUGRUPPE\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:82931
throw e;
^

Error: Debug Failure. False expression.
at getConstructorDefinedThisAssignmentTypes (C:\Users\b3\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:34450:22)
at getWidenedTypeForAssignmentDeclaration (C:\Users\b3\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:34307:63)
at getTypeOfVariableOrParameterOrPropertyWorker (C:\Users\b3\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:34616:24)
at getTypeOfVariableOrParameterOrProperty (C:\Users\b3\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:34573:28)
at getTypeOfSymbol (C:\Users\b3\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:34873:24)
at getTypeOfInstantiatedSymbol (C:\Users\b3\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:34830:44)
at getTypeOfSymbol (C:\Users\b3\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:34864:24)
at isPropertySymbolTypeRelated (C:\Users\b36.BAUGRUPPE\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:41735:30)
at propertyRelatedTo (C:\Users\b3\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:41800:31)
at propertiesRelatedTo (C:\Users\b3\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:41921:43)

Search Terms: Compile Error

Unfortunately i can't share and I don't know which file is producing this error.

@RyanCavanaugh RyanCavanaugh added the Needs More Info The issue still hasn't been fully clarified label Jul 23, 2020
@minestarks
Copy link
Member

minestarks commented Jul 24, 2020

@CKiOne
Copy link
Author

CKiOne commented Jul 30, 2020

Hi, is there something i can do to help you with this issue?

@minestarks
Copy link
Member

@ninichki if you could try and see if it still repros with typescript@next we'd be grateful.

@RokitSalad
Copy link

I'm having the exact same problem, by the look of things:

PS C:\Code\Playground\hackchartingservice_erm\lambdas\create-chart> yarn run build
yarn run v1.22.4
$ tsc && webpack
C:\Code\Playground\hackchartingservice_erm\node_modules\typescript\lib\tsc.js:82931
throw e;
^

Error: Debug Failure. False expression.
at getConstructorDefinedThisAssignmentTypes (C:\Code\Playground\hackchartingservice_erm\node_modules\typescript\lib\tsc.js:34450:22)
at getWidenedTypeForAssignmentDeclaration (C:\Code\Playground\hackchartingservice_erm\node_modules\typescript\lib\tsc.js:34307:63)
at getTypeOfVariableOrParameterOrPropertyWorker (C:\Code\Playground\hackchartingservice_erm\node_modules\typescript\lib\tsc.js:34616:24)
at getTypeOfVariableOrParameterOrProperty (C:\Code\Playground\hackchartingservice_erm\node_modules\typescript\lib\tsc.js:34573:28)
at getTypeOfSymbol (C:\Code\Playground\hackchartingservice_erm\node_modules\typescript\lib\tsc.js:34873:24)
at checkPropertyAccessExpressionOrQualifiedName (C:\Code\Playground\hackchartingservice_erm\node_modules\typescript\lib\tsc.js:47692:53)
at checkPropertyAccessExpression (C:\Code\Playground\hackchartingservice_erm\node_modules\typescript\lib\tsc.js:47559:17)
at checkExpressionWorker (C:\Code\Playground\hackchartingservice_erm\node_modules\typescript\lib\tsc.js:51572:28)
at checkExpression (C:\Code\Playground\hackchartingservice_erm\node_modules\typescript\lib\tsc.js:51499:38)
at checkPrefixUnaryExpression (C:\Code\Playground\hackchartingservice_erm\node_modules\typescript\lib\tsc.js:50412:31)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I've tried upgrading typescript from 3.9.3 to 3.9.7, but it's still happening.

@RokitSalad
Copy link

Just so you're aware, the problem doesn't seem to be due to any specific source file. I've commented out the contents of all source files (*.ts x7, *.js x2) - the exact error still occurs.

tsconfig.json:
{
"compilerOptions": {
"outDir": "out",
"allowJs": true,
"declaration": true,
"esModuleInterop": true,
"inlineSourceMap": true,
"inlineSources": true,
"target":"ES2018",
"module": "commonjs",
"lib": [
"es2018",
"dom"
],
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": false,
"experimentalDecorators": true,
"strictPropertyInitialization":false,
}
}

package.json:
{
"name": "create-charts-v2",
"version": "1.0.0",
"private": true,
"license": "ISC",
"main": "dist/index.js",
"directories": {
"test": "tests"
},
"scripts": {
"build": "del /Q /S out dist && tsc && webpack",
"webpack": "webpack",
"build:lambda": "yarn run build",
"watch": "del /Q /S out dist && tsc -w",
"watch-run": "tsc-watch --onSuccess "ts-node ./src/indexLocalDev.ts""
},
"devDependencies": {
"@types/jest": "^26.0.3",
"@types/node": "^14.0.14",
"aws-cdk": "~1.46.0",
"jest": "^26.1.0",
"jest-junit": "^11.0.1",
"ts-jest": "26.1.1",
"ts-node": "^8.10.2",
"clean-webpack-plugin": "^3.0.0",
"ts-loader": "^7.0.1",
"tsc-watch": "^4.2.3",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11"
},
"dependencies": {
"@erm/lambda-helpers": "^0.0.4-alpha",
"@erm/logger": "^0.0.8-alpha",
"@erm/sidecar-aws": "^0.0.5-alpha",
"@types/d3": "^5.7.2",
"@types/d3-axis": "^1.0.12",
"@types/d3-color": "^1.2.2",
"@types/d3-scale": "^2.2.0",
"@types/d3-selection": "^1.4.1",
"@types/d3-time-format": "^2.1.1",
"@types/jsdom": "^16.2.1",
"@types/lodash": "^4.14.150",
"@types/node": "^13.13.4",
"aws-sdk": "^2.705.0",
"d3": "^5.16.0",
"g": "^2.0.1",
"jsdom": "^16.2.2",
"lodash-ts": "^1.2.7",
"moment": "^2.24.0"
}
}

@CKiOne
Copy link
Author

CKiOne commented Aug 3, 2020

Hello @minestarks ,
I tested it with Version 4.0.0-dev.20200803
but I get the same error:

[9:37:03] Building project 'tsconfig.json'...

C:\Users\b\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:84747
throw e;

Error: Debug Failure. False expression.
at getConstructorDefinedThisAssignmentTypes (C:\Users\b\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:40555:22)
at getWidenedTypeForAssignmentDeclaration (C:\Users\b\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:40410:67)
at getTypeOfVariableOrParameterOrPropertyWorker (C:\Users\b\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:40713:24)
at getTypeOfVariableOrParameterOrProperty (C:\Users\b\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:40666:28)
at getTypeOfSymbol (C:\Users\b\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:40970:24)
at getTypeOfInstantiatedSymbol (C:\Users\b\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:40927:44)
at getTypeOfSymbol (C:\Users\b3\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:40961:24)
at isPropertySymbolTypeRelated (C:\Users\b\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:48079:30)
at propertyRelatedTo (C:\Users\b\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:48144:31)
at propertiesRelatedTo (C:\Users\b\AppData\Roaming\npm\node_modules\typescript\lib\tsc.js:48319:43)
PS C:\dev\Projects\B\A> tsc --version
Version 4.0.0-dev.20200803

@CKiOne
Copy link
Author

CKiOne commented Aug 26, 2020

Hi,
I debuged into this and I found, that this line of typedefinition makes the problem.

declare module $data {
export class Guid implements Object {
constructor(value: string);
value: string;
}
}

But I'm not sure what's realy the problem. Maybe because it's a typedefinition for a javascript file?
It is finding the type "value" 2 times.

Maybe somebody has an explaination? For me it is working again, now.

kind regards

Christian

@jakebailey jakebailey added Bug A bug in TypeScript Crash For flagging bugs which are compiler or service crashes or unclean exits, rather than bad output and removed Needs More Info The issue still hasn't been fully clarified labels Jan 20, 2023
@jakebailey jakebailey added this to the Backlog milestone Jan 20, 2023
@jakebailey jakebailey self-assigned this Jan 20, 2023
@jakebailey jakebailey added Duplicate An existing issue was already created and removed Bug A bug in TypeScript Crash For flagging bugs which are compiler or service crashes or unclean exits, rather than bad output labels Jan 20, 2023
@jakebailey
Copy link
Member

Turns out that this is actually the same as #51521; I've tested and it is. That one has more info and a fix on #51524 (my PR is likely worse).

@jakebailey jakebailey closed this as not planned Won't fix, can't repro, duplicate, stale Jan 20, 2023
@typescript-bot typescript-bot added the Fix Available A PR has been opened for this issue label Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created Fix Available A PR has been opened for this issue
Projects
None yet
Development

No branches or pull requests

6 participants