{"record":{"id":"ae0db2481963e840","repo":"Budibase/budibase","slug":"error-constructing-oidc-refresh-strategy-message","errorCode":null,"errorMessage":"Error constructing OIDC refresh strategy: message=${err.message}","messagePattern":"Error constructing OIDC refresh strategy: message=(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/backend-core/src/auth/auth.ts","lineNumber":100,"sourceCode":"    )\n  })\n}\n\nasync function refreshGoogleAccessToken(\n  config: GoogleInnerConfig,\n  refreshToken: any\n): Promise<RefreshResponse> {\n  let callbackUrl = await google.getCallbackUrl(config)\n\n  let strategy\n  try {\n    strategy = await google.strategyFactory(\n      config,\n      callbackUrl,\n      ssoSaveUserNoOp\n    )\n  } catch (err: any) {\n    throw new Error(\n      `Error constructing OIDC refresh strategy: message=${err.message}`\n    )\n  }\n\n  refresh.use(strategy)\n\n  return new Promise(resolve => {\n    refresh.requestNewAccessToken(\n      ConfigType.GOOGLE,\n      refreshToken,\n      (err: any, accessToken: string, refreshToken: string, params: any) => {\n        resolve({ err, accessToken, refreshToken, params })\n      }\n    )\n  })\n}\n\ninterface RefreshResponse {","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/backend-core/src/auth/auth.ts#L82-L118","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Filter or split the source list — point the knowledge source at a narrower list or add a view/filter so fewer rows are synced.","Trim wide columns: remove or hide large text/multi-value fields so the generated CSV stays under 100 MB.","Archive old list items into a separate list and sync only the active subset.","If the data is genuinely needed, break it into multiple knowledge sources (one per list portion)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Estimate size before syncing: count items and cap columns\nconst { itemCount } = await graph(\n  `/sites/${siteId}/lists/${listId}/items?$top=1&$count=true`\n)\nconst estimatedBytes = itemCount * 2048 // rough per-row upper bound\nif (estimatedBytes > 100 * 1024 * 1024) {\n  throw new Error(\"List too large for a single knowledge source — filter or split it\")\n}","typeGuard":null,"tryCatchPattern":"try {\n  await fetchSharePointListDocument(token, siteId, listId)\n} catch (e) {\n  if (String(e.message).includes(\"exceeds the 100 MB knowledge file limit\")) {\n    // prompt user to filter/split the SharePoint list\n  } else throw e\n}","preventionTips":["Estimate list size (item count × average row size) before configuring a knowledge source.","Exclude or hide large multi-line/multi-value columns from the synced list.","Archive old items into separate lists and sync only active subsets.","Monitor list growth over time and re-check the 100 MB budget periodically."],"tags":["sharepoint","csv","size-limit","knowledge-source"],"backgroundTag":"file-size-limit-exceeded","analyzedSha":"a81a902e9a8fe55b467d106765f6638f12e35c49","analyzedAt":"2026-08-29T01:03:10.972Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}