Open
Description
Describe the Bug
I created a brand-new app and connected to a Vercel-managed Postgres instance. I opened the admin panel and clicked the seed button. Seeding fails with this error while adding the related posts to the first post:
[16:01:02] ERROR: Error validating filter options for collection posts
err: {
"type": "NotFound",
"message": "Not Found",
"stack":
NotFound: Not Found
at findByIDOperation (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]_cawqsxv2rsw3o2qcs57mgzb6au/node_modules/payload/dist/collections/operations/findByID.js:70:23)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async populateAuthors (webpack-internal:///(rsc)/./src/collections/Posts/hooks/populateAuthors.ts:13:31)
at async eval (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]_cawqsxv2rsw3o2qcs57mgzb6au/node_modules/payload/dist/collections/operations/find.js:205:30)
at async eval (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]_cawqsxv2rsw3o2qcs57mgzb6au/node_modules/payload/dist/collections/operations/find.js:203:17)
at async Promise.all (index 1)
at async findOperation (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]_cawqsxv2rsw3o2qcs57mgzb6au/node_modules/payload/dist/collections/operations/find.js:201:19)
at async validateFilterOptions (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]_cawqsxv2rsw3o2qcs57mgzb6au/node_modules/payload/dist/fields/validations.js:404:36)
at async promise (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]_cawqsxv2rsw3o2qcs57mgzb6au/node_modules/payload/dist/fields/hooks/beforeChange/promise.js:84:38)
at async Promise.all (index 0)
at async traverseFields (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]_cawqsxv2rsw3o2qcs57mgzb6au/node_modules/payload/dist/fields/hooks/beforeChange/traverseFields.js:38:5)
at async promise (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]_cawqsxv2rsw3o2qcs57mgzb6au/node_modules/payload/dist/fields/hooks/beforeChange/promise.js:309:17)
at async Promise.all (index 1)
at async traverseFields (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]_cawqsxv2rsw3o2qcs57mgzb6au/node_modules/payload/dist/fields/hooks/beforeChange/traverseFields.js:38:5)
at async promise (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]_cawqsxv2rsw3o2qcs57mgzb6au/node_modules/payload/dist/fields/hooks/beforeChange/promise.js:333:17)
at async Promise.all (index 1)
at async traverseFields (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]_cawqsxv2rsw3o2qcs57mgzb6au/node_modules/payload/dist/fields/hooks/beforeChange/traverseFields.js:38:5)
at async beforeChange (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]_cawqsxv2rsw3o2qcs57mgzb6au/node_modules/payload/dist/fields/hooks/beforeChange/index.js:22:5)
at async updateByIDOperation (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]_cawqsxv2rsw3o2qcs57mgzb6au/node_modules/payload/dist/collections/operations/updateByID.js:253:22)
at async seed (webpack-internal:///(rsc)/./src/endpoints/seed/index.ts:267:5)
at async Object.seedHandler [as handler] (webpack-internal:///(rsc)/./src/endpoints/seedHandler.ts:22:9)
at async handleCustomEndpoints (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected][email protected][email protected][email protected]_next@15._wfgcrxf5fm4ki4drr4c2hbztpi/node_modules/@payloadcms/next/dist/routes/rest/index.js:198:19)
at async eval (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected][email protected][email protected][email protected]_next@15._wfgcrxf5fm4ki4drr4c2hbztpi/node_modules/@payloadcms/next/dist/routes/rest/index.js:420:36)
at async AppRouteRouteModule.do (/home/stevekuznetsov/code/NWACus/website/src/github.com/NWACus/website/node_modules/.pnpm/[email protected][email protected][email protected]__react@19_7kfqem4pd6aim6nxuy4v6dxrry/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:10:32709)
at async AppRouteRouteModule.handle (/home/stevekuznetsov/code/NWACus/website/src/github.com/NWACus/website/node_modules/.pnpm/[email protected][email protected][email protected]__react@19_7kfqem4pd6aim6nxuy4v6dxrry/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:10:38210)
at async doRender (/home/stevekuznetsov/code/NWACus/website/src/github.com/NWACus/website/node_modules/.pnpm/[email protected][email protected][email protected]__react@19_7kfqem4pd6aim6nxuy4v6dxrry/node_modules/next/dist/server/base-server.js:1493:42)
at async responseGenerator (/home/stevekuznetsov/code/NWACus/website/src/github.com/NWACus/website/node_modules/.pnpm/[email protected][email protected][email protected]__react@19_7kfqem4pd6aim6nxuy4v6dxrry/node_modules/next/dist/server/base-server.js:1834:28)
at async DevServer.renderToResponseWithComponentsImpl (/home/stevekuznetsov/code/NWACus/website/src/github.com/NWACus/website/node_modules/.pnpm/[email protected][email protected][email protected]__react@19_7kfqem4pd6aim6nxuy4v6dxrry/node_modules/next/dist/server/base-server.js:1878:28)
at async DevServer.renderPageComponent (/home/stevekuznetsov/code/NWACus/website/src/github.com/NWACus/website/node_modules/.pnpm/[email protected][email protected][email protected]__react@19_7kfqem4pd6aim6nxuy4v6dxrry/node_modules/next/dist/server/base-server.js:2292:24)
at async DevServer.renderToResponseImpl (/home/stevekuznetsov/code/NWACus/website/src/github.com/NWACus/website/node_modules/.pnpm/[email protected][email protected][email protected]__react@19_7kfqem4pd6aim6nxuy4v6dxrry/node_modules/next/dist/server/base-server.js:2330:32)
at async DevServer.pipeImpl (/home/stevekuznetsov/code/NWACus/website/src/github.com/NWACus/website/node_modules/.pnpm/[email protected][email protected][email protected]__react@19_7kfqem4pd6aim6nxuy4v6dxrry/node_modules/next/dist/server/base-server.js:984:25)
at async NextNodeServer.handleCatchallRenderRequest (/home/stevekuznetsov/code/NWACus/website/src/github.com/NWACus/website/node_modules/.pnpm/[email protected][email protected][email protected]__react@19_7kfqem4pd6aim6nxuy4v6dxrry/node_modules/next/dist/server/next-server.js:281:17)
at async DevServer.handleRequestImpl (/home/stevekuznetsov/code/NWACus/website/src/github.com/NWACus/website/node_modules/.pnpm/[email protected][email protected][email protected]__react@19_7kfqem4pd6aim6nxuy4v6dxrry/node_modules/next/dist/server/base-server.js:877:17)
at async /home/stevekuznetsov/code/NWACus/website/src/github.com/NWACus/website/node_modules/.pnpm/[email protected][email protected][email protected]__react@19_7kfqem4pd6aim6nxuy4v6dxrry/node_modules/next/dist/server/dev/next-dev-server.js:373:20
at async Span.traceAsyncFn (/home/stevekuznetsov/code/NWACus/website/src/github.com/NWACus/website/node_modules/.pnpm/[email protected][email protected][email protected]__react@19_7kfqem4pd6aim6nxuy4v6dxrry/node_modules/next/dist/trace/trace.js:157:20)
at async DevServer.handleRequest (/home/stevekuznetsov/code/NWACus/website/src/github.com/NWACus/website/node_modules/.pnpm/[email protected][email protected][email protected]__react@19_7kfqem4pd6aim6nxuy4v6dxrry/node_modules/next/dist/server/dev/next-dev-server.js:370:24)
at async invokeRender (/home/stevekuznetsov/code/NWACus/website/src/github.com/NWACus/website/node_modules/.pnpm/[email protected][email protected][email protected]__react@19_7kfqem4pd6aim6nxuy4v6dxrry/node_modules/next/dist/server/lib/router-server.js:183:21)
at async handleRequest (/home/stevekuznetsov/code/NWACus/website/src/github.com/NWACus/website/node_modules/.pnpm/[email protected][email protected][email protected]__react@19_7kfqem4pd6aim6nxuy4v6dxrry/node_modules/next/dist/server/lib/router-server.js:360:24)
at async requestHandlerImpl (/home/stevekuznetsov/code/NWACus/website/src/github.com/NWACus/website/node_modules/.pnpm/[email protected][email protected][email protected]__react@19_7kfqem4pd6aim6nxuy4v6dxrry/node_modules/next/dist/server/lib/router-server.js:384:13)
at async Server.requestListener (/home/stevekuznetsov/code/NWACus/website/src/github.com/NWACus/website/node_modules/.pnpm/[email protected][email protected][email protected]__react@19_7kfqem4pd6aim6nxuy4v6dxrry/node_modules/next/dist/server/lib/start-server.js:142:13)
"data": null,
"isOperational": true,
"isPublic": false,
"status": 404,
"name": "NotFound"
}
GET /api/seed 500 in 20353ms
[16:01:02] ERROR: The following field is invalid: relatedPosts
I've added loads of debugging information and I can fetch all of the posts, cycle through them and execute the meat of the populateAuthors
logic - fetching the authors - with no issue whatsoever. As far as I can tell there is nothing in the posts
table after this script runs and fails.
Link to the code that reproduces this issue
Reproduction Steps
npx create-payload-app@beta website -t website
# use the Vercel Postgres option for storage, add a connection string
pnpm install && pnpm dev
# open the admin panel and click on seed
Which area(s) are affected? (Select all that apply)
area: templates
Environment Info
$ pnpm payload info
[email protected] payload /home/stevekuznetsov/code/NWACus/website/src/github.com/NWACus/website
cross-env NODE_OPTIONS=--no-deprecation payload "info"
Binaries:
Node: 20.17.0
npm: 10.8.2
Yarn: 1.22.22
pnpm: 9.12.2
Relevant Packages:
payload: 3.0.0-beta.119
next: 15.0.0
@payloadcms/email-nodemailer: 3.0.0-beta.119
@payloadcms/graphql: 3.0.0-beta.119
@payloadcms/live-preview: 3.0.0-beta.119
@payloadcms/live-preview-react: 3.0.0-beta.119
@payloadcms/next/utilities: 3.0.0-beta.119
@payloadcms/payload-cloud: 3.0.0-beta.119
@payloadcms/plugin-form-builder: 3.0.0-beta.119
@payloadcms/plugin-nested-docs: 3.0.0-beta.119
@payloadcms/plugin-redirects: 3.0.0-beta.119
@payloadcms/plugin-search: 3.0.0-beta.119
@payloadcms/plugin-seo: 3.0.0-beta.119
@payloadcms/richtext-lexical: 3.0.0-beta.119
@payloadcms/translations: 3.0.0-beta.119
@payloadcms/ui/shared: 3.0.0-beta.119
react: 19.0.0-rc-65a56d0e-20241020
react-dom: 19.0.0-rc-65a56d0e-20241020
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP PREEMPT_DYNAMIC Thu Oct 10 22:31:19 UTC 2024
Available memory (MB): 64191
Available CPU cores: 16