gethomepage / homepage

A highly customizable homepage (or startpage / application dashboard) with Docker and service API integrations.

Home Page:https://gethomepage.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] Kavita Widget - JSON Error using HOMEPAGE_VAR env keys

nuclfusion opened this issue · comments

Description

When adding a Kavita widget to my homepage using instructions provided but when substituting the username/password in services.yaml with {{HOMEPAGE_VAR...}}, widget displays NaN for values under Series and Files. If the {{HOMEPAGE_VAR..}} is replaced with clear text username/password, widget displays correct Series and Files values.

Steps to reproduce

When using .env to pass various parameters, Kavita displays NaN for Series and Files within the widget. No other widgets using on my homepage using similar .env passthrough are showing any errors.

    - Kavita:
        icon: kavita
        href: http://localhost:5000
        description: Kavita Reader
        widget:
          type: kavita
          url: http://localhost:5000
          username: "{{HOMEPAGE_VAR_KAVITA_USER}}"
          password: "{{HOMEPAGE_VAR_KAVITA_PASS}}"

homepage version

0.8.6

Installation method

Docker

Configuration

No response

Container Logs

[2024-01-26T13:42:04.748Z] ^[[31merror^[[39m: <kavitaProxyHandler> Unable to login to Kavita API: SyntaxError: Unexpected token Y in JSON at position 0
    at JSON.parse (<anonymous>)
    at login (/app/.next/server/pages/api/services/proxy.js:3739:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async apiCall (/app/.next/server/pages/api/services/proxy.js:3772:9)
    at async KavitaProxyHandler (/app/.next/server/pages/api/services/proxy.js:3827:7)
    at async Object.apiResolver (/app/node_modules/.pnpm/next@12.3.4_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/api-utils/node.js:366:9)
    at async NextNodeServer.runApi (/app/node_modules/.pnpm/next@12.3.4_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/next-server.js:481:9)
    at async Object.fn (/app/node_modules/.pnpm/next@12.3.4_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/next-server.js:741:37)
    at async Router.execute (/app/node_modules/.pnpm/next@12.3.4_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/router.js:252:36)
    at async NextNodeServer.run (/app/node_modules/.pnpm/next@12.3.4_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js:365:29)

Browser Logs

No response

Troubleshooting

Replacing {{HOMEPAGE_VAR...}} values in services.yaml with actual username/password displays correct Series/Files values

Other

Running Homepage using docker-compose on a dedicated LXC with Ubuntu 22 as container distro within Proxmox 8.1.3

Before submitting, I have made sure to

I know we’re getting a lot of users who watched that video and are having trouble setting things up but env var substitution hasn’t changed in a long time so I don’t think it’s broken. All the other folks who raised a similar “bug” report had a configuration issue.

let’s ask the bot