Skip to content

Custom data for HTML not working #67544

Closed
@dbaeumer

Description

Testing #67306

Steps to reproduce:

  • new workspace
  • settings.json
{
	"html.experimental.customData": [
		{
			"version": 1,
			"tags": [
				{
					"name": "my-button",
					"description": "My button",
					"attributes": [
						{
							"name": "type",
							"description": "My button type",
							"values": [
								{
									"name": "alert"
								}
							]
						}
					]
				}
			]
		}
	]
}
  • reload VSCode
  • open a html file
  • you get the following exceptions in the console
extensionService.ts:786 Activating extension 'vscode.html-language-features' failed: The "path" argument must be of type string. Received type object.
t._logMessageInConsole @ extensionService.ts:786
t._logOrShowMessage @ extensionService.ts:800
e.$localShowMessage @ mainThreadExtensionService.ts:32
t._doInvokeHandler @ rpcProtocol.ts:390
t._invokeHandler @ rpcProtocol.ts:375
t._receiveRequest @ rpcProtocol.ts:295
t._receiveOneMessage @ rpcProtocol.ts:225
(anonymous) @ rpcProtocol.ts:100
e.fire @ event.ts:567
s @ ipc.net.ts:295
(anonymous) @ ipc.net.ts:302
e.fire @ event.ts:567
a @ ipc.net.ts:103
_socketDataListener @ ipc.net.ts:132
emit @ events.js:182
addChunk @ _stream_readable.js:279
readableAddChunk @ _stream_readable.js:264
Readable.push @ _stream_readable.js:219
onread @ net.js:636
console.ts:134 [Extension Host] Activating extension 'vscode.html-language-features' failed: The "path" argument must be of type string. Received type object. (at Object.showMessage (c:\Users\dirkb\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:735:501))
t.log @ console.ts:134
e.$logExtensionHostMessage @ mainThreadConsole.ts:39
t._doInvokeHandler @ rpcProtocol.ts:390
t._invokeHandler @ rpcProtocol.ts:375
t._receiveRequest @ rpcProtocol.ts:295
t._receiveOneMessage @ rpcProtocol.ts:225
(anonymous) @ rpcProtocol.ts:100
e.fire @ event.ts:567
s @ ipc.net.ts:295
(anonymous) @ ipc.net.ts:302
e.fire @ event.ts:567
a @ ipc.net.ts:103
_socketDataListener @ ipc.net.ts:132
emit @ events.js:182
addChunk @ _stream_readable.js:279
readableAddChunk @ _stream_readable.js:264
Readable.push @ _stream_readable.js:219
onread @ net.js:636
console.ts:134 [Extension Host] Activating extension `vscode.html-language-features` failed:  The "path" argument must be of type string. Received type object (at c:\Users\dirkb\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:331:101)
t.log @ console.ts:134
e.$logExtensionHostMessage @ mainThreadConsole.ts:39
t._doInvokeHandler @ rpcProtocol.ts:390
t._invokeHandler @ rpcProtocol.ts:375
t._receiveRequest @ rpcProtocol.ts:295
t._receiveOneMessage @ rpcProtocol.ts:225
(anonymous) @ rpcProtocol.ts:100
e.fire @ event.ts:567
s @ ipc.net.ts:295
(anonymous) @ ipc.net.ts:302
e.fire @ event.ts:567
a @ ipc.net.ts:103
_socketDataListener @ ipc.net.ts:132
emit @ events.js:182
addChunk @ _stream_readable.js:279
readableAddChunk @ _stream_readable.js:264
Readable.push @ _stream_readable.js:219
onread @ net.js:636
console.ts:134 [Extension Host] Here is the error stack:  TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type object
	at assertPath (path.js:39:11)
	at Object.resolve (path.js:168:7)
	at t.getCustomDataPathsInAllWorkspaces.e.forEach.n.workspaceFolderValue.n.workspaceFolderValue.experimental.n.workspaceFolderValue.experimental.customData.n.workspaceFolderValue.experimental.customData.forEach.n (c:\Users\dirkb\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\html-language-features\client\dist\htmlMain.js:53:44216)
	at Array.forEach (<anonymous>)
	at t.getCustomDataPathsInAllWorkspaces.e.forEach.e (c:\Users\dirkb\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\html-language-features\client\dist\htmlMain.js:53:44195)
	at Array.forEach (<anonymous>)
	at Object.t.getCustomDataPathsInAllWorkspaces (c:\Users\dirkb\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\html-language-features\client\dist\htmlMain.js:53:43957)
	at t.activate (c:\Users\dirkb\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\html-language-features\client\dist\htmlMain.js:1:117753)
	at Function.t._callActivateOptional (c:\Users\dirkb\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:741:354)
	at Function.t._callActivate (c:\Users\dirkb\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:741:25)
	at c:\Users\dirkb\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:740:206 (at c:\Users\dirkb\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:331:183)

After that the HTML extension is dead. No code complete anymore

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bughtmlHTML support issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions