Spreed: Cannot declare class OCA\Talk\Migration\Version2000Date20170707093535

Created on 21 Jan 2020  Â·  21Comments  Â·  Source: nextcloud/spreed

Edit by @nickvergessen

✅ Solution

We were only able to solve this in Nextcloud Server 19 onwards. So the major update from Nextcloud 17 to 18 will always trigger this.

🚧 Workaround

Uninstall the app and install it again.


Original Post by @NeutroGe

Steps to reproduce

  1. Install a fresh nextcloud 18.0.0.10 (latest current version)
  2. Try to install Talk app
  3. Check errors in nextcloud logs

{"reqId":"Xia6aNr0WbUmo-qoephJHQAAANM","level":3,"time":"2020-01-21T08:46:34+00:00","remoteAddr":"xx.xx.85.194","user":"**","app":"PHP","method":"POST","url":"/settings/apps/enable","message":"Cannot declare class OCA\Talk\Migration\Version2000Date20170707093535, because the name is already in use at /var/www/html/nextcloud/apps/spreed/lib/Migration/Version2000Date20170707093535.php#31","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36","version":"18.0.0.10","id":"5e26ba7581626"}

Operating system: Centos 8

Web server: Apache

Database: Maria

PHP version: PHP 7.4.1 (cli)

Nextcloud Version: 18.0.0.10

Thanks for your help.

3. to review bug regression technical debt

All 21 comments

do you have the spreed in multiple apps/ folders?

[root@nextcloud nextcloud]# find /var/www/html -name "spreed"
/var/www/html/nextcloud/apps/spreed
[root@nextcloud nextcloud]#

If that's what you meant :)

I've tried again today based on a user reply on nextcloud community forum and found out that it's not a blocking error.

When you install talk, even when there is no spreed folder in the app folder you still get that error, but after getting it you can still press the "activate" button and the app works.

Thats even more weird, but okay thanks :)

Thanks to you for looking into it :)

Hi, On new NC18 I have the same problem, it needed to push 3 times the Download and Enable button to make something and then I refresh the page and it appear on Disabled apps category, and at finish it need enabled.

Same issue here on a fresh NC 18 installation. There is already an apps/spreed folder but I never installed talk/spreed manually. Maybe it is part of the recommended apps that are installed when the option is set on first run. Ok. Whatever. Let's get rid of it...

sudo -u www-data ./occ app:remove spreed

Removal is successful and the folder apps/spreed has vanished. Let's install it again...

sudo -u www-data ./occ app:install spreed
...
PHP Fatal error: Cannot declare class OCA\Talk\Migration\Version2000Date20170707093535, because the name is already in use in /var/www/html/nextcloud/apps/spreed/lib/Migration/Version2000Date20170707093535.php on line 127

Computer says no. Also, the web interface still shows 'download and enable'.

And now comes the weird part. Hitting 'download and enable' in the web interface again finally enabled Talk. So, somehow it works but there is definitely something wrong.

Similar experience on a fresh NC18 install.

Managed to reproduce now

Just tried this on a fresh 18.0.2 install via docker, still seeing the same error:

php occ app:install spreed
PHP Fatal error:  Cannot declare class OCA\Talk\Migration\Version2000Date20170707093535, because the name is already in use in /var/www/html/custom_apps/spreed/lib/Migration/Version2000Date20170707093535.php on line 127

Just tried this on a fresh 18.0.2 install via docker, still seeing the same error:
Me too. Same error.

php occ app:install spreed
PHP Fatal error:  Cannot declare class OCA\Talk\Migration\Version2000Date20170707093535, because the name is already in use in /var/www/html/custom_apps/spreed/lib/Migration/Version2000Date20170707093535.php on line 127

Arg... Docker has a custom app path setup?

I installed this on a fresh 18.0.2 install, no docker, still seeing the same error:
PHP Fatal error: Cannot declare class OCATalkMigrationVersion2000Date20170707093535, because the name is already in use in /var/www/html/custom_apps/spreed/lib/Migration/Version2000Date20170707093535.php on line 127

I must mention that I'm also not using docker and have exact same issue.

This is in the Nextcloud VM as well, which is vanilla Nextcloud. Installing Talk via occ

Well custom_apps is not vanilla and exactly the tripping point here. But I put it back on my list

I just had the same error in a docker instance. I _docker execed_ into the container and moved the _spreed_ folder from _custom_apps_ to _apps_ and I'm now seeing Talk inside Nextcloud.

After deactivating and removing the app via Nextcloud and then removing the _apps/spreed_ folder inside the container, I could reinstall the app without problems.

_Talk_ was reinstalled in _custom_apps_ and seems to work.

custom_apps

I always thought Talk was "default" a Nextcloud app, I stand corrected.

Currently no further comments are needed, so I lock this issue for now.

For completness:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PVince81 picture PVince81  Â·  3Comments

q-wertz picture q-wertz  Â·  3Comments

jakobroehrl picture jakobroehrl  Â·  4Comments

jospoortvliet picture jospoortvliet  Â·  3Comments

llamallama picture llamallama  Â·  4Comments