[BUG] Problems deploying with docker-compose
See original GitHub issueDescribe the bug I’m trying to deploy the platform but the table sentence is empty. When i want to record something the web shows the following message:
I don’t know exactly what happens but one of the logs that i can see when i run docker-compose up is :
APPLICATION -- Maintenance error OperationalError: ER_BAD_FIELD_ERROR: Unknown column 'undefined' in 'field list' web | [BE] at Query.Sequence._packetToError (/code/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14) web | [BE] at Query.ErrorPacket (/code/node_modules/mysql/lib/protocol/sequences/Query.js:79:18) web | [BE] at Protocol._parsePacket (/code/node_modules/mysql/lib/protocol/Protocol.js:291:23) web | [BE] at Parser._parsePacket (/code/node_modules/mysql/lib/protocol/Parser.js:433:10) web | [BE] at Parser.write (/code/node_modules/mysql/lib/protocol/Parser.js:43:10) web | [BE] at Protocol.write (/code/node_modules/mysql/lib/protocol/Protocol.js:38:16) web | [BE] at Socket.<anonymous> (/code/node_modules/mysql/lib/Connection.js:88:28) web | [BE] at Socket.<anonymous> (/code/node_modules/mysql/lib/Connection.js:526:10) web | [BE] at Socket.emit (events.js:314:20) web | [BE] at Socket.EventEmitter.emit (domain.js:483:12) web | [BE] at addChunk (_stream_readable.js:297:12) web | [BE] at readableAddChunk (_stream_readable.js:272:9) web | [BE] at Socket.Readable.push (_stream_readable.js:213:10) web | [BE] at TCP.onStreamRead (internal/stream_base_commons.js:188:23) web | [BE] -------------------- web | [BE] at Protocol._enqueue (/code/node_modules/mysql/lib/protocol/Protocol.js:144:48) web | [BE] at Connection.query (/code/node_modules/mysql/lib/Connection.js:198:25) web | [BE] at /code/node_modules/db-migrate-mysql/index.js:371:29 web | [BE] at Promise._execute (/code/node_modules/bluebird/js/release/debuggability.js:384:9) web | [BE] at Promise._resolveFromExecutor (/code/node_modules/bluebird/js/release/promise.js:518:18) web | [BE] at new Promise (/code/node_modules/bluebird/js/release/promise.js:103:10) web | [BE] at Object.runSql (/code/node_modules/db-migrate-mysql/index.js:366:12) web | [BE] at Class.exports.up (/code/server/src/lib/model/db/migrations/20220222145730-import-variant-data.ts:113:14) { web | [BE] cause: Error: ER_BAD_FIELD_ERROR: Unknown column 'undefined' in 'field list' web | [BE] at Query.Sequence._packetToError (/code/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14) web | [BE] at Query.ErrorPacket (/code/node_modules/mysql/lib/protocol/sequences/Query.js:79:18) web | [BE] at Protocol._parsePacket (/code/node_modules/mysql/lib/protocol/Protocol.js:291:23) web | [BE] at Parser._parsePacket (/code/node_modules/mysql/lib/protocol/Parser.js:433:10) web | [BE] at Parser.write (/code/node_modules/mysql/lib/protocol/Parser.js:43:10) web | [BE] at Protocol.write (/code/node_modules/mysql/lib/protocol/Protocol.js:38:16) web | [BE] at Socket.<anonymous> (/code/node_modules/mysql/lib/Connection.js:88:28) web | [BE] at Socket.<anonymous> (/code/node_modules/mysql/lib/Connection.js:526:10) web | [BE] at Socket.emit (events.js:314:20) web | [BE] at Socket.EventEmitter.emit (domain.js:483:12) web | [BE] at addChunk (_stream_readable.js:297:12) web | [BE] at readableAddChunk (_stream_readable.js:272:9) web | [BE] at Socket.Readable.push (_stream_readable.js:213:10) web | [BE] at TCP.onStreamRead (internal/stream_base_commons.js:188:23) web | [BE] -------------------- web | [BE] at Protocol._enqueue (/code/node_modules/mysql/lib/protocol/Protocol.js:144:48) web | [BE] at Connection.query (/code/node_modules/mysql/lib/Connection.js:198:25) web | [BE] at /code/node_modules/db-migrate-mysql/index.js:371:29 web | [BE] at Promise._execute (/code/node_modules/bluebird/js/release/debuggability.js:384:9) web | [BE] at Promise._resolveFromExecutor (/code/node_modules/bluebird/js/release/promise.js:518:18) web | [BE] at new Promise (/code/node_modules/bluebird/js/release/promise.js:103:10) web | [BE] at Object.runSql (/code/node_modules/db-migrate-mysql/index.js:366:12) web | [BE] at Class.exports.up (/code/server/src/lib/model/db/migrations/20220222145730-import-variant-data.ts:113:14) { web | [BE] code: 'ER_BAD_FIELD_ERROR', web | [BE] errno: 1054, web | [BE] sqlMessage: "Unknown column 'undefined' in 'field list'", web | [BE] sqlState: '42S22', web | [BE] index: 0, web | [BE] sql: 'INSERT INTO variants (locale_id, variant_token, variant_name) VALUES ( undefined,"cy-northwes","North-Western Welsh")' web | [BE] }, web | [BE] isOperational: true, web | [BE] code: 'ER_BAD_FIELD_ERROR', web | [BE] errno: 1054, web | [BE] sqlMessage: "Unknown column 'undefined' in 'field list'", web | [BE] sqlState: '42S22', web | [BE] index: 0, web | [BE] sql: 'INSERT INTO variants (locale_id, variant_token, variant_name) VALUES ( undefined,"cy-northwes","North-Western Welsh")'
This is my .env-local-docker
CV_DB_ROOT_PASS="voicewebroot" CV_MYSQLHOST="db" CV_S3_CONFIG='{"endpoint": "http://s3proxy:80", "accessKeyId": "local-identity", "secretAccessKey": "local-credential", "s3ForcePathStyle": true}' CV_IMPORT_SENTENCES="true"
I’ve used the docker compose file of the repo.
To Reproduce docker-compose up
Desktop or Mobile (please complete the following information):
- OS: Mac Pro 2,4 GHz Intel Core i9 8 cores
- Browser: chrome
- Version: latest
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (1 by maintainers)
Top GitHub Comments
This is because You still have the .js file that generates the error. You have to go to /server/js/lib/model/db/migrations folder an delete 20220222145730-import-variant-data.js and 20220222145730-import-variant-data.js.map
I have seen that in the migration the column pointing to the locale table is null.
The typescript is in server/src/lib/model/db/migrations . And its name is 20220222145730-import-variant-data.ts
This typescript creates a js with the same name that produces the error. I just deleted the typescript file because I saw that it didn’t contain any relevant things and everything worked correctly.