[NC12 Beta2][Activity] Error - PHP - Undefined offset: 3 at /path/to/nextcloud/apps/activity/lib/FilesHooks.php#620

#3

Still face that with the newest nc 12 release. During uploading files, also single large ones, this error occurs sometimes several times a minute.

Just to give an example:

Error	PHP	Undefined offset: 3 at /var/www/owncloud/apps/activity/lib/FilesHooks.php#620	2017-05-23T23:25:07+0200
Error	PHP	Undefined offset: 3 at /var/www/owncloud/apps/activity/lib/FilesHooks.php#620	2017-05-23T23:25:07+0200
Error	PHP	Undefined offset: 3 at /var/www/owncloud/apps/activity/lib/FilesHooks.php#620	2017-05-23T23:25:07+0200
Error	PHP	Undefined offset: 3 at /var/www/owncloud/apps/activity/lib/FilesHooks.php#620	2017-05-23T23:24:48+0200
Error	PHP	Undefined offset: 3 at /var/www/owncloud/apps/activity/lib/FilesHooks.php#620	2017-05-23T23:24:48+0200
Error	PHP	Undefined offset: 3 at /var/www/owncloud/apps/activity/lib/FilesHooks.php#620	2017-05-23T23:24:38+0200
Error	PHP	Undefined offset: 3 at /var/www/owncloud/apps/activity/lib/FilesHooks.php#620	2017-05-23T23:24:38+0200
Error	PHP	Undefined offset: 3 at /var/www/owncloud/apps/activity/lib/FilesHooks.php#620	2017-05-23T23:24:38+0200
Error	PHP	Undefined offset: 3 at /var/www/owncloud/apps/activity/lib/FilesHooks.php#620	2017-05-23T23:24:15+0200
Error	PHP	Undefined offset: 3 at /var/www/owncloud/apps/activity/lib/FilesHooks.php#620	2017-05-23T23:24:15+0200
Error	PHP	Undefined offset: 3 at /var/www/owncloud/apps/activity/lib/FilesHooks.php#620	2017-05-23T23:24:15+0200
Error	PHP	Undefined offset: 3 at /var/www/owncloud/apps/activity/lib/FilesHooks.php#620	2017-05-23T23:23:50+0200
Error	PHP	Undefined offset: 3 at /var/www/owncloud/apps/activity/lib/FilesHooks.php#620	2017-05-23T23:23:50+0200
Error	PHP	Undefined offset: 3 at /var/www/owncloud/apps/activity/lib/FilesHooks.php#620	2017-05-23T23:23:50+0200
Error	PHP	Undefined offset: 3 at /var/www/owncloud/apps/activity/lib/FilesHooks.php#620	2017-05-23T23:23:27+0200
Error	PHP	Undefined offset: 3 at /var/www/owncloud/apps/activity/lib/FilesHooks.php#620	2017-05-23T23:23:27+0200
Error	PHP	Undefined offset: 3 at /var/www/owncloud/apps/activity/lib/FilesHooks.php#620	2017-05-23T23:23:27+0200
Error	PHP	Undefined offset: 3 at /var/www/owncloud/apps/activity/lib/FilesHooks.php#620	2017-05-23T23:23:09+0200
Error	PHP	Undefined offset: 3 at /var/www/owncloud/apps/activity/lib/FilesHooks.php#620	2017-05-23T23:23:09+0200
Error	PHP	Undefined offset: 3 at /var/www/owncloud/apps/activity/lib/FilesHooks.php#620	2017-05-23T23:23:07+0200
0 Likes

#4

Same here when uploading large files (nc 12.0.0.29 and 2.3.1 (build 8) nc client):

{“reqId”:“ibI2Ql1P1TGzBAKDlXK3”,“level”:3,“time”:“2017-05-26T11:54:26+00:00”,“remoteAddr”:“a.b.c.d”,“user”:“MYUSER”,“app”:“PHP”,“method”:“PUT”,“url”:"/nextcloud/remote.php/dav/uploads/MYUSER/1805211762/00000466",“message”:“Undefined offset: 3 at /srv/www/htdocs/nextcloud/apps/activity/lib/FilesHooks.php#620”,“userAgent”:“Mozilla/5.0 (Windows) mirall/2.3.1 (build 8) (Nextcloud)”,“version”:“12.0.0.29”}

0 Likes

#5

Exactly the same here. Upgraded to 12 yesterday

0 Likes

#6

Same over here as well…

0 Likes

#7

And another one with the same problem.

0 Likes

#8

And another one with the same problem.

0 Likes

#9

Just to compare: I used desktop client 2.3.0rc1 (build 4) to upload the files.
On what upload method/version does the error occur for you guys?

The newer stable 2.3.1 was not offered to me through the client. I will install it now and see, if the error persists. If so, I will create a github issue.

0 Likes

#10

And another one with the same problem.

I use Android App 1.4.3

0 Likes

#11

Okay, so doesn’t seem to have something to do with the client. Just wanted to get sure.

0 Likes

#12

Having same issue since upgrading to NC12. Was not there previously

0 Likes

#13

Reported on github: https://github.com/nextcloud/activity/issues/163

Any additional informations could be helpful. Error occurs for me during image and video files upload, did not observe large files of different kinds (e.g. archives) so far. Some documents were also uploaded, but since they are very small, I cannot assure, that the error was caused by them.

€: Was already fixed: https://github.com/nextcloud/activity/pull/157/files
It’s just simple to modify the line by oneself to get rid of the problem :).

1 Like

#14

Is this a problem you solved?
I’m a 12.0.1 stable version, but the same error occurred. It doesn’t occur frequently, but sometimes it appears in the log.

Undefined offset: 3 at /var/www/vhosts/NEXTCLOUD/apps/activity/lib/FilesHooks.php#620

0 Likes

#15

It should have been fixed with 12.0.1: https://github.com/nextcloud/activity/blob/v12.0.1/lib/FilesHooks.php#L141

Check line 141 of your /path/to/nextcloud/apps/activity/lib/FilesHooks.php if it looks like the one in the link:
`

  if ($path === '/' || $path === '' || $path === null) {

`

I changed that manually in 12.0.0 and this fixed the problem for me. With 12.0.1 this should have been included.

If this is already applied, it would be great, if you could find out during what kind of (most likely) file uploads this occurs. Maybe there is another kind of invalid $path not yet excluded in the code.

0 Likes

#16

The 141 line of my file is the same as that.

At that time the user was mounting Nextcloud on Windows (WebDAV) and editing file with Excel application. Probably… Or user have opened a spreadsheet file using Collabora Online.

0 Likes

#17

So the user didn’t use nextcloud desktop client? I could imagine some error with the temporary ms/libre/whatever office files. Those are by default excluded via desktop client, maybe via other webdav they cause issues.

I forwarded this to github and hope that it will be recognized there, as the issue was already closed :wink: : https://github.com/nextcloud/activity/issues/163

0 Likes

#18

We don’t use any Nextcloud client application by anyone. WebDAV errors often occurred in older versions, but now there are no errors related to WebDAV (in the log).

0 Likes

#19

I also can confirm that this error persists in 12.0.1
We are only using the official client applications (Windows, Android and Apple). No direct access via WebDAV.
Sadly I can not reproduce the exact circumstances that triggered it. I only know that my father moved large amounts of files yesterday (10.000+) and I now have about 50 lines with this error in the logs.

Checked the file. Can confirm that line 141 looks exactly like this.

0 Likes

#20

Same Problem with the 12.0.2

0 Likes

#21

@nickvergessen I tag you here, as the related github issue is already closed: https://github.com/nextcloud/activity/issues/163

@rabbit27 please give as much information as possible, nc-, webserver-, php-, browser console errors, if occur and which kind of files you transfer by what method (client, webdav, …).

0 Likes

#22

Same problem… Still with Nextcloud 12.0.3rc2.
Using Nginx v1.12.1. OS: Debian Jessie. PHP 7.1 FPM.

Activity App v2.5.2.

Undefined offset: 3 at \/var\/www\/nextcloud\/apps\/activity\/lib\/FilesHooks.php#620

"app":"PHP","method":"MO
VE","url":"\/remote.php\/webdav\/<SECRET>","message":"Undefined offset: 3 at \/var\/www\/nextcloud\/apps\/activity\/lib\/FilesHooks.php#620"
,"userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko\/20100101 Firefox\/55.0","version":"12.0.3.1"}                               
{"reqId":"5FdAEvO2j7CiT7Phrp8N","level":3,"time":"2017-09-17T15:15:22+00:00","remoteAddr":"","user":"--","app":"appstoreFetcher","method":"--","url
":"--","message":"Exception: {\"Exception\":\"GuzzleHttp\\\\Exception\\\\ConnectException\",\"Message\":\"cURL error 28: Operation timed out after 
10000 milliseconds with 0 bytes received\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Requ
estFsm.php(103): GuzzleHttp\\\\Exception\\\\RequestException::wrapException(Object(GuzzleHttp\\\\Message\\\\Request), Object(GuzzleHttp\\\\Ring\\\\
Exception\\\\ConnectException))\\n#1 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(132): GuzzleHttp\\\\R
equestFsm->__invoke(Object(GuzzleHttp\\\\Transaction))\\n#2 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/react\\\/promise\\\/src\\\/FulfilledPromise.
php(25): GuzzleHttp\\\\RequestFsm->GuzzleHttp\\\\{closure}(Array)\\n#3 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/ringphp\\\/src\\\/F
uture\\\/CompletedFutureValue.php(55): React\\\\Promise\\\\FulfilledPromise->then(Object(Closure), NULL, NULL)\\n#4 \\\/var\\\/www\\\/nextcloud\\\/
3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Message\\\/FutureResponse.php(43): GuzzleHttp\\\\Ring\\\\Future\\\\CompletedFutureValue->then(Object(Clo
sure), NULL, NULL)\\n#5 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(134): GuzzleHttp\\\\Message\\\\Fut
ureResponse::proxy(Object(GuzzleHttp\\\\Ring\\\\Future\\\\CompletedFutureArray), Object(Closure))\\n#6 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/g
uzzlehttp\\\/guzzle\\\/src\\\/Client.php(165): GuzzleHttp\\\\RequestFsm->__invoke(Object(GuzzleHttp\\\\Transaction))\\n#7 \\\/var\\\/www\\\/nextclo
ud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Client.php(125): GuzzleHttp\\\\Client->send(Object(GuzzleHttp\\\\Message\\\\Request))\\n#8 \\\/var
\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Http\\\/Client\\\/Client.php(138): GuzzleHttp\\\\Client->get('https:\\\/\\\/apps.ne...', Array)\\n#9 \\\/
var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/App\\\/AppStore\\\/Fetcher\\\/Fetcher.php(99): OC\\\\Http\\\\Client\\\\Client->get('https:\\\/\\\/apps
.ne...', Array)\\n#10 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/App\\\/AppStore\\\/Fetcher\\\/AppFetcher.php(66): OC\\\\App\\\\AppStore\\\\F
etcher\\\\Fetcher->fetch('\\\"2017-09-14 12:...', '[{\\\"id\\\":\\\"registr...')\\n#11 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/App\\\/AppS
tore\\\/Fetcher\\\/Fetcher.php(162): OC\\\\App\\\\AppStore\\\\Fetcher\\\\AppFetcher->fetch('\\\"2017-09-14 12:...', '[{\\\"id\\\":\\\"registr...')\
\n#12 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Installer.php(394): OC\\\\App\\\\AppStore\\\\Fetcher\\\\Fetcher->get()\\n#13 \\\/var\\\/www\
\\/nextcloud\\\/apps\\\/updatenotification\\\/lib\\\/Notification\\\/BackgroundJob.php(258): OC\\\\Installer::isUpdateAvailable('activity', Object(
OC\\\\App\\\\AppStore\\\\Fetcher\\\\AppFetcher))\\n#14 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/updatenotification\\\/lib\\\/Notification\\\/Backgrou
ndJob.php(155): OCA\\\\UpdateNotification\\\\Notification\\\\BackgroundJob->isUpdateAvailable('activity')\\n#15 \\\/var\\\/www\\\/nextcloud\\\/apps
\\\/updatenotification\\\/lib\\\/Notification\\\/BackgroundJob.php(79): OCA\\\\UpdateNotification\\\\Notification\\\\BackgroundJob->checkAppUpdates
()\\n#16 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/BackgroundJob\\\/Job.php(59): OCA\\\\UpdateNotification\\\\Notification\\\\BackgroundJob-
>run(NULL)\\n#17 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/BackgroundJob\\\/TimedJob.php(54): OC\\\\BackgroundJob\\\\Job->execute(Object(OC\
\\\BackgroundJob\\\\JobList), Object(OC\\\\Log))\\n#18 \\\/var\\\/www\\\/nextcloud\\\/cron.php(124): OC\\\\BackgroundJob\\\\TimedJob->execute(Objec
t(OC\\\\BackgroundJob\\\\JobList), Object(OC\\\\Log))\\n#19 {main}\",\"File\":\"\\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/
src\\\/Exception\\\/RequestException.php\",\"Line\":49}","userAgent":"--","version":"12.0.3.1"}                     

Error location (I’m not a Nextcloud developer, but I guess):

My Cronjob went crazy!!! High CPU & memory usage! 10Gb memory!! 100% CPU… ;(

Line in crontab: */15 * * * * php -f /var/www/nextcloud/cron.php.

Reopen issue. This has impact on performance of my whole server. URGENT.

filesystem_usagetime_spent_io_usagekernel_usagesystem_load

Ps. killing the cron.php job, the system goes back to normal operation (both memory usage as well as CPU and disk IO).

Statistics are publicly available:
https://monitor.melroy.org/ (incident started previous week, slowly grows over time, crashing my server almost)

0 Likes