Can't install Apps on Nextcloud

Hello there,

I have installed Nextcloud (native) on Dietpi and it says it has a problem connection into Internet. I can’t install any app in Nextcloud.

[appstoreFetcher] Warnung: GuzzleHttp\Exception\RequestException: cURL error 77: error setting certificate file: /mnt/dietpi_userdata/nextcloud_data/files_external/rootcerts.crt (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://apps.nextcloud.com/api/v1/apps.json at <<closure>>

 0. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 158
    GuzzleHttp\Handler\CurlFactory::createRejection("*** sensitive parameters replaced ***")
 1. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 110
    GuzzleHttp\Handler\CurlFactory::finishError()
 2. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php line 47
    GuzzleHttp\Handler\CurlFactory::finish()
 3. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 137
    GuzzleHttp\Handler\CurlHandler->__invoke()
 4. /var/www/nextcloud/lib/private/Http/Client/DnsPinMiddleware.php line 150
    GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensitive parameters replaced ***")
 5. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php line 35
    OC\Http\Client\DnsPinMiddleware->OC\Http\Client\{closure}("*** sensitive parameters replaced ***")
 6. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 31
    GuzzleHttp\PrepareBodyMiddleware->__invoke()
 7. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php line 71
    GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensitive parameters replaced ***")
 8. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 63
    GuzzleHttp\RedirectMiddleware->__invoke()
 9. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php line 75
    GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensitive parameters replaced ***")
10. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 331
    GuzzleHttp\HandlerStack->__invoke()
11. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 168
    GuzzleHttp\Client->transfer()
12. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 187
    GuzzleHttp\Client->requestAsync("*** sensitive parameters replaced ***")
13. /var/www/nextcloud/lib/private/Http/Client/Client.php line 226
    GuzzleHttp\Client->request()
14. /var/www/nextcloud/lib/private/App/AppStore/Fetcher/Fetcher.php line 120
    OC\Http\Client\Client->get()
15. /var/www/nextcloud/lib/private/App/AppStore/Fetcher/AppFetcher.php line 86
    OC\App\AppStore\Fetcher\Fetcher->fetch()
16. /var/www/nextcloud/lib/private/App/AppStore/Fetcher/Fetcher.php line 190
    OC\App\AppStore\Fetcher\AppFetcher->fetch()
17. /var/www/nextcloud/lib/private/App/AppStore/Fetcher/AppFetcher.php line 187
    OC\App\AppStore\Fetcher\Fetcher->get()
18. /var/www/nextcloud/lib/private/Installer.php line 421
    OC\App\AppStore\Fetcher\AppFetcher->get()
19. /var/www/nextcloud/apps/serverinfo/lib/SystemStatistics.php line 97
    OC\Installer->isUpdateAvailable()
20. /var/www/nextcloud/apps/serverinfo/lib/SystemStatistics.php line 73
    OCA\ServerInfo\SystemStatistics->getAppsInfo()
21. /var/www/nextcloud/apps/serverinfo/lib/Settings/AdminSettings.php line 88
    OCA\ServerInfo\SystemStatistics->getSystemStatistics()
22. /var/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php line 129
    OCA\ServerInfo\Settings\AdminSettings->getForm()
23. /var/www/nextcloud/apps/settings/lib/Controller/AdminSettingsController.php line 83
    OCA\Settings\Controller\AdminSettingsController->formatSettings()
24. /var/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php line 149
    OCA\Settings\Controller\AdminSettingsController->getSettings()
25. /var/www/nextcloud/apps/settings/lib/Controller/AdminSettingsController.php line 68
    OCA\Settings\Controller\AdminSettingsController->getIndexResponse()
26. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\Settings\Controller\AdminSettingsController->index()
27. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
28. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
29. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
30. /var/www/nextcloud/lib/base.php line 1071
    OC\Route\Router->match()
31. /var/www/nextcloud/index.php line 36
    OC::handleRequest()

GET /nextcloud/settings/admin/serverinfo
from 139.174.78.137 by admin at 2023-07-28T07:00:29+00:00

Can someone help me?

Thanks
Fanmion

Looks like an issue with NC own certificate file

can you check the file exist

cat /mnt/dietpi_userdata/nextcloud_data/files_external/rootcerts.crt

Hi thanks!

no the file doesn’t exist.

You somehow missed to fill out our trouble shooting template (I guess for a good reason). pls can you do it now

Required

  • DietPi version | cat /boot/dietpi/.version
  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN
  • Kernel version | uname -a
  • Architecture | dpkg --print-architecture
  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)

NC has been installed using our install script dietpi-software?

root@kibasaurium-homeserver:~#  cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=19
G_DIETPI_VERSION_RC=1
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
G_LIVE_PATCH_STATUS[0]='applied'
G_LIVE_PATCH_STATUS[1]='applied'
G_LIVE_PATCH_STATUS[2]='not applicable'
root@kibasaurium-homeserver:~# echo $G_DISTRO_NAME $G_RASPBIAN
bookworm 0
root@kibasaurium-homeserver:~# uname -a
Linux kibasaurium-homeserver 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux
root@kibasaurium-homeserver:~# dpkg --print-architecture
arm64
root@kibasaurium-homeserver:~# echo $G_HW_MODEL_NAME
RPi 4 Model B (aarch64)
root@kibasaurium-homeserver:~#

I have install it through dietpi-software!

I just checked it on my demo system and rootcerts.crt is automatically created by NC itself at the first start. That means it is not created by us and is not part of the download archive.

root@DietPi4:~# ls -la /mnt/dietpi_userdata/nextcloud_data/files_external
total 220
drwxr-xr-x 2 www-data www-data   4096 Jul 28 21:00 .
drwxrwx--- 5 www-data www-data   4096 Jul 28 21:00 ..
-rw-r--r-- 1 www-data www-data 215902 Jul 28 21:00 rootcerts.crt
root@DietPi4:~#

Theoretically I could add the file to our forum and you place it on your system.

Hi there,

I’ve solved this problem by reinstall Dietpi… the problem moved away like magic…

thanks anyway
Fanmion

As I said, the cert file is created by NC itself at the first start-up. No real magic, but part of the first start-up process, I think. The interesting question is why the file was lost on them. I found some older GitHub issues on NC GitHub where similar things happen with NC Core updates.

Maybe there is something I forgot tell you: Firstly I choose webserver NGINX and it doesnt work. Now I reinstall it with Apache and it works!

Greetings
Fanmion

Nginx should work same way as Apache2. What exactly was not working? Just creating the cert file or something else.