You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: Cannot read property 'length' of null
at t.i.getLinesContent (
at t.i.toRawText (
at t._beginModelSync (
at t.esureSyncedResources (
at
at then (
at t._withSyncedResources (
at t.computeDirtyDiff (
at
at then (
Windows:
TypeError: Cannot read property 'length' of null
at t.i.getLinesContent (out/vs/workbench/workbench.main.js:56:3263)
at t.i.toRawText (out/vs/workbench/workbench.main.js:55:31077)
at t._beginModelSync (out/vs/workbench/workbench.main.js:58:1255)
at t.esureSyncedResources (out/vs/workbench/workbench.main.js:58:726)
at out/vs/workbench/workbench.main.js:58:3183
at then (out/vs/workbench/workbench.main.js:31:14808)
at t._withSyncedResources (out/vs/workbench/workbench.main.js:58:3129)
at t.computeDirtyDiff (out/vs/workbench/workbench.main.js:58:3419)
at out/vs/workbench/workbench.main.js:57:30943
at then (out/vs/workbench/workbench.main.js:31:14808)
The text was updated successfully, but these errors were encountered:
Root cause:
The telemetry service strips PII of of callstacks before logging them as a telemetry event.
Following regex matches are used in the process
the app root (eg: /Users/me/Downloads/Visual Studio Code/.app/Contents/Resources/app)
the extensions folder (eg: /Users/me/.vscode/extensions)
/file:///.*?/resources/app//gi
/file:///.*/gi
A sample call stack is as follows:
TypeError: Cannot read property 'length' of null
at t.i.getLinesContent (files:////Users/me/Downloads/Visual Studio Code/.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:56:3263)
at t.i.toRawText (files:////Users/me/Downloads/Visual Studio Code/.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:55:31077)
........
After the first regex replace, we have
TypeError: Cannot read property 'length' of null
at t.i.getLinesContent (files:////out/vs/workbench/workbench.main.js:56:3263)
at t.i.toRawText (files:////out/vs/workbench/workbench.main.js:55:31077)
........
Second and Third in this case do not have any net change
The Fourth regex replace removes the important filepath info leaving us with
TypeError: Cannot read property 'length' of null
at t.i.getLinesContent (
at t.i.toRawText (
........
This doesn't happen in Windows because the first regex never gets any match due to conflicts between forward and back slashes, the third regex does the real job of stripping out PII along with the files:/// prefix
The unit tests didnt catch this because only the last 2 regex get applied by default. The first 2 are passed as config which is done by production code but not the unit tests.
So we just got lucky.
Errors from extensions do not have this problem, they don't have the files:/// prefix
Linux/Mac:
TypeError: Cannot read property 'length' of null
at t.i.getLinesContent (
at t.i.toRawText (
at t._beginModelSync (
at t.esureSyncedResources (
at
at then (
at t._withSyncedResources (
at t.computeDirtyDiff (
at
at then (
Windows:
TypeError: Cannot read property 'length' of null
at t.i.getLinesContent (out/vs/workbench/workbench.main.js:56:3263)
at t.i.toRawText (out/vs/workbench/workbench.main.js:55:31077)
at t._beginModelSync (out/vs/workbench/workbench.main.js:58:1255)
at t.esureSyncedResources (out/vs/workbench/workbench.main.js:58:726)
at out/vs/workbench/workbench.main.js:58:3183
at then (out/vs/workbench/workbench.main.js:31:14808)
at t._withSyncedResources (out/vs/workbench/workbench.main.js:58:3129)
at t.computeDirtyDiff (out/vs/workbench/workbench.main.js:58:3419)
at out/vs/workbench/workbench.main.js:57:30943
at then (out/vs/workbench/workbench.main.js:31:14808)
The text was updated successfully, but these errors were encountered: