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 use OCP\Constants as Constants because the name is already in use #1854

Closed
AndyXheli opened this issue Jan 4, 2022 · 8 comments
Closed
Assignees
Labels
1. to develop Issues that are ready for development bug

Comments

@AndyXheli
Copy link

Server configuration

Operating system:
Ubuntu 20.4
Web server:
Apache2
Database:
MariaDB 10.5.13
PHP version:
8.0.14
Nextcloud version: (see Nextcloud admin page)
23.0.0
Group folders version:
11.1.1
Updated from an older Nextcloud/ownCloud or fresh install:
NC 22
Where did you install Nextcloud from:
Nextcloud
Are you using external storage, if yes which one: local/s3/smb/sftp/...
No
Are you using encryption: yes/no
No
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/Saml/...

Client configuration

Browser:

Operating system:

Logs

Web server error log

Web server error log
Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Nextcloud log
{"reqId":"iBTu4KlkJhYTgNWdGFCy","level":3,"time":"2022-01-04T18:40:01+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Cannot use OCP\\Constants as Constants because the name is already in use at /var/www/nextcloud/apps/groupfolders/lib/Command/ACL.php#35","userAgent":"--","version":"23.0.0.10","id":"61d49d58a5afd"}
@AndyXheli AndyXheli added 0. Needs triage Issues that need to be triaged bug labels Jan 4, 2022
@CarlSchwan
Copy link
Member

Looks like a rebasing went wrong. Temporary fix is too delete the line 35 in the file.

I will submit a PR tomorrow morning.

@AndyXheli
Copy link
Author

copy that thank you!

@fschrempf fschrempf added 1. to develop Issues that are ready for development and removed 0. Needs triage Issues that need to be triaged labels Jan 4, 2022
@fschrempf
Copy link
Contributor

Bugs like these happen easily, but they should never pass the CI. We really should try to make sure that the CI is able to catch stuff like that in some way.

@CarlSchwan
Copy link
Member

#1829 would have probably caught it but it's only on master since it's an invasive change.

Only 23 and 22 are affected, 21 and master aren't

@CarlSchwan
Copy link
Member

PRs: #1856 and #1857 to fix it

I will try to release a bugfix release tomorrow. Ideally, for the 23 release, #1849 should also be included since it also fixes an important regression.

@solracsf solracsf changed the title Cannot use OCP\Constants as Constants because the name is already in use at /var/www/nextcloud/apps/groupfolders/lib/Command/ACL.php#35 Cannot use OCP\Constants as Constants because the name is already in use Jan 4, 2022
@Githopp192
Copy link

same to me .. did open a case .. but saw later, case is already open (will close other one)

Actual behaviour
i've got a bash-shell script, which automatically install new app versions, when available.

(may be a bad idea).

After automatic install of "groupfolders new version available: 10.0.1" PHP reports FATAL ERROR.

PHP Fatal error: Cannot use OCP\Constants as Constants because the name is already in use in /var/www/html/nextcloud/apps/groupfolders/lib/Command/ACL.php on line 35

none of the '/var/www/html/nextcloud/occ' commands is working anymore.

Steps to reproduce
disabling the groupfolders app solves the issue.
enabling the groupfolders app triggers the issue.

Expected behaviour
Especially the "FEATURED" Apps should not bring the CORE Cloud function to malfunction.

Client configuration details

na

Server configuration details

@CarlSchwan
Copy link
Member

This is now fixed and @juliushaertl released new versions with the fix.

@MrColumbo
Copy link

This is now fixed and @juliushaertl released new versions with the fix.

is it fixed in all versions?
I am running on NC 23.03 and Groupfolder 11.1.1 and I get the error for all OCC commands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Issues that are ready for development bug
Projects
None yet
Development

No branches or pull requests

5 participants