OCC PHP Fatal error in NC 29.0.11

When running “occ commands” it ends up with PHP Fatal error for Egulias\EmailValidator\EmailLexer.

Example for command “sudo -u www-data php /var/www/html/occ app:update --all”

Gives (below) output,

PHP Fatal error: Type of Egulias\EmailValidator\EmailLexer::$lookahead must be ?Doctrine\Common\Lexer\Token (as in class Doctrine\Common\Lexer\AbstractLexer) in /var/www/html/3rdparty/egulias/email-validator/src/EmailLexer.php on line 11

Unfortunately there is no more detailed log. Does anyone have an idea what the error could be and what it is caused by?

I have found a thread about an app that generates a similar error. The difference for me is that I don’t use that app. ([Bug]: system e-mail and occ broken after upgrade from NC28 to 30.0.4 (docker) via NC29 · Issue #50029 · nextcloud/server · GitHub)

Regards

Not too much info, but you know your server is not supported anymore?
Maybe updating the used software is a good starting point.
Welcome to the forum.

Thanks geoW.

I am well aware that the version is no longer supported. The problem is that I am stuck with the version. This is because of UCS (Univention Corporate Server).

https://help.univention.com/t/univention-5-2-nextcloud/23841

Thanks, but now I was thinking more about the fact that the time for nextcloud app upgrade for UCS doesn’t really scale. I find that once nextcloud app is upgraded, it’s close to EOL for the version.

That’s why we are forced to stay with a version that is EOL. Once you encounter something that doesn’t work, you don’t get any support from the community. For example, what (the case) I mentioned in my first report.

About the posted error,
It is difficult to find the source of the error, when the error message (it self) is vague.

I think there may be some wise people here who can give some advice on the matter. :slight_smile:

Regards

So I hope too. :grinning_face:

1 Like

Well, the problem is in line 11 of the file /var/www/html/3rdparty/egulias/email-validator/src/EmailLexer.php

So it might help to post it here. Not hard to find line 11 in a specific file.

Sorry, forgot to attach it to the original post. :slightly_smiling_face:

Line 11 in file EmailLexer.php

class EmailLexer extends AbstractLexer

EmailLexer.php

AbstractLexer.php

Token.php

/var/www/html/apps# ls -l

activity
admin_audit
bruteforcesettings
calendar
circles
cloud_federation_api
comments
contacts
contactsinteraction
dashboard
dav
encryption
federatedfilesharing
federation
files
files_downloadlimit
files_external
files_pdfviewer
files_reminders
files_sharing
files_trashbin
files_versions
firstrunwizard
integration_google
integration_onedrive
logreader
lookup_server_connector
maps
nextcloud_announcements
notes
notifications
oauth2
onlyoffice
password_policy
passwords
photos
privacy
provisioning_api
quicknotes
quota_warning
recommendations
related_resources
richdocuments
richdocumentscode
serverinfo
settings
sharebymail
spreed
support
survey_client
suspicious_login
systemtags
text
theming
twofactor_backupcodes
twofactor_email
twofactor_nextcloud_notification
twofactor_totp
twofactor_webauthn
user_ldap
user_saml
user_status
viewer
workflowengine
weather_status

Regards