rest api 500 errors permanent

Hi there, starting to explore the twenty offering. The api however returns a permanent 500 error and no logging is shown (there was once a flash that i managed to capture) but since then permanent 500. Have destroyed and recreated the containers and data volumes multiple times. https://github.com/twentyhq/twenty/issues/7808
GitHub
TAG=v0.31.2 - All rest calls 500 · Issue #7808 · twentyhq/twenty
Bug Description All rest calls to any endpoint result in a 500 error (which does not show in logs nor in stdout) Example: curl -vv --request GET \ --url http://0.0.0.0:3010/rest/timelineActivities ...
5 Replies
charles
charles5d ago
@martmull answered there @rosscdh
martmull
martmull5d ago
@rosscdh I can't reproduce, see my comment on https://github.com/twentyhq/twenty/issues/7808 Did I miss something?
GitHub
TAG=v0.31.2 - All rest calls 500 · Issue #7808 · twentyhq/twenty
Bug Description All rest calls to any endpoint result in a 500 error (which does not show in logs nor in stdout) Example: curl -vv --request GET \ --url http://0.0.0.0:3010/rest/timelineActivities ...
rosscdh
rosscdh5d ago
Hey thanks.. as responded its a stock standard docker compose no magic.. Cant include compose becuase discord char limit almost stock compose 1. dont use data volumes i prefer local mounts 2. commented out exposed ports on redis and psotgres as dont need to debug data 3. commented restart: always.. this is not production 4. 3010:3000 for main port on server but none of that would affect system internals afaik I redownloaded the original one.. but that one breaks due to the REDIS_HOST issue thats an issue in github already.. sorry im so keen to use this tooling its looks so great.. I just... found the issue... docker compose ports: - 3010:3000 <---- it seems the system uses the internal running port as part of the token generation I changed to run on 3010 via the env var and the internal port mapping and voila
curl -vv --request GET \
--url http://0.0.0.0:3010/rest/people \
--header 'Accept: application/json' \
--header "Authorization: Bearer $TWENTY_TOKEN"
Note: Unnecessary use of -X or --request, GET is already inferred.
* Trying 0.0.0.0:3010...
* Connected to 0.0.0.0 (127.0.0.1) port 3010 (#0)
> GET /rest/people HTTP/1.1
> Host: 0.0.0.0:3010
> User-Agent: curl/7.86.0
> Accept: application/json
> Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI4MmU0MDIwOC04MGJhLTRkYTYtYjMwNi1hNzI5MTYyY2NjYzAiLCJpYXQiOjE3MjkyNDIwNzYsImV4cCI6NDg4Mjg0NTY3NSwianRpIjoiODNmNDY1YjUtOWM4Yi00OWJlLThkMWEtMWJmNGJmMjc0YjEzIn0.LP27QrRBODO3po7QQaDbwdsy4VE97onmXWIy_m9nYJ8
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< X-Powered-By: Express
< Access-Control-Allow-Origin: *
< Content-Type: application/json; charset=utf-8
< Content-Length: 2299
< ETag: W/"8fb-cGcSEvhkxKBG0V5scMggwbnY/Us"
< Date: Fri, 18 Oct 2024 09:13:20 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
<
* Connection #0 to host 0.0.0.0 left intact
{"data":{"people":[{"id":"44c34c5b-b5bc-46aa-9b30-4128f93a48c0","jobTitle":"","city":"","avatarUrl":"","position":0,"createdAt":"2024-10-18T07:12:46.136Z","updatedAt":"2024-10-18T07:12:46.136Z","deletedAt":null,"companyId":null,"company":null,"name":{"firstName":"Scott Jack","lastName":""},"emails":{"primaryEmail":"","additionalEmails":null},"linkedinLink":{"primaryLinkLabel":"","primaryLinkUrl":"","secondaryLinks":null},"xLink":{"primaryLinkLabel":"","primaryLinkUrl":"","secondaryLinks":null},"phones":{"primaryPhoneNumber":"
curl -vv --request GET \
--url http://0.0.0.0:3010/rest/people \
--header 'Accept: application/json' \
--header "Authorization: Bearer $TWENTY_TOKEN"
Note: Unnecessary use of -X or --request, GET is already inferred.
* Trying 0.0.0.0:3010...
* Connected to 0.0.0.0 (127.0.0.1) port 3010 (#0)
> GET /rest/people HTTP/1.1
> Host: 0.0.0.0:3010
> User-Agent: curl/7.86.0
> Accept: application/json
> Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI4MmU0MDIwOC04MGJhLTRkYTYtYjMwNi1hNzI5MTYyY2NjYzAiLCJpYXQiOjE3MjkyNDIwNzYsImV4cCI6NDg4Mjg0NTY3NSwianRpIjoiODNmNDY1YjUtOWM4Yi00OWJlLThkMWEtMWJmNGJmMjc0YjEzIn0.LP27QrRBODO3po7QQaDbwdsy4VE97onmXWIy_m9nYJ8
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< X-Powered-By: Express
< Access-Control-Allow-Origin: *
< Content-Type: application/json; charset=utf-8
< Content-Length: 2299
< ETag: W/"8fb-cGcSEvhkxKBG0V5scMggwbnY/Us"
< Date: Fri, 18 Oct 2024 09:13:20 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
<
* Connection #0 to host 0.0.0.0 left intact
{"data":{"people":[{"id":"44c34c5b-b5bc-46aa-9b30-4128f93a48c0","jobTitle":"","city":"","avatarUrl":"","position":0,"createdAt":"2024-10-18T07:12:46.136Z","updatedAt":"2024-10-18T07:12:46.136Z","deletedAt":null,"companyId":null,"company":null,"name":{"firstName":"Scott Jack","lastName":""},"emails":{"primaryEmail":"","additionalEmails":null},"linkedinLink":{"primaryLinkLabel":"","primaryLinkUrl":"","secondaryLinks":null},"xLink":{"primaryLinkLabel":"","primaryLinkUrl":"","secondaryLinks":null},"phones":{"primaryPhoneNumber":"
👍
charles
charles5d ago
Ok! Yes, there is an issue with the docker-compose on main, please add both REDIS_HOST and REDIS_URL for now I think that's it, the REST API is making an http call to the Graphql API for now (we are changing it, likely this month) so you might have faced networking issue
rosscdh
rosscdh5d ago
sort of.. 1. I encountered and raised the REDIS_URL issue yesterday, the fix was to add REDIS_HOST 2. this issue was because the server is set to run on 3000 and issues tokens based on that port .... however... if in compose you say .. outer port is 3010:3000 <-- inner port maps the server will not recognise requests coming in on 3010 ... its a bit weird tbh.. security should not be bound to ports imho.
Want results from more Discord servers?
Add your server