php fatal error during upgrade from 8.2.2.2 to 9.0.0.1 #23020

Closed
thejabok opened this Issue Mar 9, 2016 · 10 comments

Projects

None yet

5 participants

@thejabok
thejabok commented Mar 9, 2016

Steps to reproduce

  1. Upgrade from 8.2.2 to 9.0.0 (both using packages and manual results in the same error)
  2. Run occ upgrade from console
  3. After databases are updated, owncloud returns the following error: Call to a member function getDateTime() on null at /var/www/owncloud/apps/dav/lib/caldav/caldavbackend.php#1298

Expected behaviour

Upgrade should finish without problems.

Actual behaviour

Upgrade aborts due to aforementioned error

Server configuration

Operating system: Debian

Web server: Apache2

Database: MySQL

PHP version: 5.6.14-0+deb8u1

ownCloud version: 9.0.0

Updated from an older ownCloud or fresh install: Upgraded from 8.2.2

Where did you install ownCloud from: deb http://download.owncloud.org/download/repositories/stable/Debian_8.0/ /

Signing status (ownCloud 9.0 and above):

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

List of activated apps:

  • activity: 2.1.3
  • calendar: 0.8.1
  • contacts: 0.5.0.0
  • dav: true
  • federatedfilesharing: true
  • files: 1.2.0
  • files_external: 0.3.0
  • files_pdfviewer: 0.7
  • files_sharing: 0.7.0
  • files_texteditor: 2.0
  • files_trashbin: 0.7.0
  • files_versions: 1.1.0
  • firstrunwizard: 1.1
  • gallery: 14.2.0
  • mail: 0.2.1
  • notifications: 0.1.0
  • provisioning_api: 0.3.0
  • shorten: 0.0.14
  • templateeditor: 0.1

The content of config/config.php:

'instanceid' => 'xxxxxxxx',
'passwordsalt' => 'xxxxxxxx',
'secret' => 'xxxxxxxx',
'trusted_domains' =>
array (
0 => 'localhost',
1 => 'xxxxxxxx',
2 => 'xxxxxxxx',
3 => 'xxxxxxxx',
4 => 'xxxxxxxx',
),
'datadirectory' => '/var/www/owncloud/data',
'overwrite.cli.url' => 'https://xxxxxxxx/owncloud',
'dbtype' => 'mysql',
'version' => '8.2.2.2',
'dbname' => 'owncloud',
'dbhost' => '127.0.0.1',
'dbtableprefix' => 'oc_',
'dbuser' => 'oc_admin',
'dbpassword' => 'xxxxxxxx',
'logtimezone' => 'Europe/Berlin',
'installed' => true,
'memcache.local' => '\OC\Memcache\Redis',
'filelocking.enabled' => true,
'memcache.locking' => '\OC\Memcache\Redis',
'redis' =>
array (
'host' => 'localhost',
'port' => 6379,
'timeout' => 0,
),
'asset-pipeline.enabled' => true,
'appstore.experimental.enabled' => true,
'maintenance' => false,
'loglevel' => 0,
'theme' => '',

Are you using external storage, if yes which one: owncloud (separate user on same instance)

Are you using encryption: no

Are you using an external user-backend, if yes which one: No

Client configuration

Browser: Firefox 44.0.2

Operating system: Windows 7

Logs

Web server error log

[Wed Mar 09 14:01:39.747264 2016] [:error] [pid 5880] [client 212.4.225.145:45650] PHP Fatal error: Call to a member function getDateTime() on null in /var/www/owncloud/apps/dav/lib/caldav/caldavbackend.php on line 1298

ownCloud log (data/owncloud.log)

{"reqId":"NCCOb0/0UVm2jjSaGpnU","remoteAddr":"","app":"core","message":"starting upgrade from 8.2.2.2 to 9.0.0.19","level":0,"time":"2016-03-09T12:26:57+00:00","method":"--","url":"--"}
{"reqId":"NCCOb0/0UVm2jjSaGpnU","remoteAddr":"","app":"PHP","message":"Call to a member function getDateTime() on null at /var/www/owncloud/apps/dav/lib/caldav/caldavbackend.php#1298","level":3,"time":"2016-03-09T12:27:41+00:00$

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...
@LukasReschke LukasReschke added the app:dav label Mar 9, 2016
@LukasReschke LukasReschke added this to the 9.0.1-current-maintenance milestone Mar 9, 2016
@DeepDiver1975 DeepDiver1975 self-assigned this Mar 9, 2016
@DeepDiver1975
Member

@thejabok any chance to find out which event was causing this issue? Please post if possible

@PVince81 PVince81 added the needs info label Mar 9, 2016
@thejabok
thejabok commented Mar 9, 2016

@DeepDiver1975 Unfortunately not from the log that I have of the failed upgrade. Is there a way to run the upgrade with a more detailed log? I just restored my 8.2.2 instance from backup and am about to manually upgrade again, then I could try to pinpoint what causes this. Another thing I noticed was that although I deactivated all third-party apps before the upgrade, some of them were still activated. I'll make sure to deactivate all apps before the next attempt and see if that caused it.

@thejabok
thejabok commented Mar 9, 2016

Again same problem. occ upgrade reports "updated database" and goes on to update app. It reports "Updated to 1.4.4." Then no output for about half a minute, then the error message appears again. Here's the owncloud.log:

{"reqId":"i+IS0B92wZZ2d4mahRKn","remoteAddr":"","app":"core","message":"starting upgrade from 8.2.2.2 to 9.0.0.19","level":0,"time":"2016-03-09T16:18:58+00:00","method":"--","url":"--"}
{"reqId":"i+IS0B92wZZ2d4mahRKn","remoteAddr":"","app":"PHP","message":"Call to a member function getDateTime() on null at /var/www/owncloud/apps/dav/lib/caldav/caldavbackend.php#1298","level":3,"time":"2016-03-09T16:20:08+00:00","method":"--","url":"--"}

I'm happy to provide more information if needed.

@DeepDiver1975
Member

There is one event in your db where DTSTART has not a proper value or is missing - I'm wondering of this is a valid ics file then ....

@DeepDiver1975 DeepDiver1975 added a commit that referenced this issue Mar 9, 2016
@DeepDiver1975 DeepDiver1975 fixes #23020 bc434b2
@thejabok
thejabok commented Mar 9, 2016

@DeepDiver1975 you're genius, thank you so much! This worked perfectly. Newbie-question: Is there a way to download the edited caldavbackend.php file from Github? I manually inserted the code in the file on my server and now owncloud code check complains because of wrong hash. Or should I just change the code back after successful upgrade?

@LukasReschke
Member

@thejabok I'd suggest to live for now with the warning (it will only be visible for admins and will be gone with 9.0.1) or set integrity.check.disabled to true in config.php.

@thejabok

@LukasReschke thanks for the tip. Also, on a side note, the .htaccess file in the root folder is throwing a code integrity error as well when the upload_max_filesize and post_max_size values are changed to 2G. Should I open that as a separate issue?

@LukasReschke
Member

@LukasReschke thanks for the tip. Also, on a side note, the .htaccess file in the root folder is throwing a code integrity error as well when the upload_max_filesize and post_max_size values are changed to 2G. Should I open that as a separate issue?

That should not happen if one updated correctly. (replaced the file with the new one before update, then adjusted the values after update in the admin interface)

@DeepDiver1975 DeepDiver1975 added a commit that referenced this issue Mar 10, 2016
@DeepDiver1975 DeepDiver1975 fixes #23020 8465f9b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment