nextcloud / nextcloud/circles

Migration exception

Open
#2,690 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage bug
Dominant language
JavaScript
Stars
177
Forks
68
Avg merge
2d 22h
Merged PRs (30d)
60

Description

Steps to reproduce
  1. Update Nextcloud
  2. Inspect logs
Expected behaviour

No error should be thrown

Actual behaviour

Error is thrown

Server configuration

Web server: Apache

Database: Maria

PHP version: 8.4

Nextcloud version: 34.0.2

{
  "reqId": "###",
  "level": 3,
  "time": "2026-07-29T22:57:09+00:00",
  "remoteAddr": "###",
  "user": ""###",",
  "app": "",
  "method": "POST",
  "url": "/ocs/v2.php/apps/appstore/api/v1/apps/enable",
  "scriptName": "/ocs/v2.php",
  "message": "Exception thrown: OCA\\Circles\\Exceptions\\MigrationException",
  ""###",",
  "version": "34.0.2.1",
  "exception": {
    "Exception": "OCA\\Circles\\Exceptions\\MigrationException",
    "Message": "A migration process is already running",
    "Code": 0,
    "Trace": [
      {
        "file": "/path/to/Nextcloud/apps/circles/lib/Migration/Migration.php",
        "line": 77,
        "function": "migration",
        "class": "OCA\\Circles\\Service\\MigrationService",
        "type": "->"
      },
      {
        "file": "/path/to/Nextcloud/lib/private/Repair.php",
        "line": 104,
        "function": "run",
        "class": "OCA\\Circles\\Migration\\Migration",
        "type": "->"
      },
      {
        "file": "/path/to/Nextcloud/lib/private/App/AppManager.php",
        "line": 1278,
        "function": "run",
        "class": "OC\\Repair",
        "type": "->"
      },
      {
        "file": "/path/to/Nextcloud/lib/private/Installer.php",
        "line": 550,
        "function": "executeRepairSteps",
        "class": "OC\\App\\AppManager",
        "type": "->"
      },
      {
        "file": "/path/to/Nextcloud/lib/private/Installer.php",
        "line": 94,
        "function": "installAppLastSteps",
        "class": "OC\\Installer",
        "type": "->"
      },
      {
        "file": "/path/to/Nextcloud/apps/appstore/lib/Controller/ApiController.php",
        "line": 176,
        "function": "installApp",
        "class": "OC\\Installer",
        "type": "->"
      },
      {
        "file": "/path/to/Nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 165,
        "function": "enableApp",
        "class": "OCA\\Appstore\\Controller\\ApiController",
        "type": "->"
      },
      {
        "file": "/path/to/Nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 78,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/path/to/Nextcloud/lib/private/AppFramework/App.php",
        "line": 137,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/path/to/Nextcloud/lib/private/Route/Router.php",
        "line": 324,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/path/to/Nextcloud/ocs/v1.php",
        "line": 78,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/path/to/Nextcloud/ocs/v2.php",
        "line": 10,
        "args": [
          "/path/to/Nextcloud/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/path/to/Nextcloud/apps/circles/lib/Service/MigrationService.php",
    "Line": 165,
    "message": "",
    "exception": "{\"class\":\"OCA\\Circles\\Exceptions\\MigrationException\",\"message\":\"A migration process is already running\",\"code\":0,\"file\":\"/path/to/Nextcloud/apps/circles/lib/Service/MigrationService.php:165\",\"trace\":\"#0 /path/to/Nextcloud/apps/circles/lib/Migration/Migration.php(77): OCA\\Circles\\Service\\MigrationService->migration()\\n#1 /path/to/Nextcloud/lib/private/Repair.php(104): OCA\\Circles\\Migration\\Migration->run()\\n#2 /path/to/Nextcloud/lib/private/App/AppManager.php(1278): OC\\Repair->run()\\n#3 /path/to/Nextcloud/lib/private/Installer.php(550): OC\\App\\AppManager->executeRepairSteps()\\n#4 /path/to/Nextcloud/lib/private/Installer.php(94): OC\\Installer->installAppLastSteps()\\n#5 /path/to/Nextcloud/apps/appstore/lib/Controller/ApiController.php(176): OC\\Installer->installApp()\\n#6 /path/to/Nextcloud/lib/private/AppFramework/Http/Dispatcher.php(165): OCA\\Appstore\\Controller\\ApiController->enableApp()\\n#7 /path/to/Nextcloud/lib/private/AppFramework/Http/Dispatcher.php(78): OC\\AppFramework\\Http\\Dispatcher->executeController()\\n#8 /path/to/Nextcloud/lib/private/AppFramework/App.php(137): OC\\AppFramework\\Http\\Dispatcher->dispatch()\\n#9 /path/to/Nextcloud/lib/private/Route/Router.php(324): OC\\AppFramework\\App::main()\\n#10 /path/to/Nextcloud/ocs/v1.php(78): OC\\Route\\Router->match()\\n#11 /path/to/Nextcloud/ocs/v2.php(10): require_once('...')\\n#12 {main}\"}",
    "CustomMessage": "Exception thrown: OCA\\Circles\\Exceptions\\MigrationException"
  },
  "id": ""###","
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with apps/circles/lib/Service/MigrationService.php at line 165 and apps/circles/lib/Migration/Migration.php at line 77, following the migration path shown in the trace. Reproduce the issue by updating Nextcloud and enabling the Circles app, then inspect the logs. Done means the migration no longer throws the reported exception during app enablement.

Written by the indexing model from the issue text.

Assessment

Tech stack
apache, mariadb, php
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.