Resolved, Self Hosted - Nextcloud Snap 34.0.1snap1 fails during bootstrap after automatic refresh with Class "OCP\EventDispatcher\Event" not found Summary

Nextcloud Snap 34.0.1snap1 fails during bootstrap after automatic refresh with Class "OCP\EventDispatcher\Event" not found

Summary

After an automatic Snap refresh from 33.0.6snap1 to 34.0.1snap1, the Nextcloud instance became completely unavailable with an HTTP 500 Internal Server Error.

The failure occurs before Nextcloud is able to initialize. Even occ status cannot execute because PHP aborts during bootstrap with:


Error: Class "OCP\EventDispatcher\Event" not found

Reverting the Snap to 33.0.6snap1 immediately restores full functionality without any database changes or repairs.


Environment

  • Ubuntu 24.04 LTS
  • Nextcloud Snap
  • Previous version:
    • 33.0.6snap1
    • Revision 53672
  • Updated version:
    • 34.0.1snap1
    • Revision 53763
  • Channel:
    • latest/stable

Symptoms

Immediately after the Snap refresh:

  • Browser returns

Internal Server Error

The server encountered an internal error and was unable to complete your request.
  • occ status fails before startup.

Output:


Nextcloud or one of the apps require upgrade - only a limited number of commands are available

You may use your browser or the occ upgrade command to do the upgrade

Error:
Class "OCP\EventDispatcher\Event" not found

/snap/nextcloud/53763/htdocs/lib/public/Log/BeforeMessageLoggedEvent.php:18

(Full stack trace available.)


Diagnostics performed

Snap refresh completed successfully


snap changes

returned


no changes found

indicating there was no interrupted refresh.


Reverting fixes the issue


sudo snap revert nextcloud

Immediately restores service.

After revert:


sudo nextcloud.occ status

returns


installed: true
version: 33.0.6.2
maintenance: false
needsDbUpgrade: false

Integrity check


sudo nextcloud.occ integrity:check-core

returns successfully with no errors.


App updates


sudo nextcloud.occ app:update --all

returns


All apps are up-to-date or no updates could be found

Database

No database upgrade is required.


needsDbUpgrade: false

Enabled apps

(Complete list available if required.)

Notable third-party apps include:

  • Calendar
  • Contacts
  • Notes
  • Music
  • Notify Push
  • DICOM Viewer
  • Moodle Integration
  • Repod
  • School Planner

No app update was pending.


Recovery


sudo snap revert nextcloud

fully restores the instance.

No additional repair, migration or database work was required.


Expected behaviour

Refreshing from 33.0.6snap1 to 34.0.1snap1 should complete successfully without rendering the instance unusable.


Actual behaviour

The upgraded Snap fails during bootstrap with


Class "OCP\EventDispatcher\Event" not found

preventing:

  • Web interface
  • occ
  • upgrade
  • maintenance mode

from functioning.


Why this appears to be a Snap issue

Evidence suggesting this is not a user configuration problem:

  • Snap refresh completed successfully.
  • Database is healthy.
  • Core integrity check passes.
  • No pending app updates.
  • Reverting only the Snap revision immediately restores service.
  • No repair commands were required after reverting.

This suggests either:

  • a regression in Snap revision 53763, or
  • an issue in the upgrade path specific to this Snap build.

Reproduction

  1. Working installation on Snap revision 53672 (33.0.6snap1).
  2. Refresh to revision 53763 (34.0.1snap1).
  3. Nextcloud returns HTTP 500.
  4. occ fails with Class "OCP\EventDispatcher\Event" not found.
  5. Revert Snap.
  6. Instance immediately functions normally.

Additional note

As a temporary mitigation, automatic Snap refreshes have been held to prevent production outages until this issue can be investigated.


One suggestion before you submit it

Since you re-ran:


sudo snap refresh nextcloud

and you’re back on 34.0.1snap1, before submitting the report, please check whether the error is still reproducible:


sudo nextcloud.occ status

If it still produces the same OCP\EventDispatcher\Event error, that’s even stronger evidence that the issue is deterministic with revision 53763.

If, unexpectedly, it now works, then the initial refresh may have left the Snap in an inconsistent state, which is also valuable information for the developers. In that case, the report should be updated to mention that a second refresh of the same revision resolved the problem.