Budibase/budibase · error

Error constructing OIDC refresh strategy: message=${err.mess

Error message

Error constructing OIDC refresh strategy: message=${err.message}

What it means

fetchSharePointListDocument streams a SharePoint list into CSV in memory and enforces a hard cap of 100 MB (MAX_SHAREPOINT_GENERATED_LIST_SIZE_BYTES). appendCsvRow checks the running byte total before appending each row and throws this HTTPError as soon as the next row would exceed the cap. The knowledge file simply is too large to ingest.

Source

Thrown at packages/backend-core/src/auth/auth.ts:100

    )
  })
}

async function refreshGoogleAccessToken(
  config: GoogleInnerConfig,
  refreshToken: any
): Promise<RefreshResponse> {
  let callbackUrl = await google.getCallbackUrl(config)

  let strategy
  try {
    strategy = await google.strategyFactory(
      config,
      callbackUrl,
      ssoSaveUserNoOp
    )
  } catch (err: any) {
    throw new Error(
      `Error constructing OIDC refresh strategy: message=${err.message}`
    )
  }

  refresh.use(strategy)

  return new Promise(resolve => {
    refresh.requestNewAccessToken(
      ConfigType.GOOGLE,
      refreshToken,
      (err: any, accessToken: string, refreshToken: string, params: any) => {
        resolve({ err, accessToken, refreshToken, params })
      }
    )
  })
}

interface RefreshResponse {

View on GitHub (pinned to a81a902e9a)

Solutions

  1. Filter or split the source list — point the knowledge source at a narrower list or add a view/filter so fewer rows are synced.
  2. Trim wide columns: remove or hide large text/multi-value fields so the generated CSV stays under 100 MB.
  3. Archive old list items into a separate list and sync only the active subset.
  4. If the data is genuinely needed, break it into multiple knowledge sources (one per list portion).
Defensive patterns

Strategy: validation

Validate before calling

// Estimate size before syncing: count items and cap columns
const { itemCount } = await graph(
  `/sites/${siteId}/lists/${listId}/items?$top=1&$count=true`
)
const estimatedBytes = itemCount * 2048 // rough per-row upper bound
if (estimatedBytes > 100 * 1024 * 1024) {
  throw new Error("List too large for a single knowledge source — filter or split it")
}

Try / catch

try {
  await fetchSharePointListDocument(token, siteId, listId)
} catch (e) {
  if (String(e.message).includes("exceeds the 100 MB knowledge file limit")) {
    // prompt user to filter/split the SharePoint list
  } else throw e
}

Prevention

When it happens

Trigger: A SharePoint list with very many items and/or very wide/large field values (multi-line text, attachments metadata, large JSON fields serialized via stableStringify) generates a CSV whose cumulative UTF-8 byte size passes 104857600 bytes.

Common situations: Syncing an archive-style list with hundreds of thousands of rows; columns containing huge multi-line 'Notes' or lookup/person fields serialized to JSON; lists that grew over time since the knowledge source was configured.

Related errors


AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29). Data as JSON: /api/errors/ae0db2481963e840. Report an issue: GitHub.