#I am having problems setting up VibeSDK

121 messages · Page 1 of 1 (latest)

sturdy steppe
#

When I try to set it up everything works until i visit my deplyoed application and try to log in where it shows request failed and these are the dev tools logs. Can anyone help?

wraith summit
#

Interesting, can you walk through the steps for deploying the platform? Did you register properly using the whitelisted admin email address you were required to provide while deploying?

sturdy steppe
#

Sorry what do you mean?

#

I used the deploy button

#

@wraith summit maybe we can hop on a call tomorrow or later today so we can figure out the problem?

sturdy steppe
#

Then when I open the website through the custom URL I gave it it loads but spits out those errors immediately

#

Maybe I'm doing something wrong?

sturdy steppe
#

@bronze mauve sorry to ping you and interrupt your day but maybe you can help me with this?

swift notch
#

I am also having this issue, exactly the same, says CSRF token mismatch. I searched for ages, did loads of redeployments, and after leaving it for a little while it all started working

sturdy steppe
wraith summit
#

Sorry for the delay on this. Yeah we can get on a call to debug this. Let me know what time works.
When you first deploy it, it should ask you for registering, did you register with your admin email address that you were asked to provide in the deploy to cloudflare flow?

sturdy steppe
#

Im not quite sure what you mean

#

Because i haven't used cloudflare before and its quite perplexing

#

What time is it for you right now?

wraith summit
#

by email i meant that allowed_emails field.
I can join right now if you are free. its 2:00 pm for me, eastern timezone

#

If you are available right now, we can meet right away, otherwise I might head out for lunch and come back in an hour or two. What time is it for you right now?

sturdy steppe
#

I will be back in 2 hours

sturdy steppe
#

Because the request gets refused all together so why does it matter if the allowed email is the same or not

#

I mean the request gets refused from the start

wraith summit
sturdy steppe
wraith summit
# sturdy steppe Also i dont get how the allowed emails thing works

so if you load the homepage and you aren't logged in, you do get 403 on some apis, thats normal, not an issue there. But if you try logging in and then try building an app, and stuff don't work - thats an issue we need to debug and fix.
The way allowed_email thing is so that the platform you deploy, only you would be able to access unless you clone the repo locally, make changes in env vars and redeploy. This is for security so others won't start abusing your deployement.
Whatever email you put in there, you would have to sign up and login via that email

wraith summit
#

heading out, would be back in 2 hours as well

sturdy steppe
#

It says request failed

wraith summit
#

yes, lets debug that. others were able to deploy it for themselves, so would have to debug it for your case (and possibly others who are struggling too)

sturdy steppe
#

Yes ok thanks

#

Will the fact that I won't be able to use a mic be a problem ?

wraith summit
#

I would say thank you to you for being patient with this project. No no, it won't be a problem

#

would just need you to show me around your deployment and configs thats it

sturdy steppe
#

Yes ok thats definitely possible

#

Btw I just realized that I might take more than 2 hours not much but like 3 max so

wraith summit
#

Thats okay, I am back btw

sturdy steppe
#

Yo im going home rn @wraith summit if it doesn't work for u we can do it tomorrow whatever time you wish

sturdy steppe
#

It doesn't work for me rn its 1 am. We should schedule it for tmrw. Say what times u r available and im gonna pick one and send it here

wraith summit
#

I am available right now as well, and I would be availble tomorrow at anytime after 9 pm EST. Just let me know beforehand

sturdy steppe
#

Is there any way we could meet around 1 or 2pm?

sturdy steppe
#

maybe we could meet right now? Im gonna record a vid of me setting it up and im gonna send it to you

#

i just realised you are the author of the article for VibeSDK

#

nice man

#

also before it auto populated the JWT Key and the webhook secret. How do I get them cuz i havent done this before?

sturdy steppe
#

nvm i found it out

sturdy steppe
#

@wraith summit

sturdy steppe
#

@wraith summit yo u up?

sturdy steppe
#

oh btw i get the existence of the allowed email while testing but if I wanna launch a platform using vibeSDK how do I remove it?

wraith summit
#

I am so sorry, got occupied a bit today. I am glad you were able to figure certain things out by yourself

#

The Allowed email thing is for security, so that anyone deploying it naively won't deploy something thats easy for anyone on the internet to abuse. If you want to remove it, the best way would be to simply set github or google oauth keys and deploy it yourself from local

#

I have added detailed instructions in the README (I know it might feel ai generated but its fairly accurate and personally audited)

#

About your issue of 401, I deployed the platform yesterday on a personal account and did face it, seems something in the latest version. But the thing was, after registering, when I simply refreshed the page, it worked afterwards

#

I guess it happens when we first register - the token might not be refreshed somewhere in the flow. Would debug this later though, seems its easily circumventable

#

Btw, if you checkout the github issues section, you might find solutions for any of the other issues you might face as well. I have tried my best to answer each issue in a detailed and descriptive way

sturdy steppe
#

Ok thank you I will try everything I can and get back to you

sturdy steppe
#

But how do I remove it while keeping the hosting on cloudflare and not local? Do I just remove the env variable and enable Google OAuth by just creating 2 new env variables through my dashboard for the Google secret and Google url or wtv it is?

#

I am able to hop on a call in about ten to fifteen minutes if you are available too

#

Btw mine even after refreshing multiple times still doesn't let me log in with the error request failed. It seems to be logging in for about half a second since for that little amount of time the profile picture on the top right is visible but then logs me out again even though im using the "allowed email" to sign up and login

wraith summit
#

Umm i didnt quite get what you meant there. But to clarify - the project is base on cloudflare workers, so its serverless - you don't need a server. Infact you won't be able to switch the hosting easily anyways - the entire platform is CF native.
Local development would be more involved though - so I won't recommend you to try it.
Making it publically available is super easy and thats the point of the project. Its already publically available if you have deployed it correctly on your custom domain. Its just that no one else would be able to register/login except you until you enable google or github oauth OR remove a hardcoded allowed email check (search the codebase for env.ALLOWED_EMAIL).
Thus, you simply need to clone your copy of vibesdk repo locally, follow the readme local deployment steps - make a copy of .dev.vars.example, fill in the secrets and stuff properly, then set google oauth app id and secret properly. And then you just need to type bun run deploy and you should be able to deploy it properly. If things don't work, you can paste the logs here.

About the call - Its 4:10AM here 🥲 I am kind of super sleepy. Woke up on some notif actually. Can we meet in like 8-9 hours if thats fine? But I believe most probably you would be able to solve it yourself. I would suggest chatgpt/gemini do a pretty good job debugging most cloudflare related issues. You can provide the readme as well and ask it to help in the meanwhile?

sturdy steppe
#

Yes it is possible in 9 hours. It will be 8pm for me so that's doable

wraith summit
sturdy steppe
#

Also

#

One more thing

#

I tried setting up the .dev.vars and the .prod.vars since the deployed reads the prod varsity but they are never pushed by github

#

They are on the ignore list by wrangler

#

Should I remove them from the ignore list?

sturdy steppe
wraith summit
#

No if you do it carefully - rebase should basically put your changes on top of the current latest. If you use windsurf/cursor, just ask it. It would be able to nail it easily

sturdy steppe
#

I dont unfortunately so how can I do that?

#

Also do I add thr env variables inside the .prod.vars or through the wrangler commands you have in the README?

sturdy steppe
#

also I removed the hardcoded checks and it still doesnt let me log in or signup with the error request failed and these on the console

#

btw i commented these out (it exists twice in the same file for some reason)

#

also because github doesnt pickup the .dev.vars and .prod.vars files i used bun run deploy on my local clone of my repo which may or may not have worked. I dont know honestly since it still doesnt let me log in and says i need auth

#

also I see that these produce a 403 error and not the 401 i get

sturdy steppe
#

maybe its something to do with these

#

cuz thats where the errors stem from as far as I can see

sturdy steppe
#

im not very sure about that though

sturdy steppe
#

@wraith summit are you available?

wraith summit
#

Yes I just got up

#

Are you available right now?

wraith summit
sturdy steppe
#

it still doesnt work

sturdy steppe
#

but i cant talk

#

i have people in the room sleeping unfortunately

wraith summit
#

Wanna hop on a call? sure its okay, You can share your screen and we can interact in text

sturdy steppe
#

perfect

sturdy steppe
#

ok so to fix this issue we created environment variables for the google OAuth through the CF dashboard in the variables and secrets part. Then we make a new commit and pushed changes to trigger a redeploy and everything was working!

fossil musk
#

i am trying to setup vibeSDK locally but its giving me some errors:

∷ Building container images for local development...

unknown flag: --provenance
See 'docker build --help'.
error when starting dev server:
Error: Docker build exited with code: 125

#

any idea what it could be?

wraith summit
#

Interesting, seeing this for the first time. What OS are you running it on?

fossil musk
#

macos m1 chip

fossil musk
#

i am trying to run it locally for development purposes

#

bun run dev

fossil musk
#

its some docker related issue, i apperently have an old version

#

basically my goal is run everything locally as i plan on adding a few features on top of it, i should be able to do it right, because it was not very clear in the readme file.

#

@wraith summit

sturdy steppe
#

You could launch in on cloudflare and then clone locally the repo it gave you make your changes and each time you wanna test you can push and build on cloudlfare too see the changes

fossil musk
fossil musk
#

npx wrangler kv namespace create BINDING_NAME running this command is not doing anything for me

#

@wraith summit when would you have quick 5mins to chat?

fossil musk
#

my preview is also not loading now

#

@sturdy steppe @wraith summit any idea?

sturdy steppe
#

Sorry man idk

wraith summit
#

Sorry for not being active here. @fossil musk I have recently pushed an automated script for handling the setup for local as well as prod. Can you maybe try that directly? It should resolve all these issues by setting up everything correctly

fossil musk
#

awesome sounds good.

#

I also deployed the live version, but the sandbox and preview still dont work properly.

  1. when entring the edit mode: net::ERR_NAME_NOT_RESOLVED
  2. when trying to open the preview: has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
#

@wraith summit

wraith summit