Dashboard weather mostly not working

[details=“Support intro”]

The Basics

  • Nextcloud Server version (e.g., 29.x.x):

    • 30.0.4
  • Operating system and version (e.g., Ubuntu 24.04):

    • Ubuntu Server 24.04.2
  • Web server and version (e.g, Apache 2.4.25):

    • Nextcloud AIO Apache latest
  • Reverse proxy and version _(e.g. nginx 1.27.2)

    • Caddy
  • Is this the first time you’ve seen this error? (Yes / No):

    • reproducable
  • When did this problem seem to first start?

    • on initial setup
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)

    • AIO
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)

    • No

Summary of the issue you are facing:

If I open the dashboard on a quite fresh install of nextcloud AIO, I get
Unknown weather code
at the weather widget. If i switch between files and the dashboard and click around randomly with location and switch between favorites, sometimes it just worked. But it always fails when arriving at the dashboard.

In the logs I have:
weather_status

I modified my IP and location in the log messaged with all 1s.

ConnectException cURL error 6: Could not resolve host: api.met.no (see libcurl - Error Codes) for https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=11.11&lon=11.11&altitude=11
https://api.met.no/weatherapi/locationforecast/2.0/compact API error : cURL error 6: Could not resolve host: api.met.no (see libcurl - Error Codes) for https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=11.11&lon=11.11&altitude=11

Log entries

If i click around a bunch and try different locations (e.g. the city of Vienna or specific streets or same for other cities and regions) i get also an error in the logs:

Undefined array key “error” at /var/www/html/apps/weather_status/lib/Service/WeatherStatusService.php#260

Nextcloud

{"reqId":"HArbwWyQyBMUUnk5j8eI","level":2,"time":"2025-05-06T13:41:12+00:00","remoteAddr":"111.111.111.111","user":"admin","app":"weather_status","method":"GET","url":"/ocs/v2.php/apps/weather_status/api/v1/forecast","message":"https://api.met.no/weatherapi/locationforecast/2.0/compact API error : cURL error 6: Could not resolve host: api.met.no (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=11.11&lon=11.11&altitude=11","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0","version":"31.0.4.1","exception":{"Exception":"GuzzleHttp\\Exception\\ConnectException","Message":"cURL error 6: Could not resolve host: api.met.no (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=11.11&lon=11.11&altitude=11","Code":0,"Trace":[{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":205,"function":"createRejection","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":157,"function":"finishError","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::","args":[{"__class__":"GuzzleHttp\\Handler\\CurlHandler"},"*** sensitive parameters replaced ***",{"__class__":"GuzzleHttp\\Handler\\CurlFactory"}]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php","line":47,"function":"finish","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::","args":[{"__class__":"GuzzleHttp\\Handler\\CurlHandler"},"*** sensitive parameters replaced ***",{"__class__":"GuzzleHttp\\Handler\\CurlFactory"}]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":142,"function":"__invoke","class":"GuzzleHttp\\Handler\\CurlHandler","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Http/Client/DnsPinMiddleware.php","line":109,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php","line":35,"function":"OC\\Http\\Client\\{closure}","class":"OC\\Http\\Client\\DnsPinMiddleware","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":31,"function":"__invoke","class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php","line":71,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":66,"function":"__invoke","class":"GuzzleHttp\\RedirectMiddleware","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php","line":75,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php","line":333,"function":"__invoke","class":"GuzzleHttp\\HandlerStack","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php","line":169,"function":"transfer","class":"GuzzleHttp\\Client","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php","line":189,"function":"requestAsync","class":"GuzzleHttp\\Client","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Http/Client/Client.php","line":206,"function":"request","class":"GuzzleHttp\\Client","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***",{"verify":"/var/www/html/resources/config/ca-bundle.crt","timeout":30,"headers":{"User-Agent":"NextcloudWeatherStatus/1.11.0 nextcloud.com","Accept-Encoding":"gzip"},"nextcloud":{"allow_local_address":true},"synchronous":true}]},{"file":"/var/www/html/apps/weather_status/lib/Service/WeatherStatusService.php","line":357,"function":"get","class":"OC\\Http\\Client\\Client","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/weather_status/lib/Service/WeatherStatusService.php","line":322,"function":"requestJSON","class":"OCA\\WeatherStatus\\Service\\WeatherStatusService","type":"->","args":["https://api.met.no/weatherapi/locationforecast/2.0/compact",{"lat":"11.11","lon":"11.11","altitude":190}]},{"file":"/var/www/html/apps/weather_status/lib/Service/WeatherStatusService.php","line":300,"function":"forecastRequest","class":"OCA\\WeatherStatus\\Service\\WeatherStatusService","type":"->","args":[48.2083537,16.3725042,190]},{"file":"/var/www/html/apps/weather_status/lib/Controller/WeatherStatusController.php","line":103,"function":"getForecast","class":"OCA\\WeatherStatus\\Service\\WeatherStatusService","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":200,"function":"getForecast","class":"OCA\\WeatherStatus\\Controller\\WeatherStatusController","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\WeatherStatus\\Controller\\WeatherStatusController"},"getForecast"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\WeatherStatus\\Controller\\WeatherStatusController"},"getForecast"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":307,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\WeatherStatus\\Controller\\WeatherStatusController","getForecast",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"ocs.weather_status.weatherstatus.getforecast"}]},{"file":"/var/www/html/ocs/v1.php","line":49,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/weather_status/api/v1/forecast"]},{"file":"/var/www/html/ocs/v2.php","line":7,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","Line":275,"message":"https://api.met.no/weatherapi/locationforecast/2.0/compact API error : cURL error 6: Could not resolve host: api.met.no (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=11.11&lon=11.11&altitude=11","exception":[],"CustomMessage":"https://api.met.no/weatherapi/locationforecast/2.0/compact API error : cURL error 6: Could not resolve host: api.met.no (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=11.11&lon=11.11&altitude=11"},"id":"681a118e753df"}
{"reqId":"SovKaQdfxZF09GwSfEiu","level":3,"time":"2025-05-06T13:41:12+00:00","remoteAddr":"111.111.111.111","user":"admin","app":"PHP","method":"PUT","url":"/ocs/v2.php/apps/weather_status/api/v1/location","message":"Undefined array key \"error\" at /var/www/html/apps/weather_status/lib/Service/WeatherStatusService.php#260","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0","version":"31.0.4.1","data":{"app":"PHP"},"id":"681a118e753e7"}

I’m super grateful for any help on this matter!