primocms / primo

Primo is a visual CMS with a built-in code editor, Svelte blocks, and static site generator.
https://primocms.org
MIT License
1.9k stars 459 forks source link

error when integrating collaborators #371

Open estefany00170 opened 4 months ago

estefany00170 commented 4 months ago

Please add as much information as possible to help us reproduce the issue. when I enter collaborators, it sends an email that redirects to Create account after the passwords are entered and the Create account button is clicked, it throws an internal error 500 ![Uploading iScreen Shoter - 20240118142445765.jpg…]()

mateomorris commented 4 months ago

I can't reproduce this - when I invite an email address and they enter their email and click 'Create account' it goes through without issue. Could you try inviting a different email address (maybe a gmail account or a temporary email from https://temp-mail.org/en)? Also - can you see the error logs in Vercel or wherever you're hosting your primo server?

estefany00170 commented 3 months ago

we just made a test, this is the error we're having

TypeError: Cannot read properties of null (reading 'id') at default (file:///var/task/.svelte-kit/output/server/entries/pages/auth/set-password/_page.server.js:9:75) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async handle_action_request (file:///var/task/.svelte-kit/output/server/index.js:443:18) at async render_page (file:///var/task/.svelte-kit/output/server/index.js:1880:23) at async resolve (file:///var/task/.svelte-kit/output/server/index.js:2645:24) at async Object.handle (file:///var/task/.svelte-kit/output/server/chunks/hooks.server.js:17:20) at async respond (file:///var/task/.svelte-kit/output/server/index.js:2531:22) at async Server.default (file:///var/task/.svelte-kit/vercel-tmp/index.js:47:3) at async Server. (/var/task/_vc/launcher/bridge-server-DRMDGSVU.js:1:9199)

mateomorris commented 2 months ago

I still can't reproduce this and it's hard to tell what's going on just based on this information. Did you try testing with a different email address? And I need to see if your vercel project shows any logs when you invite the collaborator

image
GreenerLeaf commented 1 month ago

Hey there, I've been testing Primo and I've been encountering the exact same issue when attempting to invite either site or primo collaborators. I encounter this both when attempting to add a collaborator through the "Invite Server Member" menu on the top right or adding a site collaborator through the collaborators button and subsequent "Invite Site Collaborator" menu. Tested with multiple different email addresses, They are able to access the sign-up page and set a password but Vercel reports an Internal Server Error before the password is actually set in Supabase. Within Supabase, My Site URL and Redirect URL is set to my Primo Vercel deployment.

Here are screenshots showing the issue from a collaborator and what it looks like on my end with Vercel logs: image Medal_ZGnnfaQeV7

Quick Addition: Here's also the raw code from the error I received during authentication. Hopefully Github formats this properly. TypeError: Cannot read properties of null (reading 'id') at default (file:///var/task/.svelte-kit/output/server/entries/pages/auth/set-password/_page.server.js:9:75) at process.processTicksandRejections (node:internal/process/task_queues:95:5) at async handle_action_request (file:///var/task/,svelte-kit.output/server/index.js:443:18) at async render_page (file:///var/task/.svelte-kit/output/server/index.js:1880:23) at async resolve (file:///var/task/.svelte-kit/output/server/index.js:2645:24) at async Object.handle (file:///var/task/.svelte-kit/output/server/chunks/hooks.server.js:17:20) at async respond (file:///var/task/.svelte-kit/output/server/index.js:2531:22) at async Server.default (file:///var/task/.svelte-kit/vercel-tmp/index.js:47:3) at async Server.<anonymous> (/opt/rust/nodejs.js:7:3422)

I hid some of the info like host names and account names for personal reasons but those probably won't interfere with the bug report itself. I hope this information proves to be beneficial with troubleshooting and I'm glad that I'm not the only one who has encountered that. My guess is that it may possibly be to do with Vercel as a hosting provider rather than Primo or Supabase on their own but I'm still pretty new with this stuff in general and I still need to set up SMTP for Supabase email as I'm excited to have team members onboard with using these tools and resources.

mateomorris commented 1 month ago

@GreenerLeaf thanks for the info. There's a big update coming which should help address some of the collaborator issues, but I don't have a timeline yet.

jalberto commented 5 days ago

I have exactly same issue in a clean install in latest version.

@mateomorris is there any workaround for this? it seems Primo is unusable if this bug exists