You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I set up Google Health according the documentation on Google Cloud but when I clicked connect, I got the following error on the url /api/google-health/connect
I'm not in a position to check the admin account to view the system logs, and I understand this integration is still in beta, so do let me know what I can investigate to help with this.
Expected behavior
For it to work.
Steps to reproduce
Set up on Google Cloud Console
Add client id and secret to HealthLog
Click save
Click connect with Google
Error appears on its own page
Error ID
No response
Support info / support report
Screenshots / other logs
Browser / OS (if applicable)
No response
Pre-flight checks
I confirmed this is not a duplicate of an existing issue.
I redacted any secrets, tokens, or personal data from logs.
@VocAddict Thanks a lot for trying Google Health this early and for writing it up so clearly, including the request id. That made it quick to find.
The error comes from the connect step itself, before HealthLog ever sends you to Google. It first builds the callback address it will register with Google from the server's public URL (NEXT_PUBLIC_APP_URL, or GOOGLE_HEALTH_REDIRECT_URI if that is set). When that address fails its check, the error was never caught, and you got the bare "Interner Serverfehler" page instead of a message. The usual triggers are:
NEXT_PUBLIC_APP_URL ending in a slash, e.g. https://health.example.com/
plain http:// on anything other than localhost (Google only accepts https callbacks, except for localhost)
NEXT_PUBLIC_APP_URL not set, or GOOGLE_HEALTH_REDIRECT_URI on a different address than NEXT_PUBLIC_APP_URL
Less likely: if the server's encryption key changed after you saved the client id and secret, they can't be read anymore. That ended in the same page.
The fix is ready and ships with the next release, most likely this Saturday. From then on a trailing slash simply works, and every other case takes you back to Settings, Connections with a message saying what to change. If you want it earlier, the :edge image picks it up as soon as it lands.
Meanwhile, if you (or whoever runs the server) can check:
NEXT_PUBLIC_APP_URL is the exact https address you open HealthLog at, with no trailing slash.
In the Google Cloud console, the OAuth client's "Authorized redirect URIs" contains exactly https://<that address>/api/google-health/callback. Same scheme, same host, same port, no extra slash. Settings, Connections in HealthLog shows the address it expects in the Google Health setup guide.
If one of those was off, fix it, restart the container, save the client id and secret again, and click Connect once more.
If it still fails after that, let me know what your public URL looks like (just the shape, e.g. "https with a subdomain" or "http on a LAN IP"), and the new request id, and I'll dig further.
@VocAddict thanks for checking all three so carefully. Your URL and callback look right, so let's narrow down what's left.
Test users: yes, add yourself. While the Google app is in "Testing", only accounts listed as test users can sign in. That would show up as an "access blocked" page at Google, though, not as the error you're seeing, which happens before HealthLog sends you to Google at all. So it's needed, but it isn't this error.
Two things I'd check next, in this order:
Was the container recreated, or only restarted? Docker reads the environment when a container is created. docker restart (or the restart button in most UIs) keeps the old values, so the app may still be running with http://localhost:3000. Run docker compose up -d in the HealthLog folder instead, then check what the app actually sees: docker compose exec app printenv NEXT_PUBLIC_APP_URL
It should print your https://…ts.net address.
Save the client ID and secret again in Settings, Connections, Google Health, then click connect. If the server's encryption key changed at some point after you first saved them, the stored values can't be read anymore, and that also ends in this same error. Saving them again fixes that case.
If it still fails after both, a fresh request id from the error page would help, and whoever runs the server could look up that id in the logs. The fix that turns this bare error into a readable message is queued and ships on Saturday; it will also tell you exactly which of these it was.
Activity
MBombeck commentedon Dec 1, 2026
@VocAddict Thanks a lot for trying Google Health this early and for writing it up so clearly, including the request id. That made it quick to find.
The error comes from the connect step itself, before HealthLog ever sends you to Google. It first builds the callback address it will register with Google from the server's public URL (
NEXT_PUBLIC_APP_URL, orGOOGLE_HEALTH_REDIRECT_URIif that is set). When that address fails its check, the error was never caught, and you got the bare "Interner Serverfehler" page instead of a message. The usual triggers are:NEXT_PUBLIC_APP_URLending in a slash, e.g.https://health.example.com/http://on anything other thanlocalhost(Google only accepts https callbacks, except for localhost)NEXT_PUBLIC_APP_URLnot set, orGOOGLE_HEALTH_REDIRECT_URIon a different address thanNEXT_PUBLIC_APP_URLLess likely: if the server's encryption key changed after you saved the client id and secret, they can't be read anymore. That ended in the same page.
The fix is ready and ships with the next release, most likely this Saturday. From then on a trailing slash simply works, and every other case takes you back to Settings, Connections with a message saying what to change. If you want it earlier, the
:edgeimage picks it up as soon as it lands.Meanwhile, if you (or whoever runs the server) can check:
NEXT_PUBLIC_APP_URLis the exact https address you open HealthLog at, with no trailing slash.https://<that address>/api/google-health/callback. Same scheme, same host, same port, no extra slash. Settings, Connections in HealthLog shows the address it expects in the Google Health setup guide.If it still fails after that, let me know what your public URL looks like (just the shape, e.g. "https with a subdomain" or "http on a LAN IP"), and the new request id, and I'll dig further.
Refs #1745
VocAddict commentedon Dec 1, 2026
NEXT_PUBLIC_APP_URLandAPP_URLwere previously set to http://localhost:3000, it's now set to the public facing URL. For reference, a Tailscale serve is being used for this, beinghttps://healthlog.taildXXXXX.ts.net. There were not trailing slash on the last URLhttps://healthlog.taildXXXXX.ts.net/api/google-health/callbackI'm seeing that there are no test users set up under audience though, is this a strict requirement for it to work?
MBombeck commentedon Dec 1, 2026
@VocAddict thanks for checking all three so carefully. Your URL and callback look right, so let's narrow down what's left.
Test users: yes, add yourself. While the Google app is in "Testing", only accounts listed as test users can sign in. That would show up as an "access blocked" page at Google, though, not as the error you're seeing, which happens before HealthLog sends you to Google at all. So it's needed, but it isn't this error.
Two things I'd check next, in this order:
docker restart(or the restart button in most UIs) keeps the old values, so the app may still be running withhttp://localhost:3000. Rundocker compose up -din the HealthLog folder instead, then check what the app actually sees:docker compose exec app printenv NEXT_PUBLIC_APP_URLIt should print your
https://…ts.netaddress.If it still fails after both, a fresh request id from the error page would help, and whoever runs the server could look up that id in the logs. The fix that turns this bare error into a readable message is queued and ships on Saturday; it will also tell you exactly which of these it was.
Refs #1745