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

[BUG] Weather Forecast not reading API key from ENV #1828

Open
5 tasks done
dintho opened this issue Mar 11, 2025 · 0 comments
Open
5 tasks done

[BUG] Weather Forecast not reading API key from ENV #1828

dintho opened this issue Mar 11, 2025 · 0 comments
Assignees
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working

Comments

@dintho
Copy link

dintho commented Mar 11, 2025

Environment

Self-Hosted (Docker)

System

Nixos Podman OCI pulling down Docker image (image = "lissy93/dashy")

Version

Dashy version 3.1.1

Describe the problem

the Weather Forecast widget does not read in API keys from the container environment vars the same way the regular Weather app does and give a error

An error occurred, see the logs for more info.

Unable to fetch data

Retry

Additional info

Console Error (replaced location with rather then my local info

request: XMLHttpRequest { readyState: 4, timeout: 50000, withCredentials: false, … }
​​
mozAnon: false
​​
mozSystem: false
​​
onabort: function onabort()​​
onerror: function onerror()
​​
onload: null
​​
onloadend: function u()
​​
onloadstart: null
​​
onprogress: null
​​
ontimeout: function ontimeout()
​​
readyState: 4
​​
response: '{"error":{"message":"Request failed with status code 401","name":"AxiosError","stack":"AxiosError: Request failed with status code 401\\n    at settle (/app/node_modules/axios/dist/node/axios.cjs:1983:12)\\n    at IncomingMessage.handleStreamEnd (/app/node_modules/axios/dist/node/axios.cjs:3085:11)\\n    at IncomingMessage.emit (node:events:530:35)\\n    at endReadableNT (node:internal/streams/readable:1696:12)\\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\\n    at Axios.request (/app/node_modules/axios/dist/node/axios.cjs:4224:41)\\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"adapter":["xhr","http","fetch"],"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"User-Agent":"axios/1.7.2","Accept-Encoding":"gzip, compress, deflate, br"},"method":"get","url":"https://api.openweathermap.org/data/2.5/forecast?q=<LOCATION>, US&cnt=3&units=imperial&appid=VUE_APP_OPENWEATHER_TOKEN","json":{}},"code":"ERR_BAD_REQUEST","status":401}}'
​​
responseText: '{"error":{"message":"Request failed with status code 401","name":"AxiosError","stack":"AxiosError: Request failed with status code 401\\n    at settle (/app/node_modules/axios/dist/node/axios.cjs:1983:12)\\n    at IncomingMessage.handleStreamEnd (/app/node_modules/axios/dist/node/axios.cjs:3085:11)\\n    at IncomingMessage.emit (node:events:530:35)\\n    at endReadableNT (node:internal/streams/readable:1696:12)\\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\\n    at Axios.request (/app/node_modules/axios/dist/node/axios.cjs:4224:41)\\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"adapter":["xhr","http","fetch"],"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"User-Agent":"axios/1.7.2","Accept-Encoding":"gzip, compress, deflate, br"},"method":"get","url":"https://api.openweathermap.org/data/2.5/forecast?q=<LOCATION> US&cnt=3&units=imperial&appid=VUE_APP_OPENWEATHER_TOKEN","json":{}},"code":"ERR_BAD_REQUEST","status":401}}'

note: im seeing appid=VUE_APP_OPENWEATHER_TOKEN rather then the var substitution

Please tick the boxes

@dintho dintho added the 🐛 Bug [ISSUE] Ticket describing something that isn't working label Mar 11, 2025
@github-project-automation github-project-automation bot moved this to Awaiting Triage in Dashy V3 Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working
Projects
Status: Awaiting Triage
Development

No branches or pull requests

2 participants