Error for Dashboard widget

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): Nextcloud Hub 6 (27.1.0)
Operating system and version (eg, Ubuntu 20.04): Linux 6.2.0-33-generic x86_64 Running VM on Proxmox
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.52
PHP version (eg, 7.4): 8.1.2

The issue you are facing:
Hello, every few minutes I receive the following error in my log. I don’t see any apparent impact, other than the error message. If it helps, I access my site using Cloudflare Tunnel.

The output of your Nextcloud log in Admin > Logging:

[no app in context] Error: OCP\Http\Client\LocalServerException: Could not detect any host at <<closure>>

 0. /var/www/html/lib/private/Http/Client/Client.php line 295
    OC\Http\Client\Client->preventLocalAddress()
 1. /var/www/html/apps/integration_homeassistant/lib/Service/HassIntegrationService.php line 34
    OC\Http\Client\Client->post()
 2. /var/www/html/apps/integration_homeassistant/lib/Dashboard/TemplateWidget.php line 65
    OCA\HassIntegration\Service\HassIntegrationService->getWidgetItems()
 3. /var/www/html/apps/integration_homeassistant/lib/Dashboard/TemplateWidget.php line 54
    OCA\HassIntegration\Dashboard\TemplateWidget->getItems()
 4. /var/www/html/lib/private/Dashboard/Manager.php line 114
    OCA\HassIntegration\Dashboard\TemplateWidget->load()
 5. /var/www/html/lib/private/Dashboard/Manager.php line 138
    OC\Dashboard\Manager->loadLazyPanels()
 6. /var/www/html/apps/dashboard/lib/Controller/DashboardApiController.php line 85
    OC\Dashboard\Manager->getWidgets()
 7. /var/www/html/apps/dashboard/lib/Controller/DashboardApiController.php line 130
    OCA\Dashboard\Controller\DashboardApiController->getShownWidgets()
 8. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\Dashboard\Controller\DashboardApiController->getWidgetItemsV2()
 9. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
10. /var/www/html/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
11. /var/www/html/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
12. /var/www/html/ocs/v1.php line 64
    OC\Route\Router->match()
13. /var/www/html/ocs/v2.php line 23
    require_once("/var/www/html/ocs/v1.php")

GET /ocs/v2.php/apps/dashboard/api/v2/widget-items?widgets%5B%5D=activity
from 192.168.1.4 by shaywood at 2023-09-21T17:36:46+00:00

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'NUMUBER',
  'passwordsalt' => 'PASSWORD',
  'secret' => 'SECRET',
  'trusted_domains' => 
  array (
    0 => '192.168.1.219',
    1 => 'nextcloud.MYDOMAIN.com',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '27.1.0.7',
  'overwrite.cli.url' => 'http://192.168.1.219',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'USER',
  'dbpassword' => 'PASSWORD',
  'installed' => true,
  'enable_previews' => 'true',
  'default_phone_region' => 'US',
  'overwriteprotocol' => 'https',
  'mail_from_address' => 'USER',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'gmail.com',
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpport' => '587',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'USER ',
  'mail_smtppassword' => 'PASSWORD',
  'onlyoffice' => 
  array (
    'verify_peer_off' => true,
  ),
  'app_install_overwrite' => 
  array (
    0 => 'google_synchronization',
  ),
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
);

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE

Hello, have you tried search the forum and greater internet related to the generic errors you are seeing? Check out something like:

https://help.nextcloud.com/search?q=Could%20not%20detect%20any%20host%20at%20%3C%3Cclosure%3E%3E

Did you set up this Dashboard widget? Perhaps it is waiting for credentials.

Thank you. I did have that enabled, but not setup. I’ll disable and see what happens.