Skip to content

Uncaught TypeError: Cannot read property 'phase' of null when running extension tests against 1.42.0 #90484

@awschristou

Description

@awschristou
  • VSCode Version: 1.42.0
  • OS Version: Windows 10 / Ubuntu

We're seeing the following error sporadically when running tests for our VS Code extension when running against extension host v1.42.0:

     Uncaught TypeError: Cannot read property 'phase' of null
      at Object.onError (c:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:8:74)
      at t.onError (c:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:13:120)
      at c:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:19:185
      at FSReqCallback.oncomplete (fs.js:153:23)

This error comes up on random tests. The error does not occur on prior versions (1.40.0, 1.41.1).
This error seems to occur when running tests a subsequent time on a system (not the first time a specific version of the extension host is run).

The related change appears to be introduced in 62d864e (hi @jrieken ) which was first released in version 1.42.0

I suspect that err is not checked against undefined at 62d864e#diff-2fb38bae61fff73014a86d01a6f61ecaR926 which ends up getting accessed in defaultOnError at

if (err.phase === 'loading') {

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions