-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internal error 500 #175
Comments
Could you please be more specific about what you are trying to achieve? Which image would you like to build yourself wanderer-web or wanderer-db (or both)? What commands did you run? What is the error log of your containers when you start them? |
I wanted to build a wanderer-web container, for my purposes with customised logo and some brand strings sudo npm ci --omit=dev
sudo npm install vitest --save-dev
sudo npm run build
cd ..
sudo docker build web/ --no-cache -t wanderer-web:latest
sudo docker login
sudo docker tag wanderer-web:latest jarex691/wanderer-web:latest
sudo docker push jarex691/wanderer-web:latest
sudo docker compose up -d
|
Ok, so the error you see is caused by this line:
I mistakenly read the body a second time in the if condition. But this is not the root cause. Something caused the response from the recommendation API endpoint to be not ok. Can you please rewrite the section that I linked to like so and rebuild the image: if (!r.ok) {
const response = await r.json();
throw new APIError(r.status, response.message, response.detail)
}
const response: Trail[] = await r.json() This should hopefully create a clearer error message. |
Hi, TypeError: Body is unusable: Body has already been read Browser console
|
In it's current state your installation does not seem a bit salvageable, tbh. I suggest the following steps:
Let me know if I can assist with any of the steps. |
`trap "kill 0" EXIT export ORIGIN=http://localhost:5173 cd search && ./meilisearch --master-key $MEILI_MASTER_KEY & wait I stopped here wanderer@0.15.1 build
vite v5.4.14 building SSR bundle for production... |
Did you edit |
No, It is untouched. |
Ah I know, you probably ran |
without success :/ same effect |
Ok, so I tested the following chain of commands and it works on linux and MacOS. If it does not for you I'm afraid there is an issue with your docker or nodeJS installation: git clone https://github.com/flomp/wanderer
cd wanderer/web
npm i
cd ..
# cp meilisearch ./search ## make sure you have a meilisearch binary in your search folder
bash run.sh
# dev server up and running
# ---------------------------
# build docker image
cd web
export PUBLIC_VALHALLA_URL=https://valhalla1.openstreetmap.de
npm run build
cd ..
docker build web/ --no-cache -t <your-image-name>:latest And this is my run.sh script: trap "kill 0" EXIT
export ORIGIN=http://localhost:5173
export MEILI_URL=http://127.0.0.1:7700
export MEILI_MASTER_KEY=<your-key-here>
export PUBLIC_POCKETBASE_URL=http://127.0.0.1:8090
export PUBLIC_VALHALLA_URL=https://valhalla1.openstreetmap.de
cd search && ./meilisearch --master-key $MEILI_MASTER_KEY &
cd db && go run pocketbase serve &
cd web && npm run dev &
wait |
Thanks a lot, building passed perfectly but both from https://github.com/flomp/wanderer or from source 0.15.1- I have 500 error. If I am logged in, in the “map” tab you can see only the location of the route, the view of the OSM map itself appears only for a fraction of a sec and disappears.
|
Ok, so I found 3 issues related to your descriptions. Let's break it down:
Could you please open your browser console, type
(I created an account on your wanderer instance to debug. Feel free to delete it) |
initial language is browser default -polish, after create user and log in- changes to english front page displays 500 error, rest of app works ok for me but docker logs
|
The error occurs here:
For some reason, it cannot find the recommendation endpoint in PocketBase which is defined here: Line 521 in c2f848d
I assume you have not made any changes in these files? In the latest commit on main I fixed the default language issue after registering a new user. Furthermore, the frontpage will now load (without the recommended trails) if the call to recommend fails. |
Thaks a lot ! In map tab I can see only trail finish points, without trail and start point.
|
The reason why you only see the start point is that the gpx attribute is missing in the meilisearch index: {
"_geo": {
"lat": 50.19193,
"lng": 16.670447
},
"author": "lznpi022udxjbc3",
"category": "qciparzsvao2pxv",
"completed": false,
"created": 1739922833,
"date": 1739836800,
"description": "",
"difficulty": "easy",
"distance": 0,
"duration": 0,
"elevation_gain": 0,
"elevation_loss": 0,
"id": "11a2fa8dd8e7b49",
"location": "",
"name": "Roztoki -Czerniec",
"public": true,
"shares": []
// "gpx": "<filename>"
} I have no idea why this is the case as I do not have access to your pocketbase/meilisearch instances. The gpx file exists and is also correctly linked in the database. Otherwise, you would not be able to see it when clicking on the trail. |
In relation to using the run.sh script, what changes should be made to the docker-compose.yml file ? |
When building my own docker image, I followed the recommended steps listed here #59 Addtionaly I must add "npm install vitest --save-dev"
But stil I have Internal error 500 on homepage, and browser language. If I create user and log in , I have english language. Additionaly "Maps" dispalys nothing, no any map.
What I'm doing wrong ?
The text was updated successfully, but these errors were encountered: