Wasp-lang

W

Wasp-lang

Join the community to ask questions about Wasp-lang and get answers from other members.

Join

Lemon Squeezy Integration into OpenSaas (Alternative to Stripe)

I will be working on integrating Lemon Squeezy with open saas, as stripe is not supported in my country, after i am done i will submit PR to the team for others to use it. If you have already done it or thinking of doing so, feel free to chime in and let's talk it out. Link to LemonSqueezy Docs -- ...
No description

Using action in backend

Hello! https://wasp-lang.dev/docs/data-model/operations/actions#declaring-actions I see we can use action in the backend. I want to do so to avoid code duplication....

Navbar obscuring content: UI layout bug?

Is it just me or is your demo website's top navbar obscuring the actual pages/content without any offset to allow the user to access the content behind the navbar? In this example the title 'Account Information' is being obscured and the user cannot scroll further to reveal it....
No description

custom signup action not running

I have followed the documentation from here: https://wasp-lang.dev/docs/auth/entities#custom-signup-action I am not able to get this custom sign up action to run upon sign up, it is still running the default one. Do I somehow need to change the function being called upon signup? I was under the impression having the name customSignup defined in wasp.main would mean it would override any default signup action. Any help would be appreciated, thanks!...

Updating keycloak roles into database

Hey there, I was trying to integrate Keycloak into my Wasp project but I got into a problem. I wanted to add my client roles into my database whenever a user tries to log in so I can query those roles for specific operations later. For that I used the getConfig and userSignupFields functions from the Keycloak implementation. Until then, everything was ok and it worker, the problem is that after that user is saved into my databases, if I decided to change this user´s roles into Keycloak, next time the user log in, it is not updating those new roles into the database. After a long time thinking, I decided to call the Keycloak /userinfo endpoint myself in every operation. But for that I need the keycloak access token which I do not have. Am I missing something? Any other suggestions about how to solve my problem?...

Where are the server logs to find the dummy email verification token/link?

By default we’ve set up the email sender to use the Dummy provider. This is for local development only and no emails will actually be sent out! To obtain an email verification token/link, you must check the server logs on initial sign up.
Where is the location of the log file in question within the standard WASP app directory structure?...

UI intercept

I want to intercept any update, create, delete actions with a PIN screen to ensure the user is authorized to perform the action. How can I architect this on the frontend? Currently I am thinking this could be some sort of action middleware which overlays a PIN input and short circuits the action if the PIN code is incorrect. How might I set this up?...

Sitemap generation - Google search console error

Hello, I finished building my first wasp app but I have some issues with the sitemap. Put simply, google search console is unable to find it. How can I solve this issue ?...

How do I debug why an actions endpoint is returning a 404?

Here's what I am seeing in the logs for the server 2024-06-18T10:00:10Z app[redacted] sin [info]GET /auth/me 304 5.758 ms - - 2024-06-18T10:00:10Z app[redacted] sin [info]POST /operations/update-current-user 404 0.332 ms - 170 ...

Fly.io problem after deployment

Hello, I made deployment to fly.io but i mixed toml files. I interrupted deploymend process when i saw this missmatch ...

How do I prevent the api call from being run every time sate is changed, and only run on button pres

I would love some help on how I can make sure the api call is only run when the button is pressed and not every time state changes. I want to pass the state variables to the usetextstream function so that I can stream text from chatgpt to the frontend. But whenever any state changes the usetextstream function is run, this is creating a user experience where anything the user does makes an api call and starts streaming text. I would love if it only ran when the user clicks the generate social m...

Stripe production does not update user after purchase

For some reason when i moved over to production i chnaged my webhook to a production wbhook which i know works because it lets the user purchase things. it does not accuratly update the user to having an active subscription.

Service Worker Blocking Fetch Requests in PWA

Hi everyone, I've converted my WASP app into a Progressive Web App (PWA). I've successfully added the manifest and service worker. However, I'm running into a major issue: the service worker seems to be blocking fetch requests. Because of this, I can't get product analytics on PostHog, nor can I analyze the app in Lighthouse. I'm stuck and suspect it might be a cross-origin (CORS) issue, but I'm not sure....

How to add signup validation on backend

I have added new validation fields and rewrite the frontend version of signup proccess and now I am trying to add validation on backend in defineUserSignupFields but it does not work, how can I achieve validation on backend? Maybe there is a way overwrite just ensureValidArgs function? ``` function ensureValidArgs(args: unknown): void { ensureValidEmail(args); ensurePasswordIsPresent(args);...

sample code for reading a document from db and parsing it to json from the action

sample code for reading a document from db and parsing it to json from the action

TypeError: Cannot read properties of undefined (reading 'id')

I am having issues with creating an entity using nested relations in Prisma. I don't think this is a wasp issue but I wanted to ask to make sure. The only thing I am wondering about is in case I am missing some setup in the main.wasp file. Happening in file src/actions.js on https://github.com/ksk385/c2log-app...

This should never happen, studio should never stop.

``` [ Db ] Environment variables loaded from .env [ Db ] Prisma schema loaded from ../db/schema.prisma [ Db ] Prisma Studio is up on http://localhost:5555 [ Db !] node:internal/process/promises:289...

Network Error when adding authentication to todo app

Access to XMLHttpRequest at 'http://localhost:3001/auth/username/signup' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

How do you debug a whitescreen in wasp/react project?

When I write a code with mistakes, it gives me a whitescreen instead of the problem in the page. How can I debug such cases? I would like debug when there is problem in my code, however react/wasp gives me no error message and my GUI turns white.