Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Request never resolves if URL is too long

オープン
#1,890 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript
領域
api

調査の方向性

Begin at the client.api(...).get() and select(...) entry points shown in the reproduction, then trace URL construction and request error handling. Add a regression test with an oversized URL and repeated $select fields, and verify that the request settles by resolving or rejecting as expected.

索引モデルが issue の本文から書いたものです。

説明

status:waiting-for-triage type:bug
Describe the bug

I had a bug in my code that tried to request a massive url like https://graph.microsoft.com/v1.0/sites/$siteId/drive/root/delta?token=$token&$select=[...], which was 16,343 characters long, mainly in the $select query param. When calling await client.api(url).get(), it never resolves or rejects but hangs forever.

Expected behavior

The request should resolve or throw an error.

How to reproduce

Call await client.api('https://graph.microsoft.com/v1.0/sites/$siteId/drive/root/delta?token=$token&$select=$select').get() with a sufficiently large value for $select. Fields can be repeated in $select, in my example the select content.downloadUrl,id,webUrl,file,folder,name,lastModifiedDateTime,lastModifiedBy,createdDateTime,createdBy,size,cTag,eTag,parentReference,deleted was repeated over 100 times.

SDK Version

3.0.7

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

No response

Configuration
  • MacOS Sequoia, Debian Bookworm

Does not appear to be specific to the configuration

Other information

The $select param should be deduplicated by the SDK. The way I ended up in this situation was I had code like this:

import {
  Client,
} from "@microsoft/microsoft-graph-client";

async function example(client: Client) {
  const siteId = "someid"
  const select = ["content.downloadUrl", "id", /*etc*/]
  const client: Client
  let cursor = ""
  
  while (true) {
    if (!cursor) cursor = `/site/${siteId}/drive/root/delta`
    const response = await client.get(cursor).select(select).get()
    cursor = response['@odata.nextLink']
    // Process data in response
    if (!cursor) break
  }
}

Eventually the select param gets so large that it causes this error

主要言語
TypeScript
スター
833
フォーク
240
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoftgraph/msgraph-sdk-javascript のほかの issue

microsoftgraph/msgraph-sdk-javascript の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。