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

Setup Checker failed due to Doctrine\DBAL\Exception\SyntaxErrorException syntax to use near '"version"' at line 1 #29774

Closed
Zenuncl opened this issue Nov 18, 2021 · 2 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@Zenuncl
Copy link

Zenuncl commented Nov 18, 2021

Steps to reproduce

  1. Nextcloud Docker latest
  2. DigitalOcean MySQL database
  3. Run Setup Checker

Expected behaviour

Everything else looks fine, I was expect the setup checker pass but it's not.

Even if it's a cloud mysql server which may not provide version information, it should not fail the setup check.

Actual behaviour

Logs show that:

Doctrine\DBAL\Exception\SyntaxErrorException: An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"version"' at line 1

Server configuration

Operating system: Debian 10 + Docker 20.10.8 build 3967b7d

Database: DigitalOcean MySQL database - MySQL 8 with disable the GLOBAL SQL_REQUIRE_PRIMARY_KEY

Nextcloud version: 22.2.3 (Official Docker Nextcloud: latest)

Updated from an older Nextcloud/ownCloud or fresh install: Updated from 22.1

Signing status:

Signing status
No errors have been found.

Client configuration

Browser: Chromium: 94

Logs

Nextcloud log (data/nextcloud.log)

Nextcloud log
{
  "reqId": "GL8ARN17xJAuoRfQcCva",
  "level": 3,
  "time": "2021-11-18T22:17:27+00:00",
  "remoteAddr": "172.17.0.3",
  "user": "AdminUsers",
  "app": "index",
  "method": "GET",
  "url": "/settings/ajax/checksetup",
  "message": "An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\"version\"' at line 1",
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36",
  "version": "22.2.3.0",
  "exception": {
    "Exception": "Doctrine\\DBAL\\Exception\\SyntaxErrorException",
    "Message": "An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\"version\"' at line 1",
    "Code": 1064,
    "Trace": [{
      "file": "/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",
      "line": 1780,
      "function": "convert",
      "class": "Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter",
      "type": "->",
      "args": [{
        "__class__": "Doctrine\\DBAL\\Driver\\PDO\\Exception"
      }, {
        "__class__": "Doctrine\\DBAL\\Query"
      }]
    }, {
      "file": "/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",
      "line": 1719,
      "function": "handleDriverException",
      "class": "Doctrine\\DBAL\\Connection",
      "type": "->",
      "args": [{
        "__class__": "Doctrine\\DBAL\\Driver\\PDO\\Exception"
      }, {
        "__class__": "Doctrine\\DBAL\\Query"
      }]
    }, {
      "file": "/var/www/html/3rdparty/doctrine/dbal/src/Statement.php",
      "line": 193,
      "function": "convertExceptionDuringQuery",
      "class": "Doctrine\\DBAL\\Connection",
      "type": "->",
      "args": [{
          "__class__": "Doctrine\\DBAL\\Driver\\PDO\\Exception"
        }, "SHOW VARIABLES LIKE \"version\";", [],
        []
      ]
    }, {
      "file": "/var/www/html/lib/private/DB/PreparedStatement.php",
      "line": 87,
      "function": "execute",
      "class": "Doctrine\\DBAL\\Statement",
      "type": "->",
      "args": [null]
    }, {
      "file": "/var/www/html/apps/settings/lib/SetupChecks/SupportedDatabase.php",
      "line": 67,
      "function": "execute",
      "class": "OC\\DB\\PreparedStatement",
      "type": "->",
      "args": []
    }, {
      "file": "/var/www/html/apps/settings/lib/SetupChecks/SupportedDatabase.php",
      "line": 110,
      "function": "check",
      "class": "OCA\\Settings\\SetupChecks\\SupportedDatabase",
      "type": "->",
      "args": []
    }, {
      "file": "/var/www/html/apps/settings/lib/Controller/CheckSetupController.php",
      "line": 781,
      "function": "run",
      "class": "OCA\\Settings\\SetupChecks\\SupportedDatabase",
      "type": "->",
      "args": []
    }, {
      "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
      "line": 217,
      "function": "check",
      "class": "OCA\\Settings\\Controller\\CheckSetupController",
      "type": "->",
      "args": []
    }, {
      "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
      "line": 126,
      "function": "executeController",
      "class": "OC\\AppFramework\\Http\\Dispatcher",
      "type": "->",
      "args": [{
        "__class__": "OCA\\Settings\\Controller\\CheckSetupController"
      }, "check"]
    }, {
      "file": "/var/www/html/lib/private/AppFramework/App.php",
      "line": 156,
      "function": "dispatch",
      "class": "OC\\AppFramework\\Http\\Dispatcher",
      "type": "->",
      "args": [{
        "__class__": "OCA\\Settings\\Controller\\CheckSetupController"
      }, "check"]
    }, {
      "file": "/var/www/html/lib/private/Route/Router.php",
      "line": 302,
      "function": "main",
      "class": "OC\\AppFramework\\App",
      "type": "::",
      "args": ["OCA\\Settings\\Controller\\CheckSetupController", "check", {
        "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
      }, {
        "_route": "settings.CheckSetup.check"
      }]
    }, {
      "file": "/var/www/html/lib/base.php",
      "line": 1006,
      "function": "match",
      "class": "OC\\Route\\Router",
      "type": "->",
      "args": ["/settings/ajax/checksetup"]
    }, {
      "file": "/var/www/html/index.php",
      "line": 36,
      "function": "handleRequest",
      "class": "OC",
      "type": "::",
      "args": []
    }],
    "File": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php",
    "Line": 84,
    "Previous": {
      "Exception": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
      "Message": "SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\"version\"' at line 1",
      "Code": 1064,
      "Trace": [{
        "file": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
        "line": 94,
        "function": "new",
        "class": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
        "type": "::",
        "args": [{
          "errorInfo": ["42000", 1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\"version\"' at line 1"],
          "__class__": "PDOException"
        }]
      }, {
        "file": "/var/www/html/3rdparty/doctrine/dbal/src/Statement.php",
        "line": 189,
        "function": "execute",
        "class": "Doctrine\\DBAL\\Driver\\PDO\\Statement",
        "type": "->",
        "args": [null]
      }, {
        "file": "/var/www/html/lib/private/DB/PreparedStatement.php",
        "line": 87,
        "function": "execute",
        "class": "Doctrine\\DBAL\\Statement",
        "type": "->",
        "args": [null]
      }, {
        "file": "/var/www/html/apps/settings/lib/SetupChecks/SupportedDatabase.php",
        "line": 67,
        "function": "execute",
        "class": "OC\\DB\\PreparedStatement",
        "type": "->",
        "args": []
      }, {
        "file": "/var/www/html/apps/settings/lib/SetupChecks/SupportedDatabase.php",
        "line": 110,
        "function": "check",
        "class": "OCA\\Settings\\SetupChecks\\SupportedDatabase",
        "type": "->",
        "args": []
      }, {
        "file": "/var/www/html/apps/settings/lib/Controller/CheckSetupController.php",
        "line": 781,
        "function": "run",
        "class": "OCA\\Settings\\SetupChecks\\SupportedDatabase",
        "type": "->",
        "args": []
      }, {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 217,
        "function": "check",
        "class": "OCA\\Settings\\Controller\\CheckSetupController",
        "type": "->",
        "args": []
      }, {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 126,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [{
          "__class__": "OCA\\Settings\\Controller\\CheckSetupController"
        }, "check"]
      }, {
        "file": "/var/www/html/lib/private/AppFramework/App.php",
        "line": 156,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [{
          "__class__": "OCA\\Settings\\Controller\\CheckSetupController"
        }, "check"]
      }, {
        "file": "/var/www/html/lib/private/Route/Router.php",
        "line": 302,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": ["OCA\\Settings\\Controller\\CheckSetupController", "check", {
          "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
        }, {
          "_route": "settings.CheckSetup.check"
        }]
      }, {
        "file": "/var/www/html/lib/base.php",
        "line": 1006,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": ["/settings/ajax/checksetup"]
      }, {
        "file": "/var/www/html/index.php",
        "line": 36,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }],
      "File": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php",
      "Line": 26,
      "Previous": {
        "Exception": "PDOException",
        "Message": "SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\"version\"' at line 1",
        "Code": "42000",
        "Trace": [{
          "file": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
          "line": 92,
          "function": "execute",
          "class": "PDOStatement",
          "type": "->",
          "args": [null]
        }, {
          "file": "/var/www/html/3rdparty/doctrine/dbal/src/Statement.php",
          "line": 189,
          "function": "execute",
          "class": "Doctrine\\DBAL\\Driver\\PDO\\Statement",
          "type": "->",
          "args": [null]
        }, {
          "file": "/var/www/html/lib/private/DB/PreparedStatement.php",
          "line": 87,
          "function": "execute",
          "class": "Doctrine\\DBAL\\Statement",
          "type": "->",
          "args": [null]
        }, {
          "file": "/var/www/html/apps/settings/lib/SetupChecks/SupportedDatabase.php",
          "line": 67,
          "function": "execute",
          "class": "OC\\DB\\PreparedStatement",
          "type": "->",
          "args": []
        }, {
          "file": "/var/www/html/apps/settings/lib/SetupChecks/SupportedDatabase.php",
          "line": 110,
          "function": "check",
          "class": "OCA\\Settings\\SetupChecks\\SupportedDatabase",
          "type": "->",
          "args": []
        }, {
          "file": "/var/www/html/apps/settings/lib/Controller/CheckSetupController.php",
          "line": 781,
          "function": "run",
          "class": "OCA\\Settings\\SetupChecks\\SupportedDatabase",
          "type": "->",
          "args": []
        }, {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 217,
          "function": "check",
          "class": "OCA\\Settings\\Controller\\CheckSetupController",
          "type": "->",
          "args": []
        }, {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 126,
          "function": "executeController",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [{
            "__class__": "OCA\\Settings\\Controller\\CheckSetupController"
          }, "check"]
        }, {
          "file": "/var/www/html/lib/private/AppFramework/App.php",
          "line": 156,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [{
            "__class__": "OCA\\Settings\\Controller\\CheckSetupController"
          }, "check"]
        }, {
          "file": "/var/www/html/lib/private/Route/Router.php",
          "line": 302,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::",
          "args": ["OCA\\Settings\\Controller\\CheckSetupController", "check", {
            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
          }, {
            "_route": "settings.CheckSetup.check"
          }]
        }, {
          "file": "/var/www/html/lib/base.php",
          "line": 1006,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->",
          "args": ["/settings/ajax/checksetup"]
        }, {
          "file": "/var/www/html/index.php",
          "line": 36,
          "function": "handleRequest",
          "class": "OC",
          "type": "::",
          "args": []
        }],
        "File": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
        "Line": 92
      }
    },
    "CustomMessage": "--"
  }
}
@Zenuncl Zenuncl added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Nov 18, 2021
@Zenuncl
Copy link
Author

Zenuncl commented Nov 18, 2021

I actually find this old issue #26526 which looks like similar problem.
It's been merged 24 days ago, so not included in the latest docker image (Looks like will be available in v23.x

@solracsf
Copy link
Member

Yes, it is a duplicate of #26526

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

2 participants