[Bug]: Error while initializing OIDC client: RPError: outgoing request timed out after 3500ms #20

Open
opened 2025-10-09 18:34:26 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @alexsalex on GitHub.

Where is the problem occurring?

I encountered the problem while using the application (Frontend)

What browsers are you seeing the problem on?

Firefox, Safari

Current behavior

App Version: 1.26.3

Using Planka on TrueNAS. Trying to add OIDC Authentik and get this error. Added only this vars:

OIDC_ISSUER=https://authentik.company/application/o/<application_slug>/
OIDC_CLIENT_ID=<client if from authentik>
OIDC_CLIENT_SECRET=<client secret from authentik>

#Optionally, if you want to provision users with administrator access, include the following environment variable:
OIDC_ADMIN_ROLES=<authentik group name>

#Optionally, if you want to enforce the use of SSO and disable local authentication, include the following environment variable:
OIDC_ENFORCED=true

Container starts without any issue, but when I load the page I got this error in logs:

2025-09-15 21:06:45 [W] Error while initializing OIDC client: RPError: outgoing request timed out after 3500ms
2025-09-15 21:06:45 [E] Sending 500 ("Server Error") response: 

And page not loaded. Trying to find help to debug and fix it.

Desired behavior

No response

Steps to reproduce

TrueNAS add OIDC env. And you will see the issue.

Other information

No response

Originally created by @alexsalex on GitHub. ### Where is the problem occurring? I encountered the problem while using the application (Frontend) ### What browsers are you seeing the problem on? Firefox, Safari ### Current behavior App Version: 1.26.3 Using Planka on TrueNAS. Trying to add OIDC Authentik and get this error. Added only this vars: ``` OIDC_ISSUER=https://authentik.company/application/o/<application_slug>/ OIDC_CLIENT_ID=<client if from authentik> OIDC_CLIENT_SECRET=<client secret from authentik> #Optionally, if you want to provision users with administrator access, include the following environment variable: OIDC_ADMIN_ROLES=<authentik group name> #Optionally, if you want to enforce the use of SSO and disable local authentication, include the following environment variable: OIDC_ENFORCED=true ``` Container starts without any issue, but when I load the page I got this error in logs: ``` 2025-09-15 21:06:45 [W] Error while initializing OIDC client: RPError: outgoing request timed out after 3500ms 2025-09-15 21:06:45 [E] Sending 500 ("Server Error") response: ``` And page not loaded. Trying to find help to debug and fix it. ### Desired behavior _No response_ ### Steps to reproduce TrueNAS add OIDC env. And you will see the issue. ### Other information _No response_
OVERLORD added the help wanted label 2025-10-09 18:34:26 +03:00
Author
Owner

@alexsalex commented on GitHub:

Anybody?!

@alexsalex commented on GitHub: Anybody?!
Author
Owner

@meltyshev commented on GitHub:

If you're able to connect into the container, you can check directly whether the discovery URL is failing due to a timeout or because it's unreachable from inside the app. From /app, you can run:

PORT=1338 npx dotenv sails console

var response = await fetch(`sails.config.custom.oidcIssuer/.well-known/openid-configuration`);
await response.text();

That will show if the endpoint is reachable at all.

You can also try with the same openid-client library but extend the timeout:

PORT=1338 npx dotenv sails console

var openidClient = require('openid-client');
openidClient.custom.setHttpOptionsDefaults({ timeout: 10000 });
await openidClient.Issuer.discover(sails.config.custom.oidcIssuer);
@meltyshev commented on GitHub: If you're able to connect into the container, you can check directly whether the discovery URL is failing due to a timeout or because it's unreachable from inside the app. From `/app`, you can run: ``` PORT=1338 npx dotenv sails console var response = await fetch(`sails.config.custom.oidcIssuer/.well-known/openid-configuration`); await response.text(); ``` That will show if the endpoint is reachable at all. You can also try with the same `openid-client` library but extend the timeout: ``` PORT=1338 npx dotenv sails console var openidClient = require('openid-client'); openidClient.custom.setHttpOptionsDefaults({ timeout: 10000 }); await openidClient.Issuer.discover(sails.config.custom.oidcIssuer); ```
Author
Owner

@meltyshev commented on GitHub:

Hi! I'm not familiar with TrueNAS, but the error looks pretty clear - the container can't reach your provider. You can try to test it manually by connecting into the container and running something like ping authentik.company to check if it's actually reachable from inside. If it's not, then it's definitely a networking issue on the container/host side. The config itself looks fine though, I'm using something similar with my Authentik setup.

@meltyshev commented on GitHub: Hi! I'm not familiar with TrueNAS, but the error looks pretty clear - the container can't reach your provider. You can try to test it manually by connecting into the container and running something like `ping authentik.company` to check if it's actually reachable from inside. If it's not, then it's definitely a networking issue on the container/host side. The config itself looks fine though, I'm using something similar with my Authentik setup.
Author
Owner

@alexsalex commented on GitHub:

yes, I understand the error. And the problem is what I can reach the auth domain from the container without any issue. I can curl it, can wget it, I can ping it. I can retrieve the json config from authentik from inside the container.

@alexsalex commented on GitHub: yes, I understand the error. And the problem is what I can reach the auth domain from the container without any issue. I can curl it, can wget it, I can ping it. I can retrieve the json config from authentik from inside the container.
Author
Owner

@alexsalex commented on GitHub:

@meltyshev could you help me to debug it? I can't get any debug logs in this case? How to increase timeout?

@alexsalex commented on GitHub: @meltyshev could you help me to debug it? I can't get any debug logs in this case? How to increase timeout?
Author
Owner

@alexsalex commented on GitHub:

After update in TrueNAS apps issue fixed.

@meltyshev thank you so much for your help. And thanks for information on how to debug this kind of issues!

appreciate it.

@alexsalex commented on GitHub: After update in TrueNAS apps issue fixed. @meltyshev thank you so much for your help. And thanks for information on how to debug this kind of issues! appreciate it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#20