question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No information for Error: Debug Failure. No error for last overload signature

See original GitHub issue

TypeScript Version: 3.7.2

Search Terms: Debug Failure, No error for last overload signature, Typescript 3.7.2, Sonar

Code / Error Code is not available - executing entity is sonar runner

As well formatted image image

or as code…

Analyzing 292 typescript file(s) with the following configuration file /jenkins/workspace/Viper/Nova-Web/trunk/nova/packages/Nova/nova-app/tsconfig.json
00:20:19  00:20:18.347 ERROR - /jenkins/workspace/Viper/Nova-Web/trunk/nova/node_modules/typescript/lib/typescript.js:2137
00:20:19  00:20:18.347 ERROR -             throw e;
00:20:19  00:20:18.347 ERROR -             ^
00:20:19  00:20:18.347 ERROR - 
00:20:19  00:20:18.347 ERROR - Error: Debug Failure. No error for last overload signature
00:20:19  00:20:18.347 ERROR -     at resolveCall (/jenkins/workspace/Viper/Nova-Web/trunk/nova/node_modules/typescript/lib/typescript.js:55202:38)
00:20:19  00:20:18.348 ERROR -     at resolveCallExpression (/jenkins/workspace/Viper/Nova-Web/trunk/nova/node_modules/typescript/lib/typescript.js:55548:20)
00:20:19  00:20:18.348 ERROR -     at resolveSignature (/jenkins/workspace/Viper/Nova-Web/trunk/nova/node_modules/typescript/lib/typescript.js:55904:28)
00:20:19  00:20:18.348 ERROR -     at getResolvedSignature (/jenkins/workspace/Viper/Nova-Web/trunk/nova/node_modules/typescript/lib/typescript.js:55935:26)
00:20:19  00:20:18.348 ERROR -     at getContextualTypeForArgumentAtIndex (/jenkins/workspace/Viper/Nova-Web/trunk/nova/node_modules/typescript/lib/typescript.js:52352:118)
00:20:19  00:20:18.348 ERROR -     at getContextualTypeForArgument (/jenkins/workspace/Viper/Nova-Web/trunk/nova/node_modules/typescript/lib/typescript.js:52347:50)
00:20:19  00:20:18.348 ERROR -     at getContextualType (/jenkins/workspace/Viper/Nova-Web/trunk/nova/node_modules/typescript/lib/typescript.js:52718:28)
00:20:19  00:20:18.348 ERROR -     at getApparentTypeOfContextualType (/jenkins/workspace/Viper/Nova-Web/trunk/nova/node_modules/typescript/lib/typescript.js:52620:17)
00:20:19  00:20:18.348 ERROR -     at getContextualSignature (/jenkins/workspace/Viper/Nova-Web/trunk/nova/node_modules/typescript/lib/typescript.js:52924:24)
00:20:19  00:20:18.348 ERROR -     at getContextuallyTypedParameterType (/jenkins/workspace/Viper/Nova-Web/trunk/nova/node_modules/typescript/lib/typescript.js:52200:39)
00:20:19  00:20:18.390 ERROR - External process `node --max-old-space-size=2048 /jenkins/workspace/Viper/Nova-Web/trunk/nova/packages/Nova/nova-app/.sonar/sonarts-bundle/node_modules/tslint-sonarts/bin/tsrunner` returned an empty output. Run with -X for more information

Expected behavior: Should give some additional information what the problem is

Actual behavior: When looking at the error, I have no idea if it’s an issue with my application code, with sonar or with typescript itself

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:4
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
ksabrycommented, Sep 30, 2021

I have encountered this issue in TypeScript 4.4.3, I don’t know if further examples are wanted but this minimal repro may be useful since it’s standalone (no packages); the error seems to occur no matter the tsconfig options, I tested that it still occurs with no tsconfig at all.

interface CollectionDocument<TIdPrefix extends string> {
	id: `${TIdPrefix}_${string}`;
}

type CollectionDocumentIdPrefix<TCollectionDocument extends CollectionDocument<string>> =
	TCollectionDocument["id"] extends `${infer TIdPrefix}_${string}` ? TIdPrefix : never;

type CollectionSpecs = { [name: string]: CollectionDocument<string>; };

type CollectionSpecNames<TCollectionNames extends string> = TCollectionNames | `History_${TCollectionNames}`;

interface HistoryDocument<TDocument extends CollectionDocument<string>> extends CollectionDocument<`hist_${CollectionDocumentIdPrefix<TDocument>}`> {
	document: TDocument | null;
}

type CollectionFromName<
	TCollectionSpecs extends CollectionSpecs,
	TCollectionName extends CollectionSpecNames<keyof TCollectionSpecs & string>,
> =
	TCollectionName extends `History_${infer TOriginalCollectionName}`
		? Collection<HistoryDocument<TCollectionSpecs[TOriginalCollectionName]>>
		: Collection<TCollectionSpecs[TCollectionName]>;

class Driver<TCollectionSpecs extends CollectionSpecs = CollectionSpecs> {
	public getCollection<TCollectionName extends CollectionSpecNames<keyof TCollectionSpecs & string>>(): CollectionFromName<TCollectionSpecs, TCollectionName> {
		// This line seems to be the origin of the error, the 'this' argument specifically
		return new Collection<CollectionDocument<string>>(this) as any;
	}
}

class Collection<TDocument extends CollectionDocument<string>> {
	public driver: Driver;
	public document: TDocument;

	public constructor(driver: Driver) {
		this.driver = driver;
	}
}
1reaction
tuomokarcommented, Jun 15, 2021

I had this with the latest version of TypeScript (currently 4.3.2), but setting the “includes” property in tsconfig.json removed the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debug Failure. No error for last overload signature ... - GitHub
TypeScript Version: 3.6.2 Search Terms: debug failure overload signature After upgrading our large app from TS 3.5.2 to to TS 3.6.2, ...
Read more >
NestJS/Prisma gives "Error Debug Failure" without any ...
I'm sure it's my mistake but it would be nice if NestJS gave me some more info. To be complete, my tsconfig.json looks...
Read more >
Microsoft/TypeScript - Gitter
trying to run some tests with ts-mocha, and just getting "Code generation failed" with no further clues. any suggestions? just "Error: Debug Failure....
Read more >
TypeScript errors and how to fix them
error TS2394: This overload signature is not compatible with its implementation signature. Broken Code ❌. The implementation does not match all signatures: 1...
Read more >
Debug.Fail Method (System.Diagnostics) - Microsoft Learn
Emits an error message. ... You can also use the Fail method in a switch statement. ... If the DefaultTraceListener is not in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found