Replies: 7 comments 2 replies
-
To reproduce this error: Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'attribution-reporting'. GET https://thebeatentrail-supabase.vercel.app/ 404 (Not Found) 408-09d1499de47de96d.js:1
e @ 408-09d1499de47de96d.js:1 Clicking onto the error reveals this code as the offending error generator: ...which appears to be running in the file Specifically the line: ...that reports the 404 when attempting to call the parsed url: I hope this helps and get us closer to a resolution. Rich |
Beta Was this translation helpful? Give feedback.
-
@AlessioGr I hope these details were helpful, were you able to reproduce this issue? I can be available via chat to walk you through any questions about this. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@AlessioGr I updated my payload.config.ts file to include a few sites in the csrf array to reflect the possible domains that Vercel dynamically assigned during their build process. Not only did that not improve this problem it actually spawned a few more warnings:
admin:1 Refused to load the font 'data:font/woff2;base64,d09GMgABAAAAAQ5sABIAAAADuOQAAQ4EAAEAgwAAAAAAAAAAAAAAAAAAAAAAAAAAG4SpIhy4XhSHMgZgAJJmCF4JgnMREAqGskiFyggSgrVoATYCJAOdOAuOXgAEIAWPGAfGYAyDGFsKfLME/nOMvX+HnQoMqyRqK6tt2TW8K2BDX9Umu4PZkCXwtMjpcHYNTx6UUmu30UdwcxxnVMvcNgAim7rdXiPZ////////////C5dF2ObuXM7ZvQeSECARwueHlaLVtkJEIaLRAI3ulswSE13cSPdM15RCyYQuuS7A0mBqpQO9pYZWQQMqa9lQb0dpJzHxHpLyCHIi8uBdwF58nNH+YOA40OpJvEjJtaokKaUkx/N5UeSinp5TWoW1vSpFjimBgeFGeCF66U0n6ZUN/qSqC4XC11GKUNmzSy2d5Jxyqw5JzGUlJUnyi0lKkE8BlxadTZsyRm8c1/Cti2hEjzIHnuOZ0fU6OjKc...FVw9csGnQ1BnbMbfzgRj3WjPytwZYWpPh3OtmsLZaNcxxqaGVqMVqFffFpU8bbs/0N1vG3POWfS7LUeB81TfHn+VbD7x/UnT3lXyFltHfdX6+X6Rzmg9d4dAISK7GlTj2zgME/JUwAETAECwABAUgUmAysrKI5shRwAchnFSMheQ8UoKlvnVbkW9mMeq2+bbO9EQ2q09Z9wzsADarYt4ftoamBDi8gmfbZKnl+lkZWyRx1VYVSIpVFXs9VXy9ytCyTNYt09YIAGKjqpDT22SgOdP5OsdAK/vOCXFnrpEwA/PPTJiopB7HxZV+MlaGCT/04K/LY3kjPYV/YR146Ggg+9sX6na/c2So+Epz3PXve3PKRylPIhNZASBUYVDIGhikiWc1jj/claeVCJvljX7JfvO+xhfTDIjSXBs4HV16Ol/BMfcuFQ4NRmDOWEh6diOI6NZmGl87N9J+r2JfpW2+5NhV/fGHLO57Yavbq7zaCewa/RDxp/aSH+luOPwAA' because it violates the following Content Security Policy directive: "font-src 'self'". 408-09d1499de47de96d.js:1 Refused to connect to 'https://thebeatentrail-supabase.vercel.app/api/users/me' because it violates the following Content Security Policy directive: "connect-src 'self' https://checkout.stripe.com https://api.stripe.com https://maps.googleapis.com". e @ 408-09d1499de47de96d.js:1 iB @ fd9d1056-35ddd8600555f926.js:9 (anonymous) @ fd9d1056-35ddd8600555f926.js:9 If the consistently reported issue is always '/api/users/me' - which appears to be an authentication file, is there a possible missing step during installation (or, in my case during deployment on Vercel)? |
Beta Was this translation helpful? Give feedback.
-
Hey @richleach - this seems like a problem with your setup, rather than Payload itself, so I am going to convert this into a Discussion and we can help assist you there. But I think in order for us to be helpful here, we really will need a minimal, reproducible example. And I see that you have a lot of different issues / questions here so I would say in order for us to help you as easily as possible, we should try and focus on one thing at a time. One thing from me is that by looking at this for a quick second, I see that you are trying to load
I don't see that you are running Payload on your Vercel website, so that endpoint is 404'ing. |
Beta Was this translation helpful? Give feedback.
-
James |
Beta Was this translation helpful? Give feedback.
-
... and unfortunately I got a little over-zealous and opened up more than 1 thread trying to remedy this issue, which is why you'll find other threads with me asking about NEXT_PUBLIC_SERVER_URL and other necessary environment variable settings as I originally suspected a path issue when I saw this error: However about that same time others started chiming in to inform me that Payload was never going to work on Vercel's serverless environment and that I needed to deploy on a different environment with a Node server separate from the Payload content.... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Link to reproduction
https://thebeatentrail-supabase.vercel.app/
Describe the Bug
I created a site deployment on Vercel for my Payload CMS application - everything has tested OK/passed on my dev server.
I received confirmation that my site built successfully - no errors. When I click the link https://thebeatentrail-supabase.vercel.app/ the site loads (my headers/footers/nav are all there) but any page that has content from the /admin is not loading, I get a 404 page displayed (by design). The console displays....
Uncaught (in promise) Error: An error occurred while fetching your account.
When I drill down into the error message I can see the following:
n.useEffect)(()=>{
let e = async()=>{
try {
let e = await fetch("".concat("https://thebeatentrail-supabase.vercel.app", "/api/users/me"), {
method: "GET",
credentials: "include",
headers: {
"Content-Type": "application/json"
}
});
if (e.ok) {
let {user: t} = await e.json();
l(t || null),
s(t ? "loggedIn" : void 0)
} else
throw Error("An error occurred while fetching your account.")
} catch (e) {
throw l(null),
Error("An error occurred while fetching your account.")
}
};
To Reproduce
I visit the link https://thebeatentrail-supabase.vercel.app/
.... the homepage, as an example, and even the page /terms (are pages I built using the /admin console of the CMS) will not load and the corresponding 404 messages are displayed.
The page /videos is a hard-coded file served from the file system (not my Supabase database). This page loads successfully.
Payload Version
"payload": "^2.0.0",
Adapters and Plugins
db: postgresAdapter({
pool: {
connectionString: process.env.DATABASE_URI,
},
push: false,
}),
Beta Was this translation helpful? Give feedback.
All reactions