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

Crash loop: Mysql2 query methods fail with encoding error #412

Closed
danielbeardsley opened this issue Aug 30, 2024 · 2 comments
Closed

Crash loop: Mysql2 query methods fail with encoding error #412

danielbeardsley opened this issue Aug 30, 2024 · 2 comments

Comments

@danielbeardsley
Copy link
Member

Ever since #411 the service won't stay alive and crash-loops with errors like this:

Fatal Error: Encoding not recognized: 'undefined' (searched as: 'undefined')
    at Object.getCodec (/opt/pulldasher/node_modules/mysql2/node_modules/iconv-lite/lib/index.js:104:23)
    at Object.getEncoder (/opt/pulldasher/node_modules/mysql2/node_modules/iconv-lite/lib/index.js:115:23)
    at Object.exports.encode (/opt/pulldasher/node_modules/mysql2/lib/parsers/string.js:44:25)
    at Query.toPacket (/opt/pulldasher/node_modules/mysql2/lib/packets/query.js:16:30)
    at Query.start (/opt/pulldasher/node_modules/mysql2/lib/commands/query.js:60:38)
    at Query.execute (/opt/pulldasher/node_modules/mysql2/lib/commands/command.js:45:22)
    at PoolConnection.handlePacket (/opt/pulldasher/node_modules/mysql2/lib/connection.js:481:34)
    at PoolConnection.addCommand (/opt/pulldasher/node_modules/mysql2/lib/connection.js:507:12)
    at PoolConnection.query (/opt/pulldasher/node_modules/mysql2/lib/connection.js:575:17)
    at /opt/pulldasher/node_modules/mysql2/lib/pool.js:154:14
    at /opt/pulldasher/node_modules/mysql2/lib/pool.js:49:37
    at processTicksAndRejections (node:internal/process/task_queues:78:11)
2024-08-30T23:23:42.893Z pulldasher:bin 
@danielbeardsley
Copy link
Member Author

I've tried reading the source, I've tried all manner of values in the chartset config option and the charsetNumber config option. I've edited the code to use the promise interface that comes with mysql2 (instead of promisify).

I'm nearly out of ideas...

@danielbeardsley
Copy link
Member Author

This was fixed with #413

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant