Class OCA\\\\Federation\\\\SyncJob does not exist

Hello,
I have found this error in the owncloud log, and it happens quite often. How could I configure properly not to get this error?

{“reqId”:“fklsjafkldjsakfljdsa”,“level”:3,“time”:“June 08, 2021 04:30:02”,“remoteAddr”:"",“user”:"–",“app”:“core”,“method”:"–",“url”:"–",“message”:“Exception: {“Exception”:“OCP\\AppFramework\\QueryException”,“Message”:“Could not resolve OCA\\Federation\\SyncJob! Class OCA\\Federation\\SyncJob does not exist”,“Code”:0,“Trace”:”#0 \/var\/www\/owncloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php(110): OC\\AppFramework\\Utility\\SimpleContainer->resolve()\n#1 \/var\/www\/owncloud\/lib\/private\/ServerContainer.php(86): OC\\AppFramework\\Utility\\SimpleContainer->query()\n#2 \/var\/www\/owncloud\/lib\/private\/BackgroundJob\/JobList.php(253): OC\\ServerContainer->query()\n#3 \/var\/www\/owncloud\/lib\/private\/BackgroundJob\/JobList.php(209): OC\\BackgroundJob\\JobList->buildJob()\n#4 \/var\/www\/owncloud\/core\/Command\/System\/Cron.php(114): OC\\BackgroundJob\\JobList->getNext()\n#5 \/var\/www\/owncloud\/lib\/composer\/symfony\/console\/Command\/Command.php(255): OC\\Core\\Command\\System\\Cron->execute()\n#6 \/var\/www\/owncloud\/lib\/composer\/symfony\/console\/Application.php(1009): Symfony\\Component\\Console\\Command\\Command->run()\n#7 \/var\/www\/owncloud\/lib\/composer\/symfony\/console\/Application.php(273): Symfony\\Component\\Console\\Application->doRunCommand()\n#8 \/var\/www\/owncloud\/lib\/composer\/symfony\/console\/Application.php(149): Symfony\\Component\\Console\\Application->doRun()\n#9 \/var\/www\/owncloud\/lib\/private\/Console\/Application.php(165): Symfony\\Component\\Console\\Application->run()\n#10 \/var\/www\/owncloud\/console.php(116): OC\\Console\\Application->run()\n#11 \/var\/www\/owncloud\/occ(11): require_once(’\/var\/www\/ownclo…’)\n#12 {main}",“File”:"\/var\/www\/owncloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php",“Line”:96}"}

Server configuration

Operating system:
Ubuntu 18.04.5 LTS
Web server:
Apache/2.4.29 (Ubuntu)
Database:
10.5.10-MariaDB-1:10.5.10+maria~bionic mariadb.org binary distribution
PHP version:
PHP 7.4.20 (cli) (built: Jun 4 2021 21:24:37) ( NTS )
ownCloud version: (see ownCloud admin page)
10.7.0.4
Updated from an older ownCloud or fresh install:
Yes, updated.

List of activated apps:

Enabled:

  • activity:
    • Version: 2.6.0
    • Path: /var/www/owncloud/apps/activity
  • calendar:
    • Version: 1.6.4
    • Path: /var/www/owncloud/apps-external/calendar
  • comments:
    • Version: 0.3.0
    • Path: /var/www/owncloud/apps/comments
  • configreport:
    • Version: 0.2.0
    • Path: /var/www/owncloud/apps/configreport
  • contacts:
    • Version: 1.5.5
    • Path: /var/www/owncloud/apps-external/contacts
  • dav:
    • Version: 0.6.0
    • Path: /var/www/owncloud/apps/dav
  • federatedfilesharing:
    • Version: 0.5.0
    • Path: /var/www/owncloud/apps/federatedfilesharing
  • files:
    • Version: 1.5.2
    • Path: /var/www/owncloud/apps/files
  • files_antivirus:
    • Version: 1.0.0
    • Path: /var/www/owncloud/apps-external/files_antivirus
  • files_external:
    • Version: 0.7.1
    • Path: /var/www/owncloud/apps/files_external
  • files_mediaviewer:
    • Version: 1.0.4
    • Path: /var/www/owncloud/apps/files_mediaviewer
  • files_pdfviewer:
    • Version: 0.12.1
    • Path: /var/www/owncloud/apps-external/files_pdfviewer
  • files_sharing:
    • Version: 0.14.0
    • Path: /var/www/owncloud/apps/files_sharing
  • files_texteditor:
    • Version: 2.3.1
    • Path: /var/www/owncloud/apps-external/files_texteditor
  • files_trashbin:
    • Version: 0.9.1
    • Path: /var/www/owncloud/apps/files_trashbin
  • files_versions:
    • Version: 1.3.0
    • Path: /var/www/owncloud/apps/files_versions
  • firstrunwizard:
    • Version: 1.2.0
    • Path: /var/www/owncloud/apps/firstrunwizard
  • market:
    • Version: 0.6.0
    • Path: /var/www/owncloud/apps/market
  • notifications:
    • Version: 0.5.2
    • Path: /var/www/owncloud/apps/notifications
  • provisioning_api:
    • Version: 0.5.0
    • Path: /var/www/owncloud/apps/provisioning_api
  • systemtags:
    • Version: 0.3.0
    • Path: /var/www/owncloud/apps/systemtags
  • templateeditor:
    • Version: 0.4.0
    • Path: /var/www/owncloud/apps/templateeditor
  • theme-sintas:
    • Version: 1.0.0
    • Path: /var/www/owncloud/apps-external/theme-sintas
  • updatenotification:
    • Version: 0.2.1
    • Path: /var/www/owncloud/apps/updatenotification

Disabled:

  • admin_audit:
    • Path: /var/www/owncloud/apps/admin_audit
  • announcementcenter:
    • Path: /var/www/owncloud/apps/announcementcenter
  • customgroups:
    • Path: /var/www/owncloud/apps/customgroups
  • encryption:
    • Path: /var/www/owncloud/apps/encryption
  • enterprise_key:
    • Path: /var/www/owncloud/apps/enterprise_key
  • external:
    • Path: /var/www/owncloud/apps/external
  • federation:
    • Path: /var/www/owncloud/apps/federation
  • files_classifier:
    • Path: /var/www/owncloud/apps/files_classifier
  • files_external_dropbox:
    • Path: /var/www/owncloud/apps/files_external_dropbox
  • files_external_ftp:
    • Path: /var/www/owncloud/apps/files_external_ftp
  • files_ldap_home:
    • Path: /var/www/owncloud/apps/files_ldap_home
  • files_lifecycle:
    • Path: /var/www/owncloud/apps/files_lifecycle
  • firewall:
    • Path: /var/www/owncloud/apps/firewall
  • graphapi:
    • Path: /var/www/owncloud/apps/graphapi
  • guests:
    • Path: /var/www/owncloud/apps/guests
  • metrics:
    • Path: /var/www/owncloud/apps/metrics
  • oauth2:
    • Path: /var/www/owncloud/apps/oauth2
  • openidconnect:
    • Path: /var/www/owncloud/apps/openidconnect
  • password_policy:
    • Path: /var/www/owncloud/apps/password_policy
  • ransomware_protection:
    • Path: /var/www/owncloud/apps/ransomware_protection
  • sharepoint:
    • Path: /var/www/owncloud/apps/sharepoint
  • systemtags_management:
    • Path: /var/www/owncloud/apps/systemtags_management
  • theme-enterprise:
    • Path: /var/www/owncloud/apps/theme-enterprise
  • user_external:
    • Path: /var/www/owncloud/apps/user_external
  • user_ldap:
    • Path: /var/www/owncloud/apps/user_ldap
  • user_shibboleth:
    • Path: /var/www/owncloud/apps/user_shibboleth
  • windows_network_drive:
    • Path: /var/www/owncloud/apps/windows_network_drive
  • wopi:
    • Path: /var/www/owncloud/apps/wopi
  • workflow:
    • Path: /var/www/owncloud/apps/workflow

Hi,

can you post your db table “oc_jobs” in here?

my suspicion is that, because you once tried out federation sharing, this sync job has been written in the oc_jobs table, now you disabled the federation sharing but the job is still in the table without the code available for it because you disabled the fed - sharing. I think you can remove the federation sync job if it’s in the database.

1 Like

There is this stale issue Backgroundjob error messages: SyncJob does not exist · Issue #35589 · owncloud/core · GitHub where for whatever reason not happened nothing in the last two years.

I’m pretty annoyed with this issue as well, since this is happening with almost all instances I’m working with.

The only current workaround is deleting the database entries manually in the oc_jobs table. When looking at the class
OCA\Federation\SyncJob
the keyword OCA is for OwnCloudApllication followed by a backslash and the App name.

So for every OCA\xxxxx where xxxxx is the app name, which you did not enable, you are safe to delete the records, then the error message in owncloud.log disappears.

3 Likes

@cortho and @dmitry Thanks for your replies explaining the issue. I guess it is not an error to worry about, and to delete jobs in the database is to get clean logs.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.