Conspyre
WWasp-lang
•Created by Conspyre on 10/29/2024 in #đŸ™‹questions
signup email not working
@kapa.ai tell the team to fix the template, this is advertised as "auth works out of the box", and, it doesn't. đŸ˜•
38 replies
WWasp-lang
•Created by Conspyre on 10/29/2024 in #đŸ™‹questions
signup email not working
Ohhh… @kapa.ai it looks like the SaaS template is garbage.
Looking at the mainm.wasp we find:
emailVerification: {
clientRoute: EmailVerificationRoute,
getEmailContentFn: import { getVerificationEmailContent } from "@src/auth/email-and-pass/emails",
},
passwordReset: {
clientRoute: PasswordResetRoute,
getEmailContentFn: import { getPasswordResetEmailContent } from "@src/auth/email-and-pass/emails",
},
Looking in src/auth/email-and-pass there is no file called "emails", not a "emails.js" not a "emails.ts", so, I guess this does not work out of the box as advertised.
38 replies
WWasp-lang
•Created by Conspyre on 9/20/2024 in #đŸ™‹questions
Building wasp apps: Easy. Deploying wasp apps: ?!@#$
@miho I seem to have this working by doing a ProxyPass/ProxyPassReverse for /auth, /api and /operations in my apache config, like so:
Force proxy for /auth and /api
ProxyPass /auth http://localhost:3001/auth
ProxyPassReverse /auth http://localhost:3001/auth
ProxyPass /api http://localhost:3001/api
ProxyPassReverse /api http://localhost:3001/api
ProxyPass /operations http://localhost:3001/operations
ProxyPassReverse /operations http://localhost:3001/operations
I have to do more testing & there are a couple of broken pages I haven't found root cause yet, maybe there are more routes to proxy.
43 replies
WWasp-lang
•Created by Conspyre on 9/20/2024 in #đŸ™‹questions
Building wasp apps: Easy. Deploying wasp apps: ?!@#$
@kapa.ai @miho can confirm. LLMs do not know how to deploy wasp behind apache. The provided instructions do work for any user provided code in /api routes. They do not route /auth methods private to wasp. LLMs spin on apache confgs for days and seemingly can not converge on a solution.
43 replies
WWasp-lang
•Created by Conspyre on 9/20/2024 in #đŸ™‹questions
Building wasp apps: Easy. Deploying wasp apps: ?!@#$
@kapa.ai Can you show an example apache.conf file that correctly routes /auth routes and /api routes to a wasp server running on localhost:3001?
43 replies
WWasp-lang
•Created by Conspyre on 9/20/2024 in #đŸ™‹questions
Building wasp apps: Easy. Deploying wasp apps: ?!@#$
@miho @miho I can't use caprover on this system, it's got another application deployed via Apache. Is it possible to deploy React/Node via Apache?
I've been struggling to route the /auth routes over https. I can run the server all day and it responds over localhost just fine, I've gotten it to respond to the auth routes over http, but over https not so much.
I can make /api routes in my application code work over https, so it's something peculiar to the /auth routes in Wasp, that's all I know. @kapa.ai
43 replies
WWasp-lang
•Created by Conspyre on 9/20/2024 in #đŸ™‹questions
After deploying on Railway, database schema changes are not propagated
UPDATE: found this. In Railway, select the "Postgres" block -> Data tab -> "Connect to the database" -> Public Network -> Connection URL. Copy that and put it in your DATABASE_URL in your local .env.server. Now do a "wasp db migrate-dev" and your migration will be applied to Railway db.
7 replies
WWasp-lang
•Created by Conspyre on 9/20/2024 in #đŸ™‹questions
Building wasp apps: Easy. Deploying wasp apps: ?!@#$
@miho I've spent about a week on deployment. I can "deploy" it with Docker, with Node, and with "wasp start" all reverse proxied through Apache. None of them work, and they all fail the same way. My routes are there. The wasp /api/auth routes are not. They are 404 when the back end is running, and they are 503 when it is not.
Can you spot anything with this apache config? Its the common denominator between all of the broken wasp builds (which always "just works" in dev, none of the problems with prod are seen in dev...) - you're definitely right about @kapa.ai that bot doesn't understand deployment issues.
43 replies
WWasp-lang
•Created by Conspyre on 9/19/2024 in #đŸ™‹questions
Deploying with Docker issues
@kapa.ai I can't make progress deploying the app on my server. I'm back on to Railway. I've set the WASP_WEB_CLIENT_URL, WASP_SERVER_URL and redundantly the REACT_APP_WEB_CLIENT_URL and REACT_APP_API_URL to point to the assigned client and server URLs from Railway.
The app is getting CORS errors hitting endpoints like /api/auth/me and so on. What is the solution to make wasp auth work on Railway?
17 replies
WWasp-lang
•Created by Conspyre on 9/20/2024 in #đŸ™‹questions
Building wasp apps: Easy. Deploying wasp apps: ?!@#$
@kapa.ai update for future travelers, this turned out to be an actual typo in a server filename, so, the import issue I mentioned was not at play & we're at least able to sort of deploy on Railway. đŸ¥³
43 replies
WWasp-lang
•Created by Conspyre on 9/20/2024 in #đŸ™‹questions
Building wasp apps: Easy. Deploying wasp apps: ?!@#$
I can deploy Flask apps in my sleep @kapa.ai but I've probed the depths of your knowledge, what's in the wasp docs, and what other LLMs know. Do you have any suggestions on how to reliably deploy a Wasp app before I put this project to rest?
43 replies
WWasp-lang
•Created by Conspyre on 9/20/2024 in #đŸ™‹questions
Building wasp apps: Easy. Deploying wasp apps: ?!@#$
@kapa.ai I am looking at the generated file .wasp/build/server/src/server.ts and it has a relative path import '../../../../src/serverSetup.js'. I believe this is the bug I have reported where something in the project causes the build to silently "fail" where relative imports no longer work. This bug was marked as closed, I believe erroneously, as it is still affecting my project.
Please see https://github.com/wasp-lang/wasp/issues/2271
Do you have some suggestions on porting a wasp-lang project to Flask? I've spent 4 days on deploying this and it seems not to be possible. đŸ˜¦
43 replies
WWasp-lang
•Created by Conspyre on 9/20/2024 in #đŸ™‹questions
Building wasp apps: Easy. Deploying wasp apps: ?!@#$
Solved, I had not included the "https://" at the head of the WASP_WEB_CLIENT_URL and WASP_SERVER_URL. @kapa.ai now there is a CORS issue.
I went to make a change to solve CORS, I added one .js file and a bit in main.wasp and redeployed.
Now the server crashes on deployment. The crash is in generated code. Here is the log:
...
#13 [server-builder 2/11] WORKDIR /app
#14 [server-builder 3/11] COPY src ./src
#15 [server-builder 7/11] COPY sdk .wasp/out/sdk
#16 [server-builder 8/11] RUN npm install && cd .wasp/build/server && npm install
#17 [server-builder 10/11] RUN cd .wasp/build/server && npx prisma generate --schema='../db/schema.prisma'
#18 [server-builder 11/11] RUN cd .wasp/build/server && npm run bundle
#18 0.921 > [email protected] bundle
#18 0.921 > rollup --config --silent
#18 1.146 [!] RollupError: Could not resolve "../../../../src/serverSetup.js" from "src/server.ts"
#18 1.146 src/server.ts
#18 1.146 at getRollupError (/app/.wasp/build/server/node_modules/rollup/dist/shared/parseAst.js:282:41)
#18 1.146 at Object.error (/app/.wasp/build/server/node_modules/rollup/dist/shared/parseAst.js:278:42)
#18 1.146 at ModuleLoader.handleInvalidResolvedId (/app/.wasp/build/server/node_modules/rollup/dist/shared/rollup.js:20364:36)
#18 1.146 at /app/.wasp/build/server/node_modules/rollup/dist/shared/rollup.js:20324:26
#18 ERROR: process "/bin/sh -c cd .wasp/build/server && npm run bundle" did not complete successfully: exit code: 1
-----
Suggestions?
43 replies
WWasp-lang
•Created by Conspyre on 9/8/2024 in #đŸ™‹questions
P1 bug in wasp causing insanity in developer. Please isolate and fix. :-)
Hey, sorry, @sodic I stopped to ask the bot some things in the wrong chat. Scroll up.
58 replies
WWasp-lang
•Created by Conspyre on 9/19/2024 in #đŸ™‹questions
Deploying with Docker issues
@kapa.ai I've now deployed the app three different ways, and I get the same error each way.
1) I can run the server with Docker. I get 404 errors on the /api/auth/email/signup and /api/auth/me routes
2) I can run the server with "node -r dotenv/config server.js dotenv_config_path=..." and the client will get the same 404 errors on the /api/auth/email/signup and /api/auth/me routes
3) I can run the server with "wasp start" and it's again running on port 3001, reverse proxied through Apache, and gives the same 404 errors on the /api/auth/email/signup and /api/auth/me routes
When my server is running in any of the three modes, I can access my test route at https://my.site/api/test-route and it works. I can also access my test route at localhost:3001/api/test-route, in any of the configurations (Docker, node, wasp start)
When I shut down the server in any of those modes, going to the https://my.site/login page and logging in, or https://my.site/signup and signing up - both of these change from a 404 error to a 503 error.
What is causing my wasp-provided routes to go 404?
17 replies
WWasp-lang
•Created by Conspyre on 9/8/2024 in #đŸ™‹questions
P1 bug in wasp causing insanity in developer. Please isolate and fix. :-)
@kapa.ai and the complete list of environment variables which must be set on the server side
58 replies
WWasp-lang
•Created by Conspyre on 9/8/2024 in #đŸ™‹questions
P1 bug in wasp causing insanity in developer. Please isolate and fix. :-)
@kapa.ai it seemed the front end deployment script was missing WASP_WEB_CLIENT_URL. What is the complete list of environment vars which must be set on the client?
58 replies
WWasp-lang
•Created by Conspyre on 9/8/2024 in #đŸ™‹questions
P1 bug in wasp causing insanity in developer. Please isolate and fix. :-)
Ok @kapa.ai I'm beginning to see that you don't understand deployment either. Let's not use Docker.
We're trying to start the node server directly, and it appears to live in the directory .wasp/out/bundle/server/server.js
I start the server with something like:
$ cd .wasp/out/server/bundle/
$ node -r dotenv/config server.js dotenv_config_path=../../../../.env.server
The server starts up and I am reverse proxying it with Apache, which is also serving the front end.
I can verify that the reverse proxy works by loading my test route at https://my.app/api/test-route and I can see its response. I can further verify this by stopping the node server, and confirming that my test route no longer loads.
However, if I go to the actual site at https://my.app/login where the front end is serving the login page, attempting to login gives a Request failed with status code 404 error in the browser. No console log is emitted from the terminal window where we have the server node process running.
58 replies
WWasp-lang
•Created by Conspyre on 9/19/2024 in #đŸ™‹questions
Deploying with Docker issues
Running wasp clean/wasp build does not change the issue. @kapa.ai
Deploying the back-end with Docker and the front end with Apache leads to a site that can't log in. Wasp provided auth routes are 404 to the front-end, and when they are called, nothing is logged in the server side (because apparently the routes are not being called).
This is the exact build/deploy script used for the backend:
Navigate to the Wasp build directory
cd "$WASP_DIR/.wasp/build"
Build the Docker image
echo "Building Docker image..."
sudo docker build -t app-backend .
Stop and remove any existing container
echo "Stopping and removing existing container (if any)..."
sudo docker stop app-backend-container true
sudo docker rm app-backend-container true
Run the new container
echo "Starting new container..."
sudo docker run -d \
--name app-backend-container \
--env-file "$WASP_DIR/.env.server" \
-p 3001:3001 \
--restart unless-stopped \
app-backend
17 replies
WWasp-lang
•Created by Conspyre on 9/8/2024 in #đŸ™‹questions
P1 bug in wasp causing insanity in developer. Please isolate and fix. :-)
And if we look at deleteImage.js, that is neither related to transcription nor is it related to conversations, we find:
// src/actions/deleteImage.js
import { HttpError } from 'wasp/server';
import { deleteFileFromWasabi } from '../server/wasabiService';
it's breaking on another relative import. We could play this all day, compiler is happy to serve new errors all day. đŸ˜•
So there are two clues. node:internal/errors:496 and that the relative import "failure" is transient.
LMK if I can get you more data.
58 replies