nextcloud_ynh icon indicating copy to clipboard operation
nextcloud_ynh copied to clipboard

Nextcloud app list not loading

Open MayeulC opened this issue 1 year ago • 1 comments

Describe the bug

When loading the "app" page, Nexcloud shows only currently installed apps, no apps from the store, and does not offer to upgrade apps.

Context

  • Hardware: bare metal x86_64
  • YunoHost version: 11.1.20
  • I have access to my server: complete
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: maybe
    • If yes, please explain: extra apps, almost nothing in /etc/hosts, onlyoffice installed.
  • Using, or trying to install package version/branch: Both 25 and 26.

Steps to reproduce

  • Go to Nextcloud web UI
  • Click on your profile
  • Click on apps
  • See the log, also no app will show up with the "install" button as new apps cannot be fetched.

Expected behavior

App store allows to search new apps, install them, install updates to existing apps.

Logs

{"reqId":"Awq0IPCSGRXsKcf0lwJk","level":2,"time":"2023-06-07T15:05:29+00:00","remoteAddr":"192.168.3.254","user":"mayeul","app":"no app in context","method":"GET","url":"/settings/apps/list","message":"Host 127.0.0.1 was not connected to because it violates local access rules","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0","version":"25.0.6.1","data":[]}
{"reqId":"Awq0IPCSGRXsKcf0lwJk","level":2,"time":"2023-06-07T15:05:29+00:00","remoteAddr":"192.168.3.254","user":"mayeul","app":"appstoreFetcher","method":"GET","url":"/settings/apps/list","message":"Host violates local access rules","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0","version":"25.0.6.1","exception":{"Exception":"OCP\\Http\\Client\\LocalServerException","Message":"Host violates local access rules","Code":0,"Trace":[{"file":"/var/www/nextcloud__2/lib/private/Http/Client/DnsPinMiddleware.php","line":136,"function":"ThrowIfLocalIp","class":"OC\\Http\\Client\\LocalAddressChecker","type":"->"},{"file":"/var/www/nextcloud__2/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/nextcloud__2/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":31,"function":"__invoke","class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->"},{"file":"/var/www/nextcloud__2/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php","line":71,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud__2/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":63,"function":"__invoke","class":"GuzzleHttp\\RedirectMiddleware","type":"->"},{"file":"/var/www/nextcloud__2/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php","line":75,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud__2/3rdparty/guzzlehttp/guzzle/src/Client.php","line":331,"function":"__invoke","class":"GuzzleHttp\\HandlerStack","type":"->"},{"file":"/var/www/nextcloud__2/3rdparty/guzzlehttp/guzzle/src/Client.php","line":168,"function":"transfer","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/nextcloud__2/3rdparty/guzzlehttp/guzzle/src/Client.php","line":187,"function":"requestAsync","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/nextcloud__2/lib/private/Http/Client/Client.php","line":218,"function":"request","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/nextcloud__2/lib/private/App/AppStore/Fetcher/Fetcher.php","line":120,"function":"get","class":"OC\\Http\\Client\\Client","type":"->"},{"file":"/var/www/nextcloud__2/lib/private/App/AppStore/Fetcher/AppFetcher.php","line":87,"function":"fetch","class":"OC\\App\\AppStore\\Fetcher\\Fetcher","type":"->"},{"file":"/var/www/nextcloud__2/lib/private/App/AppStore/Fetcher/Fetcher.php","line":192,"function":"fetch","class":"OC\\App\\AppStore\\Fetcher\\AppFetcher","type":"->"},{"file":"/var/www/nextcloud__2/lib/private/App/AppStore/Fetcher/AppFetcher.php","line":188,"function":"get","class":"OC\\App\\AppStore\\Fetcher\\Fetcher","type":"->"},{"file":"/var/www/nextcloud__2/lib/private/Installer.php","line":421,"function":"get","class":"OC\\App\\AppStore\\Fetcher\\AppFetcher","type":"->"},{"file":"/var/www/nextcloud__2/apps/settings/lib/Controller/AppSettingsController.php","line":259,"function":"isUpdateAvailable","class":"OC\\Installer","type":"->"},{"function":"OCA\\Settings\\Controller\\{closure}","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud__2/apps/settings/lib/Controller/AppSettingsController.php","line":251,"function":"array_map"},{"file":"/var/www/nextcloud__2/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"listApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/var/www/nextcloud__2/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud__2/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud__2/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud__2/lib/base.php","line":1048,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud__2/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud__2/lib/private/Http/Client/LocalAddressChecker.php","Line":69,"message":"Host violates local access rules","exception":{},"CustomMessage":"Host violates local access rules"}}

Workaround

I put the following in the nextcloud config.php, which seems to solve the issue.

'allow_local_remote_servers' => true,

I am not sure how safe this is, or why this is needed.

MayeulC avatar Jun 07 '23 15:06 MayeulC