Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activation of calendar-app breaks setup (OC 8.1 beta1) #16314

Closed
tflidd opened this issue May 13, 2015 · 16 comments
Closed

Activation of calendar-app breaks setup (OC 8.1 beta1) #16314

tflidd opened this issue May 13, 2015 · 16 comments
Labels

Comments

@tflidd
Copy link
Contributor

tflidd commented May 13, 2015

Steps to reproduce

  1. Setup owncloud 8.0.3 on Debian 7 from repo
  2. Upgrade to OC 8.1.0 beta1 with repo: http://download.opensuse.org/repositories/isv:/ownCloud:/community:/testing/Debian_7.0/
  3. Start owncloud activate calendar app, it shows that the activation failed

Expected behaviour

If calendar app is not compatible not working it should just not work.

Actual behaviour

Owncloud doesn't work any more, even the occ-command is unusable:

PHP Fatal error:  Access to undeclared static property: Sabre\VObject\Property::$classMap in /var/www/owncloud/apps/calendar/appinfo/app.php on line 37

It's no problem if the app doesn't work or can't be updated but it should break the whole setup.
You can go to the database and deactivate the calendar app and OC works again.

Server configuration

Operating system: Debian 7

Web server: Apache

Database: Mysql

PHP version: 5.4

ownCloud version: 8.1.0 beta 1

Updated from an older ownCloud or fresh install: update from 8.0.3

List of activated apps: after setup only core apps, then it fails with the calendar app

The content of config/config.php:

<?php
define('DEBUG',true);
$CONFIG = array (
  'instanceid' => 'oc1lk95e44zj',
  'passwordsalt' => 'mysalt',
  'secret' => 'my_secret',
  'trusted_domains' =>
  array (
    0 => 'myhost',
    1 => 'my-ip',
  ),
  'datadirectory' => '/var/www/owncloud/data',
  'overwrite.cli.url' => 'http://myhost/owncloud',
  'dbtype' => 'mysql',
  'version' => '8.1.0.5',
  'dbname' => 'oc',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_admin',
  'dbpassword' => 'mypassword',
  'installed' => true,
  'theme' => '',
  'maintenance' => false,
  'loglevel' => 0,
);

Logs

ownCloud log (data/owncloud.log)

PHP Fatal error:  Access to undeclared static property: Sabre\VObject\Property::$classMap in /var/www/owncloud/apps/calendar/appinfo/app.php on line 37
@tflidd
Copy link
Contributor Author

tflidd commented May 13, 2015

Ok, I downloaded the OC 8.1 version of the calendar app manually, now I can activate it.

Same applies for the contact app. But it may stay an issue for other apps that are not OC 8.1 ready when OC 8.1 is released.

@ghost
Copy link

ghost commented May 13, 2015

Seems at least the calendar issue was already reported here: owncloud/calendar#760

@MorrisJobke
Copy link
Contributor

@tflidd we usually deactivate all non-core apps and then try to upgrade them from the appstore. There is no good way to prevent PHP from doing this. So this is all we can do. Or did I miss something @DeepDiver1975 ?

@DeepDiver1975
Copy link
Member

Morris: thus happens after activating calendar manually.

This is a mess. I will look into this.
We need to resolve this sabredav dependency somehow.

@PVince81 move caldav and carddav endpoints to core????

@PVince81
Copy link
Contributor

I think the main problem here is that if a user enables a broken app, it is not possible to properly disable it without going to the database.

Any code path that tries to load apps will fail. The occ command does that too because it allows apps to register commands.

Moving caldav/carddav endpoints is out of scope for this as this is a general issue.
But even moving them to core doesn't sound like the right approach.

@PVince81
Copy link
Contributor

Maybe we need a failsafe version of "occ" that can be run without loading any apps, so the admin can at list disable broken apps from the CLI.

The ideal solution is to be able to detect broken apps and auto-disable them. See the long discussion in #14754

Now I saw @Raydiation's comment again here: #14754 (comment)

I think what he meant was have the web UI do a "probatory" ajax call that will enable the app through ajax. Maybe do a subsequent ajax call to check if enabling it didn't break everything. If that check call did not work, redo an ajax call to re-disable the app.

It's not super-clean but might do the job, at least when enabling apps from the web UI.

Doing this on the CLI for the command that enables apps is another story though.

@MorrisJobke
Copy link
Contributor

I think what he meant was have the web UI do a "probatory" ajax call that will enable the app through ajax. Maybe do a subsequent ajax call to check if enabling it didn't break everything. If that check call did not work, redo an ajax call to re-disable the app.

Sounds good :)

@DeepDiver1975
Copy link
Member

Maybe do a subsequent ajax call to check if enabling it didn't break everything.

but the subsequent calls will fail in cases like this where the installation is broken.
unless we find a way to not load apps on this call.

@MorrisJobke
Copy link
Contributor

but the subsequent calls will fail in cases like this where the installation is broken.

Then we need to make these subsequent calls with a very low dependency on other stuff.

@PVince81
Copy link
Contributor

Yes, we'd need a "disable app" code that is straight to the point without doing anything else.

@scroom
Copy link

scroom commented Jul 7, 2015

How can I deactivate the calendar app in the Database? (Step-by-step howto?)
Installed the 8.1 final, activated the calendar app and now owncloud is unusable!

@PVince81
Copy link
Contributor

PVince81 commented Jul 7, 2015

Ah, that is the ticket I was looking for... I re-raised as #17435 (with attached proof of concept) for solutions to catch such issues.

@alex42ka to disable the app you can edit "config.php" and set "maintenance" to "true".
Then on the command line sudo -uwww-data ./occ app:disable calendar (replace "www-data" with your web server user, if different)

@ghost
Copy link

ghost commented Jul 7, 2015

@alex42ka See also https://forum.owncloud.org/viewtopic.php?f=17&t=7241

@PVince81
Copy link
Contributor

PVince81 commented Jul 7, 2015

If you don't have CLI access, then this SQL query will do: update oc_appconfig set configvalue='no' where appid='calendar' and configkey='enabled';

@scroom
Copy link

scroom commented Jul 7, 2015

Thanks a lot!

@PVince81
Copy link
Contributor

PVince81 commented Jul 7, 2015

Closing in favor of #17435

@PVince81 PVince81 closed this as completed Jul 7, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Aug 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants