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

Cannot declare class OCA\Talk\Migration\Version2000Date20170707093535 #2806

Closed
NeutroGe opened this issue Jan 21, 2020 · 21 comments · Fixed by nextcloud/server#19433
Closed

Comments

@NeutroGe
Copy link

NeutroGe commented Jan 21, 2020

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.

@nickvergessen
Copy link
Member

do you have the spreed in multiple apps/ folders?

@NeutroGe
Copy link
Author

NeutroGe commented Jan 22, 2020

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

If that's what you meant :)

@NeutroGe
Copy link
Author

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.

@nickvergessen
Copy link
Member

Thats even more weird, but okay thanks :)

@NeutroGe
Copy link
Author

Thanks to you for looking into it :)

@rubenszolt
Copy link

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.

@AlfredSK
Copy link

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.

@andrewgdunn
Copy link

Similar experience on a fresh NC18 install.

@nickvergessen
Copy link
Member

Managed to reproduce now

@nickvergessen nickvergessen added this to the 💙 Next Minor (18) milestone Feb 12, 2020
blizzz added a commit to nextcloud/univention-app that referenced this issue Feb 13, 2020
due to nextcloud/spreed#2806

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@nickvergessen nickvergessen self-assigned this Feb 18, 2020
@fnwbr
Copy link

fnwbr commented Mar 15, 2020

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

@daleosm
Copy link

daleosm commented Mar 16, 2020

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

@nickvergessen
Copy link
Member

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

@nickvergessen nickvergessen reopened this Mar 16, 2020
@rubenszolt
Copy link

I installed this on a fresh 18.0.2 install, no docker, still seeing the same error:
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

@daleosm
Copy link

daleosm commented Mar 16, 2020

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

@enoch85
Copy link
Member

enoch85 commented Mar 17, 2020

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

@nickvergessen
Copy link
Member

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

@hacktrick
Copy link

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.

@enoch85
Copy link
Member

enoch85 commented Mar 17, 2020

custom_apps

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

@nextcloud nextcloud locked as too heated and limited conversation to collaborators Mar 17, 2020
@nickvergessen
Copy link
Member

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

@nickvergessen
Copy link
Member

WIP: nextcloud/server#20038

@MichaIng
Copy link
Member

MichaIng commented May 3, 2020

For completness:

@MichaIng MichaIng closed this as completed May 3, 2020
@nickvergessen nickvergessen pinned this issue May 24, 2020
@marcoambrosini marcoambrosini unpinned this issue Aug 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.