gza / oczpush

Owncloud Z-push 2.0 plugin
GNU Affero General Public License v3.0
32 stars 26 forks source link

PHP Fatal error: Call to undefined method stdClass::Check() in /var/www/oczpush/backend/occalendar.php on line 332 #18

Open acht opened 11 years ago

acht commented 11 years ago

Hallo,

I use OC 4.0.8 from Debian and try to use oczpush. Contacts seam to work well. So thanks for your work.

The Calender seems not to work. 2 Appointments are synced from OC to Mobile (Android phone) and I get following error: 30/12/2012 18:24:31 [30287] [ERROR] [XXX] LoopDetection->ProcessLoopDetectionPreviousConnectionFailed(): Command 'Sync' at 30/12/2012 18:16:08 with pid '28708' terminated unexpectedly or is still running. 30/12/2012 18:24:31 [30287] [ERROR] [XXX] Please check your logs for this PID and errors like PHP-Fatals or Apache segmentation faults and report your results to the Z-Push dev team.

The Apache-log gives me: PHP Fatal error: Call to undefined method stdClass::Check() in /var/www/oczpush/backend/occalendar.php on line 332

Calender sync from Mobile to OC seams to work. ToDos seems to have the same Problem.

Thanks in advance

gza commented 11 years ago

Hi,

I don't think oczupsh is fully compatible with OC 4.0. But perhaps it is not the problem. Do you have previous errors ? look into owncloud logs too...

regards

acht commented 11 years ago

Hallo,

Here is the first in the log: 30/12/2012 12:53:47 [24986] [ERROR] [mh_privat] trace error: /var/www/oczpush/li b/utils/timezoneutil.php:1100 Object of class vtimezone could not be converted t o string (4096) - backtrace: 5 steps 30/12/2012 12:53:47 [24986] [ERROR] [mh_privat] trace: 1:/var/www/oczpush/backen d/occalendar.php:324 - TimezoneUtil::GetFullTZ() 30/12/2012 12:53:47 [24986] [ERROR] [mh_privat] trace: 2:/var/www/oczpush/lib/de fault/diffbackend/exportchangesdiff.php:196 - BackendOCCalendar->GetMessage() 30/12/2012 12:53:47 [24986] [ERROR] [mh_privat] trace: 3:/var/www/oczpush/lib/re quest/sync.php:858 - ExportChangesDiff->Synchronize() 30/12/2012 12:53:47 [24986] [ERROR] [mh_privat] trace: 4:/var/www/oczpush/lib/re quest/requestprocessor.php:127 - Sync->Handle() 30/12/2012 12:53:47 [24986] [ERROR] [mh_privat] trace: 5:/var/www/oczpush/index. php:182 - RequestProcessor::HandleRequest()

my firs impression is that $message is not initialised because the loop in line 297 runs zero times. But this is just a guess.

gza commented 11 years ago

Could you try to uncomment debug at 286 and see if Calendar object is correctly retrieved from OC ?

acht commented 11 years ago

OC dose not show any message during, I checked with "tail -f owncloud.log".

I changed the code to ZLog::Write(LOGLEVEL_INFO . Debug seams to flood my log but I can change to Debug if this helps. Her is the Log:

30/12/2012 21:50:19 [28119] [WARN] [XXX] /var/www/oczpush/backend/occalendar.php:329 Creating default object from empty value (2) 30/12/2012 21:50:19 [28618] [WARN] [XXX] /var/www/oczpush/backend/occombined/occombined.php:35 Array to string conversion (8) 30/12/2012 21:50:19 [28618] [INFO] [XXX] o => Array 30/12/2012 21:50:19 [28618] [WARN] [XXX] /var/www/oczpush/backend/occombined/occombined.php:35 Array to string conversion (8) 30/12/2012 21:50:19 [28618] [INFO] [XXX] a => Array 30/12/2012 21:50:19 [28618] [WARN] [XXX] /var/www/oczpush/backend/occombined/occombined.php:35 Array to string conversion (8) 30/12/2012 21:50:19 [28618] [INFO] [XXX] d => Array 30/12/2012 21:50:19 [28618] [INFO] [XXX] OCCombined 4 backends loaded. 30/12/2012 21:50:19 [28618] [INFO] [XXX] OCCombined->Logon() success 30/12/2012 21:50:19 [28618] [INFO] [XXX] OCCombined->Setup() success 30/12/2012 21:50:19 [28618] [INFO] [XXX] OCCombined->Setup() success 30/12/2012 21:50:20 [28618] [INFO] [XXX] ExportChangesDiff->InitializeExporter(): Found '750' changes 30/12/2012 21:50:20 [28618] [WARN] [XXX] Mobile loop detected! Messages sent to the mobile will be restricted to 2 items in order to identify the conflict 30/12/2012 21:50:20 [28618] [INFO] [XXX] OCCalendar::GetMessage $calob 7ef37f76-47c3-4a42-a293-4d5e472c1095.ics-Array ( [id] => 7537 [calendarid] => 7 [objecttype] => VJOURNAL [startdate] => [enddate] => [repeating] => 0 [summary] => pki [calendardata] => BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Synthesis AG//NONSGML SyncML Engine V3.4.0.41//EN BEGIN:VJOURNAL LAST-MODIFIED:20121221T224357Z DTSTAMP:20121221T224357Z SUMMARY:pki DESCRIPTION:XXX\n\n\n\n\n UID:7ef37f76-47c3-4a42-a293-4d5e472c1095 END:VJOURNAL END:VCALENDAR

[uri] => XXX.ics
[lastmodified] => 1356129882

)

30/12/2012 21:50:20 [28618] [WARN] [XXX] /var/www/oczpush/backend/occalendar.php:320 Undefined variable: message (8) 30/12/2012 21:50:20 [28618] [WARN] [XXX] /var/www/oczpush/backend/occalendar.php:320 Trying to get property of non-object (8) 30/12/2012 21:50:20 [28618] [WARN] [XXX] /var/www/oczpush/backend/occalendar.php:320 array_merge(): Argument #1 is not an array (2) 30/12/2012 21:50:20 [28618] [WARN] [XXX] /var/www/oczpush/backend/occalendar.php:320 Creating default object from empty value (2) 30/12/2012 21:50:30 [30414] [INFO] [XXX] Version='2.0.6-1616' method='POST' from='192.168.1.37' cmd='Ping' getUser='XXX' devId='XXX' devType='SAMSUNGGTI' 30/12/2012 21:50:30 [30414] [WARN] [XXX] /var/www/oczpush/backend/occombined/occombined.php:35 Array to string conversion (8) 30/12/2012 21:50:30 [30414] [INFO] [XXX] i => Array 30/12/2012 21:50:30 [30414] [WARN] [XXX] /usr/share/owncloud/lib/app.php:360 file_get_contents(/usr/share/owncloud/apps/files_odfviewer/appinfo/version): failed to open stream: No such file or directory (2) 30/12/2012 21:50:30 [30414] [WARN] [XXX] /usr/share/owncloud/lib/app.php:360 file_get_contents(/usr/share/owncloud/apps/tasks/appinfo/version): failed to open stream: No such file or directory (2) 30/12/2012 21:50:30 [30414] [WARN] [XXX] /var/www/oczpush/backend/occombined/occombined.php:35 Array to string conversion (8) 30/12/2012 21:50:30 [30414] [INFO] [XXX] o => Array 30/12/2012 21:50:30 [30414] [WARN] [XXX] /var/www/oczpush/backend/occombined/occombined.php:35 Array to string conversion (8) 30/12/2012 21:50:30 [30414] [INFO] [XXX] a => Array 30/12/2012 21:50:30 [30414] [WARN] [XXX] /var/www/oczpush/backend/occombined/occombined.php:35 Array to string conversion (8) 30/12/2012 21:50:30 [30414] [INFO] [XXX] d => Array 30/12/2012 21:50:30 [30414] [INFO] [XXX] OCCombined 4 backends loaded. 30/12/2012 21:50:31 [30414] [INFO] [XXX] OCCombined->Logon() success 30/12/2012 21:50:31 [30414] [INFO] [XXX] OCCombined->Setup() success 30/12/2012 21:50:31 [30414] [ERROR] [XXX] LoopDetection->ProcessLoopDetectionPreviousConnectionFailed(): Command 'Sync' at 30/12/2012 21:49:29 with pid '28324' terminated unexpectedly or is still running. 30/12/2012 21:50:31 [30414] [ERROR] [XXX] Please check your logs for this PID and errors like PHP-Fatals or Apache segmentation faults and report your results to the Z-Push dev team. 30/12/2012 21:50:31 [30414] [INFO] [XXX] OCCombined->Setup() success 30/12/2012 21:50:31 [30414] [INFO] [XXX] OCCombined->Setup() success 30/12/2012 21:50:31 [30414] [INFO] [XXX] OCCombined->Setup() success 30/12/2012 21:50:31 [30414] [INFO] [XXX] SyncCollections->CheckForChanges(): Waiting for store changes... (lifetime 470 seconds) 30/12/2012 21:50:31 [30414] [INFO] [XXX] OCCombined->Setup() success 30/12/2012 21:50:31 [30414] [WARN] [XXX] BackendIMAP->GetMessageList('INBOX','0'): Failed to retrieve overview: Sequence out of range 30/12/2012 21:50:31 [30414] [INFO] [XXX] ExportChangesDiff->InitializeExporter(): Found '0' changes 30/12/2012 21:50:31 [30414] [INFO] [XXX] OCCombined->Setup() success 30/12/2012 21:50:31 [30414] [INFO] [XXX] ExportChangesDiff->InitializeExporter(): Found '0' changes

acht commented 11 years ago

The shown "event" seams to be a memo not a calender item!

acht commented 11 years ago

I removed all memos from OC via syncevolution. In moment it seams to sync. I will report later, 700+ events need some tome to be processed.

acht commented 11 years ago

It toke me the half night to get syncing to work. So her are my conclusions:

1) Bug, memos should be ignored: After removing all memos the error from above is gone.

2) Feature request, do something useful with memos

Then I run into an endless loop. Based on your debug code I could identify the “broken” events and fixed or removed them. Hear is one of the events:

31/12/2012 01:58:36 [17535] [INFO] [XXX] OCCalendar::GetMessage $calob 201 20502T103351Z-3492-1000-1-74@mh-ct.ics-Array ( [id] => 6796 [calendarid] => 7 [objecttype] => VEVENT [startdate] => 2004-10-12 11:00 [enddate] => 2004-10-12 12:30 [repeating] => 1 [summary] => XXX [calendardata] => BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Synthesis AG//NONSGML SyncML Engine V3.4.0.41//EN BEGIN:VEVENT LAST-MODIFIED:20121216T204338Z DTSTAMP:20121220T225534Z CREATED:20121216T204338Z UID:20120502T103351Z-3492-1000-1-74@mh-ct CATEGORIES:Business CLASS:PUBLIC SUMMARY:XXX LOCATION:XXX DTSTART:20041012T110000Z RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=TU;UNTIL=20050202 EXDATE:19700101T000000Z DTEND:20041012T123000Z END:VEVENT END:VCALENDAR

[uri] => 20120502T103351Z-3492-1000-1-74@mh-ct.ics
[lastmodified] => 1356044180

)

The problem seams to be the line “EXDATE:19700101T000000Z”

3) Feature request, handle broken events: It would be nice if broken events could be ignored for syncing and to report the problem to the user by creating a new task.

So thanks a lot for your work!

PS.: the most important feature for me is to sync multiple calenders. Is this already on your schedule?