"Unknown Error" when attempting to log into admin

I kept getting Unknown error when I tried to log into https://www.pixelpeeper.me/ghost/.

The installation was done on DigitalOcean using the standard marketplace instructions.

I’ve managed to pull the log, appended below. It looks like

“Unable to determine the authenticated user or integration. Check that cookies are being passed through if using session authentication"

Any troubleshooting starting points appreciated!

— Start of Log —

- Inspecting operating system
+ sudo systemctl is-active ghost_www-pixelpeeper-me    [2020-10-18 03:47:53] INFO "GET /assets/css/dist/main.min.css?v=a95d2d7fd6" 200 18ms
[2020-10-18 03:47:53] INFO "GET /assets/js/dist/all.min.js?v=a95d2d7fd6" 200 15ms
[2020-10-18 03:47:53] INFO "GET /content/images/size/w1440/2020/09/20200910_DTKM_DSCF0372-3.jpg" 200 22ms
[2020-10-18 03:47:54] INFO "GET /content/images/size/w584/2020/09/20200910_DTKM_DSCF0372-3.jpg" 200 2ms
[2020-10-18 03:47:54] INFO "GET /favicon.ico" 200 1ms
[2020-10-18 03:47:57] INFO "GET /ghost/" 200 4ms
[2020-10-18 03:47:58] ERROR "GET /ghost/api/v3/admin/users/me/?include=roles" 403 11ms

NAME: NoPermissionError
MESSAGE: Authorization failed

level: normal

"Unable to determine the authenticated user or integration. Check that cookies are being passed through if using session authentication."
NoPermissionError: Authorization failed
    at new NoPermissionError (/var/www/ghost/versions/3.32.2/node_modules/ghost-ignition/lib/errors/index.js:134:23)
    at authorizeAdminApi (/var/www/ghost/versions/3.32.2/core/server/services/auth/authorize.js:28:25)
    at Layer.handle [as handle_request] (/var/www/ghost/versions/3.32.2/node_modules/express/lib/router/layer.js:95:5)
    at next (/var/www/ghost/versions/3.32.2/node_modules/express/lib/router/route.js:137:13)
    at authenticate (/var/www/ghost/versions/3.32.2/core/server/services/auth/session/middleware.js:24:13)

[2020-10-18 03:47:58] INFO "GET /ghost/api/v3/admin/site/" 200 1ms
[2020-10-18 03:47:58] INFO "GET /ghost/" 200 7ms
[2020-10-18 03:47:58] ERROR "GET /ghost/api/v3/admin/users/me/?include=roles" 403 9ms

NAME: NoPermissionError
MESSAGE: Authorization failed

level: normal

"Unable to determine the authenticated user or integration. Check that cookies are being passed through if using session authentication."
NoPermissionError: Authorization failed
    at new NoPermissionError (/var/www/ghost/versions/3.32.2/node_modules/ghost-ignition/lib/errors/index.js:134:23)
    at authorizeAdminApi (/var/www/ghost/versions/3.32.2/core/server/services/auth/authorize.js:28:25)
    at Layer.handle [as handle_request] (/var/www/ghost/versions/3.32.2/node_modules/express/lib/router/layer.js:95:5)
    at next (/var/www/ghost/versions/3.32.2/node_modules/express/lib/router/route.js:137:13)
    at authenticate (/var/www/ghost/versions/3.32.2/core/server/services/auth/session/middleware.js:24:13)

[2020-10-18 03:47:59] INFO "GET /ghost/api/v3/admin/site/" 200 1ms
[2020-10-18 03:47:59] INFO "GET /ghost/api/v3/admin/authentication/setup/" 200 7ms
[2020-10-18 03:48:02] ERROR "POST /ghost/api/v3/admin/session" 500 24ms

NAME: InternalServerError
CODE: ER_BAD_FIELD_ERROR
MESSAGE: Unknown error

level: critical

InternalServerError: Unknown error
    at new InternalServerError (/var/www/ghost/versions/3.32.2/node_modules/ghost-ignition/lib/errors/index.js:90:23)
    at Object.handleStoreError (/var/www/ghost/versions/3.32.2/core/server/web/shared/middlewares/api/spam-prevention.js:29:25)
    at module.exports.<anonymous> (/var/www/ghost/versions/3.32.2/node_modules/express-brute/index.js:133:21)
    at tryCatcher (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/util.js:16:23)
    at Promise.errorAdapter (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/nodeify.js:35:34)
    at Promise._settlePromise (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:601:21)
    at Promise._settlePromise0 (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:725:18)
    at _drainQueueStep (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:456:21)
    at process.topLevelDomainCallback (domain.js:137:15)

Error: ER_BAD_FIELD_ERROR: Unknown column 'NaN' in 'field list'
    at Query.Sequence._packetToError (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)
    at Query.ErrorPacket (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/sequences/Query.js:79:18)
    at Protocol._parsePacket (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/Protocol.js:291:23)
    at Parser._parsePacket (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/Parser.js:433:10)
    at Parser.write (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/Parser.js:43:10)
    at Protocol.write (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/Protocol.js:38:16)
    at Socket.<anonymous> (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/Connection.js:88:28)
    at Socket.<anonymous> (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/Connection.js:526:10)
    at Socket.emit (events.js:315:20)
    at Socket.EventEmitter.emit (domain.js:482:12)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:271:9)
    at Socket.Readable.push (_stream_readable.js:212:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
    --------------------
    at Protocol._enqueue (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/Protocol.js:144:48)
    at Connection.query (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/Connection.js:198:25)
    at /var/www/ghost/versions/3.32.2/node_modules/knex/lib/dialects/mysql/index.js:135:18
    at Promise._execute (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/debuggability.js:384:9)
    at Promise._resolveFromExecutor (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:518:18)
    at new Promise (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:103:10)
    at Client_MySQL._query (/var/www/ghost/versions/3.32.2/node_modules/knex/lib/dialects/mysql/index.js:129:12)
    at Client_MySQL.query (/var/www/ghost/versions/3.32.2/node_modules/knex/lib/client.js:169:17)
    at /var/www/ghost/versions/3.32.2/node_modules/knex/lib/transaction.js:321:24
    at Promise._execute (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/debuggability.js:384:9)
    at Promise._resolveFromExecutor (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:518:18)
    at new Promise (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:103:10)
    at Client_MySQL.trxClient.query (/var/www/ghost/versions/3.32.2/node_modules/knex/lib/transaction.js:316:12)
    at Runner.query (/var/www/ghost/versions/3.32.2/node_modules/knex/lib/runner.js:151:36)
    at /var/www/ghost/versions/3.32.2/node_modules/knex/lib/runner.js:40:23
    at /var/www/ghost/versions/3.32.2/node_modules/knex/lib/runner.js:277:24

[2020-10-18 03:48:13] ERROR "POST /ghost/api/v3/admin/session" 500 10ms

NAME: InternalServerError
CODE: ER_BAD_FIELD_ERROR
MESSAGE: Unknown error

level: critical

InternalServerError: Unknown error
    at new InternalServerError (/var/www/ghost/versions/3.32.2/node_modules/ghost-ignition/lib/errors/index.js:90:23)
    at Object.handleStoreError (/var/www/ghost/versions/3.32.2/core/server/web/shared/middlewares/api/spam-prevention.js:29:25)
    at module.exports.<anonymous> (/var/www/ghost/versions/3.32.2/node_modules/express-brute/index.js:133:21)
    at tryCatcher (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/util.js:16:23)
    at Promise.errorAdapter (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/nodeify.js:35:34)
    at Promise._settlePromise (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:601:21)
    at Promise._settlePromise0 (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:725:18)
    at _drainQueueStep (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:456:21)
    at process.topLevelDomainCallback (domain.js:137:15)

Error: ER_BAD_FIELD_ERROR: Unknown column 'NaN' in 'field list'
    at Query.Sequence._packetToError (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)
    at Query.ErrorPacket (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/sequences/Query.js:79:18)
    at Protocol._parsePacket (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/Protocol.js:291:23)
    at Parser._parsePacket (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/Parser.js:433:10)
    at Parser.write (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/Parser.js:43:10)
    at Protocol.write (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/Protocol.js:38:16)
    at Socket.<anonymous> (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/Connection.js:88:28)
    at Socket.<anonymous> (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/Connection.js:526:10)
    at Socket.emit (events.js:315:20)
    at Socket.EventEmitter.emit (domain.js:482:12)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:271:9)
    at Socket.Readable.push (_stream_readable.js:212:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
    --------------------
    at Protocol._enqueue (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/Protocol.js:144:48)
    at Connection.query (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/Connection.js:198:25)
    at /var/www/ghost/versions/3.32.2/node_modules/knex/lib/dialects/mysql/index.js:135:18
    at Promise._execute (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/debuggability.js:384:9)
    at Promise._resolveFromExecutor (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:518:18)
    at new Promise (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:103:10)
    at Client_MySQL._query (/var/www/ghost/versions/3.32.2/node_modules/knex/lib/dialects/mysql/index.js:129:12)
    at Client_MySQL.query (/var/www/ghost/versions/3.32.2/node_modules/knex/lib/client.js:169:17)
    at /var/www/ghost/versions/3.32.2/node_modules/knex/lib/transaction.js:321:24
    at Promise._execute (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/debuggability.js:384:9)
    at Promise._resolveFromExecutor (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:518:18)
    at new Promise (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:103:10)
    at Client_MySQL.trxClient.query (/var/www/ghost/versions/3.32.2/node_modules/knex/lib/transaction.js:316:12)
    at Runner.query (/var/www/ghost/versions/3.32.2/node_modules/knex/lib/runner.js:151:36)
    at /var/www/ghost/versions/3.32.2/node_modules/knex/lib/runner.js:40:23
    at /var/www/ghost/versions/3.32.2/node_modules/knex/lib/runner.js:277:24

[2020-10-18 03:52:59] INFO "GET /" 301 1ms
[2020-10-18 03:56:45] INFO "GET /ghost/" 200 3ms
[2020-10-18 03:56:46] ERROR "GET /ghost/api/v3/admin/users/me/?include=roles" 403 3ms

NAME: NoPermissionError
MESSAGE: Authorization failed

level: normal

"Unable to determine the authenticated user or integration. Check that cookies are being passed through if using session authentication."
NoPermissionError: Authorization failed
    at new NoPermissionError (/var/www/ghost/versions/3.32.2/node_modules/ghost-ignition/lib/errors/index.js:134:23)
    at authorizeAdminApi (/var/www/ghost/versions/3.32.2/core/server/services/auth/authorize.js:28:25)
    at Layer.handle [as handle_request] (/var/www/ghost/versions/3.32.2/node_modules/express/lib/router/layer.js:95:5)
    at next (/var/www/ghost/versions/3.32.2/node_modules/express/lib/router/route.js:137:13)
    at authenticate (/var/www/ghost/versions/3.32.2/core/server/services/auth/session/middleware.js:24:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

[2020-10-18 03:56:46] INFO "GET /ghost/api/v3/admin/site/" 200 1ms
[2020-10-18 03:56:46] INFO "GET /ghost/api/v3/admin/authentication/setup/" 200 9ms
[2020-10-18 03:56:51] ERROR "POST /ghost/api/v3/admin/session" 500 10ms

NAME: InternalServerError
CODE: ER_BAD_FIELD_ERROR
MESSAGE: Unknown error

level: critical

InternalServerError: Unknown error
    at new InternalServerError (/var/www/ghost/versions/3.32.2/node_modules/ghost-ignition/lib/errors/index.js:90:23)
    at Object.handleStoreError (/var/www/ghost/versions/3.32.2/core/server/web/shared/middlewares/api/spam-prevention.js:29:25)
    at module.exports.<anonymous> (/var/www/ghost/versions/3.32.2/node_modules/express-brute/index.js:133:21)
    at tryCatcher (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/util.js:16:23)
    at Promise.errorAdapter (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/nodeify.js:35:34)
    at Promise._settlePromise (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:601:21)
    at Promise._settlePromise0 (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:725:18)
    at _drainQueueStep (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:456:21)
    at process.topLevelDomainCallback (domain.js:137:15)

Error: ER_BAD_FIELD_ERROR: Unknown column 'NaN' in 'field list'
    at Query.Sequence._packetToError (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)
    at Query.ErrorPacket (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/sequences/Query.js:79:18)
    at Protocol._parsePacket (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/Protocol.js:291:23)
    at Parser._parsePacket (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/Parser.js:433:10)
    at Parser.write (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/Parser.js:43:10)
    at Protocol.write (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/Protocol.js:38:16)
    at Socket.<anonymous> (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/Connection.js:88:28)
    at Socket.<anonymous> (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/Connection.js:526:10)
    at Socket.emit (events.js:315:20)
    at Socket.EventEmitter.emit (domain.js:482:12)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:271:9)
    at Socket.Readable.push (_stream_readable.js:212:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
    --------------------
    at Protocol._enqueue (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/protocol/Protocol.js:144:48)
    at Connection.query (/var/www/ghost/versions/3.32.2/node_modules/mysql/lib/Connection.js:198:25)
    at /var/www/ghost/versions/3.32.2/node_modules/knex/lib/dialects/mysql/index.js:135:18
    at Promise._execute (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/debuggability.js:384:9)
    at Promise._resolveFromExecutor (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:518:18)
    at new Promise (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:103:10)
    at Client_MySQL._query (/var/www/ghost/versions/3.32.2/node_modules/knex/lib/dialects/mysql/index.js:129:12)
    at Client_MySQL.query (/var/www/ghost/versions/3.32.2/node_modules/knex/lib/client.js:169:17)
    at /var/www/ghost/versions/3.32.2/node_modules/knex/lib/transaction.js:321:24
    at Promise._execute (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/debuggability.js:384:9)
    at Promise._resolveFromExecutor (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:518:18)
    at new Promise (/var/www/ghost/versions/3.32.2/node_modules/bluebird/js/release/promise.js:103:10)
    at Client_MySQL.trxClient.query (/var/www/ghost/versions/3.32.2/node_modules/knex/lib/transaction.js:316:12)
    at Runner.query (/var/www/ghost/versions/3.32.2/node_modules/knex/lib/runner.js:151:36)
    at /var/www/ghost/versions/3.32.2/node_modules/knex/lib/runner.js:40:23
    at /var/www/ghost/versions/3.32.2/node_modules/knex/lib/runner.js:277:24

— End of Log —