Skip to content

[Bug] CI (macOS) / build (pull_request) fails with "Cannot read properties of undefined (reading 'tasks')" #4441

@malsyned

Description

@malsyned

Brief Issue Summary

On multiple unrelated pull requests from different authors, the macOS build CI task is failing in the same location.

Image

This is happening to PRs for which the Windows and Linux CI build tasks are succeeding.

This is a known problem but I don't see an issue ticket for it.

Examples of PRs with all other tests passing, but the macOS CI build task failing in this way:

#4405
#4427
#4440

CMake Tools Diagnostics

[Not applicable]

Debug Log

[Not applicable]

Additional Information

The error message in the CI log is always:

1) Coverage integration
       Good Run test with coverage:
     TypeError: Cannot read properties of undefined (reading 'tasks')
  	at Context.<anonymous> (out/test/end-to-end-tests/single-root-UI/test/coverage.test.js:48:38)

The indicated line in the JavaScript backtrace corresponds to test/end-to-end-tests/single-root-UI/test/coverage.test.ts:70 in the TypeScript source:

     test('Good Run test with coverage', async () => {
         await vscode.workspace.getConfiguration('cmake', vscode.workspace.workspaceFolders![0].uri).update('preRunCoverageTarget', 'init-coverage');
         await vscode.workspace.getConfiguration('cmake', vscode.workspace.workspaceFolders![0].uri).update('postRunCoverageTarget', 'capture-coverage');
 
         const testResult: any = await vscode.commands.executeCommand('testing.coverage.uri', vscode.Uri.file(testEnv.projectFolder.location));
>        expect(testResult['tasks'][0].hasCoverage).to.be.eq(true);
         expect(testResult['items'][2].computedState).to.be.eq(TestResultState.Passed);
         expect(fs.existsSync(path.join(testEnv.projectFolder.location, testEnv.buildLocation, 'lcov.info'))).to.be.true;
     }).timeout(60000);

Metadata

Metadata

Assignees

No one assigned

    Labels

    buga bug in the product

    Type

    No type

    Projects

    Status

    Completed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions