nextcloud / nextcloud/activity

Missing error handling for inaccessible remote instances

Open
#1,310 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug
Dominant language
JavaScript
Stars
145
Forks
72
Avg merge
6d 9h
Merged PRs (30d)
42

Description

Steps to reproduce
  1. ???
  2. Look at Sentry
Expected behaviour

Happy Sentry

Actual behaviour

Sad Sentry

https://nextcloud-gmbh.sentry.io/issues/4214844583/?project=1500477

Server configuration

Operating system:

Web server:

Database:

PHP version:

Nextcloud version: (see Nextcloud admin page)

Where did you install Nextcloud from:

Signing status:

Login as admin user into your Nextcloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Nextcloud configuration:

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or

Insert your config.php content here
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

Client configuration

Browser:

Operating system:

Logs
Nextcloud log (data/nextcloud.log)
GuzzleHttp\Exception\RequestException: cURL error 60: SSL certificate problem: certificate has expired (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://nextcloud.otherserver.tld/ocs/v2.php/apps/activity/api/v2/remote/abcdefg12345
#20 /var/www/cloud.example.tld/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php(211): GuzzleHttp\Handler\CurlFactory::createRejection
#19 /var/www/cloud.example.tld/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php(158): GuzzleHttp\Handler\CurlFactory::finishError
#18 /var/www/cloud.example.tld/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php(110): GuzzleHttp\Handler\CurlFactory::finish
#17 /var/www/cloud.example.tld/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php(47): GuzzleHttp\Handler\CurlHandler::__invoke
#16 /var/www/cloud.example.tld/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php(137): GuzzleHttp\Middleware::GuzzleHttp\{closure}
#15 /var/www/cloud.example.tld/nextcloud/lib/private/Http/Client/DnsPinMiddleware.php(154): OC\Http\Client\DnsPinMiddleware::OC\Http\Client\{closure}
#14 /var/www/cloud.example.tld/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(64): GuzzleHttp\PrepareBodyMiddleware::__invoke
#13 /var/www/cloud.example.tld/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php(31): GuzzleHttp\Middleware::GuzzleHttp\{closure}
#12 /var/www/cloud.example.tld/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php(71): GuzzleHttp\RedirectMiddleware::__invoke
#11 /var/www/cloud.example.tld/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php(63): GuzzleHttp\Middleware::GuzzleHttp\{closure}
#10 /var/www/cloud.example.tld/nextcloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php(75): GuzzleHttp\HandlerStack::__invoke
#9 /var/www/cloud.example.tld/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php(331): GuzzleHttp\Client::transfer
#8 /var/www/cloud.example.tld/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php(168): GuzzleHttp\Client::requestAsync
#7 /var/www/cloud.example.tld/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php(187): GuzzleHttp\Client::request
#6 /var/www/cloud.example.tld/nextcloud/lib/private/Http/Client/Client.php(301): OC\Http\Client\Client::post
#5 /activity/lib/BackgroundJob/RemoteActivity.php(88): OCA\Activity\BackgroundJob\RemoteActivity::sendActivity
#4 [internal](0): call_user_func_array
#3 /activity/lib/BackgroundJob/RemoteActivity.php(44): OCA\Activity\BackgroundJob\RemoteActivity::run
#2 /var/www/cloud.example.tld/nextcloud/lib/private/BackgroundJob/Job.php(54): OC\BackgroundJob\Job::execute
#1 /var/www/cloud.example.tld/nextcloud/lib/private/BackgroundJob/QueuedJob.php(47): OC\BackgroundJob\QueuedJob::execute
#0 /var/www/cloud.example.tld/nextcloud/cron.php(152): null
Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in activity/lib/BackgroundJob/RemoteActivity.php, especially run at line 44 and sendActivity at line 88, using the Sentry report and stack trace as context. Trace how inaccessible remote instances and the reported expired SSL certificate are handled; done means the background job no longer produces an unhandled error for this case.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.