Skip to content
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

Invalid environment variables after upgrade to 0.15.3 #2042

Closed
4 tasks done
pathwayx99 opened this issue May 8, 2024 · 5 comments
Closed
4 tasks done

Invalid environment variables after upgrade to 0.15.3 #2042

pathwayx99 opened this issue May 8, 2024 · 5 comments
Assignees
Labels
🐛 Bug Something isn't working

Comments

@pathwayx99
Copy link

pathwayx99 commented May 8, 2024

Environment

Docker

Version

0.15.3

Describe the problem

After upgrading to 0.15.3, I get errors that were not there in 0.15.2.

I am running on docker behind a Traefik proxy and I use SSO authentication with Authentik. Judging from the error messages, looks like something is broken in relation to OIDC?

I also confirm that reverting to 0.15.2 resolves the issue.

Logs

Exporting hostname...
Migrating database...
yarn run v1.22.19
$ ts-node ./migrate.ts
Done in 8.07s.
Starting production server...
❌ Invalid environment variables: { AUTH_OIDC_TIMEOUT: [ 'Expected string, received number' ] }
❌ Invalid environment variables: { AUTH_OIDC_TIMEOUT: [ 'Expected string, received number' ] }
Listening on port 7575 url: http://xxxxxxxxxxx:7575
/app/node_modules/@t3-oss/env-nextjs/dist/index.js:1
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _zod = require('zod');function f(e){let r=_nullishCoalesce(_nullishCoalesce(e.runtimeEnvStrict, () => (e.runtimeEnv)), () => (process.env));if(_nullishCoalesce(e.emptyStringAsUndefined, () => (!1)))for(let[t,n]of Object.entries(r))n===""&&delete r[t];if(e.skipValidation)return r;let i=typeof e.client=="object"?e.client:{},o=typeof e.server=="object"?e.server:{},s=typeof e.shared=="object"?e.shared:{},d=_zod.z.object(i),T=_zod.z.object(o),l=_zod.z.object(s),v=_nullishCoalesce(e.isServer, () => (typeof window>"u")),p=d.merge(l),y=T.merge(l).merge(d),c=v?y.safeParse(r):p.safeParse(r),m=_nullishCoalesce(e.onValidationError, () => ((t=>{throw console.error("\u274C Invalid environment variables:",t.flatten().fieldErrors),new Error("Invalid environment variables")}))),u=_nullishCoalesce(e.onInvalidAccess, () => ((t=>{throw new Error("\u274C Attempted to access a server-side environment variable on the client")})));return c.success===!1?m(c.error):new Proxy(c.data,{get(t,n){if(!(typeof n!="string"||n==="__esModule"||n==="$$typeof"))return!v&&e.clientPrefix&&!n.startsWith(e.clientPrefix)&&l.shape[n]===void 0?u(n):t[n]}})}var x="NEXT_PUBLIC_";function P(e){let r=typeof e.client=="object"?e.client:{},i=typeof e.server=="object"?e.server:{},o=e.shared,s=e.runtimeEnv?e.runtimeEnv:{...process.env,...e.experimental__runtimeEnv};return f({...e,shared:o,client:r,server:i,clientPrefix:x,runtimeEnv:s})}exports.createEnv = P;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ^
Error: Invalid environment variables
    at /app/node_modules/@t3-oss/env-nextjs/dist/index.js:1:903
    at f (/app/node_modules/@t3-oss/env-nextjs/dist/index.js:1:1121)
    at P (/app/node_modules/@t3-oss/env-nextjs/dist/index.js:1:1520)
    at 68028 (/app/.next/server/chunks/5535.js:5321:13)
    at __webpack_require__ (/app/.next/server/webpack-runtime.js:25:43)
    at /app/.next/server/chunks/5535.js:7519:62
    at __webpack_require__.a (/app/.next/server/webpack-runtime.js:89:13)
    at 77829 (/app/.next/server/chunks/5535.js:7509:21)
    at __webpack_require__ (/app/.next/server/webpack-runtime.js:25:43)
    at /app/.next/server/chunks/5535.js:5174:68
Node.js v20.2.0
Error: connect ECONNREFUSED xxx.xxx.xxx.xxx:40245
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1571:16) {
  errno: -111,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: 'xxx.xxx.xxx.xxx',
  port: 40245
}

Context

My environment variables in my docker-compose file are as follows:

      - BASE_URL=xxx.yyy.com
      - AUTH_PROVIDER=oidc
      - AUTH_OIDC_URI=https://auth.yyy.com/application/o/homarr
      - AUTH_OIDC_CLIENT_SECRET=theclientsecret
      - AUTH_OIDC_CLIENT_ID=theclientid
      - AUTH_OIDC_CLIENT_NAME=Authentik
      - NEXTAUTH_URL=https://xxx.yyy.com
      - AUTH_OIDC_ADMIN_GROUP=aaa
      - AUTH_OIDC_OWNER_GROUP=bbb

No response

Please tick the boxes

  • I confirm that I attached the proper logs
  • I've read the docs
  • I've checked for duplicate issues
  • I've tried to debug myself
@pathwayx99 pathwayx99 added the 🐛 Bug Something isn't working label May 8, 2024
Copy link

github-actions bot commented May 8, 2024

Hi 👋. Thank you for submitting your first issue to Homarr. Please ensure that you've provided all nessesary information. You can use the three dots > Edit button to update your post with additional images and information. Depending on the current volume of requests, the team should get in conact with you shortly.

@manuel-rw manuel-rw self-assigned this May 8, 2024
@manuel-rw
Copy link
Collaborator

Confirmed bug 👍

@manuel-rw manuel-rw pinned this issue May 8, 2024
@manuel-rw
Copy link
Collaborator

Already fixed in #2041

@manuel-rw
Copy link
Collaborator

manuel-rw commented May 8, 2024

We deleted our previous release and overwrote tag 0.15.3.
https://github.com/ajnart/homarr/pkgs/container/homarr/213801209?tag=0.15.3

This means you'll have to repull the image

Enjoy!

@pathwayx99
Copy link
Author

Re-pulled and redeployed.

Can confirm, fixed.

That's gotta be some sort of speed record on bug resolution 😁. Awesome job!

@ajnart ajnart unpinned this issue May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants