VS Code Cosmos DB extension: Query editor fails with "Cannot read properties of null (reading 'trim')" although connection succeeds

鈴木 伽奈 0 Reputation points
2026-11-13T11:24:42.73+00:00

CosmosDBのデータエクスプローラーでのクエリ検索をVSCode上で実行したい。

アカウントにはCosmos DBのデータプレーンロール(Built-in Data Reader)の権限を付与しており、ポータル上のCosmosDBでは問題なくクエリ検索ができる。

しかしVSCodeの拡張機能である「Azure Cosmos DB」ではクエリ検索ができず、下記エラーがターミナルで出力される。

2026-11-13 11:56:37.081 [info] fail Error: spawnSync cosmosdbshell ENOENT

2026-11-13 11:56:37.081 [info] while running "cosmosdbshell --version"

2026-11-13 11:56:37.081 [info] Cosmos DB Shell terminal context updated: closed

2026-11-13 11:56:37.082 [info] Cosmos DB Shell Extension: deactivated.

2026-11-13 11:56:37.082 [info] Error: Failed to process URI: Unable to find resource "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.DocumentDB/databaseAccounts/xxx". Please ensure the resource exists and try again.

2026-11-13 11:57:39.233 [error] Failed to resolve connection for query editor: Cannot read properties of null (reading 'trim')

Azure Cosmos DB
Azure Cosmos DB

An Azure NoSQL database service for app development.

0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.