Skip to content

TypeError [ERR_UNKNOWN_ENCODING]: Unknown encoding: utf8mb3 #45

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

Open
Athu135 opened this issue Oct 10, 2022 · 6 comments
Open

TypeError [ERR_UNKNOWN_ENCODING]: Unknown encoding: utf8mb3 #45

Athu135 opened this issue Oct 10, 2022 · 6 comments

Comments

@Athu135
Copy link

Athu135 commented Oct 10, 2022

TypeError [ERR_UNKNOWN_ENCODING]: Unknown encoding: utf8mb3
at stringSlice (buffer.js:630:9)
at Uint8Array.toString (buffer.js:666:10)
at Parser.parseString (/var/www/api/kameazy/realtime/node_modules/mysql/lib/protocol/Parser.js:281:28)
at Object.exports.readMysqlValue (/var/www/api/kameazy/realtime/node_modules/@rodrigogs/zongji/lib/common.js:446:25)
at readRow (/var/www/api/kameazy/realtime/node_modules/@rodrigogs/zongji/lib/rows_event.js:111:16)
at UpdateRows._fetchOneRow (/var/www/api/kameazy/realtime/node_modules/@rodrigogs/zongji/lib/rows_event.js:143:13)
at UpdateRows.RowsEvent (/var/www/api/kameazy/realtime/node_modules/@rodrigogs/zongji/lib/rows_event.js:62:27)
at new UpdateRows (/var/www/api/kameazy/realtime/node_modules/@rodrigogs/zongji/lib/rows_event.js:135:13)
at BinlogHeader.parse (/var/www/api/kameazy/realtime/node_modules/@rodrigogs/zongji/lib/packet/binlog_header.js:47:23)
at Protocol._parsePacket (/var/www/api/kameazy/realtime/node_modules/mysql/lib/protocol/Protocol.js:272:12)
{ Error: Packets out of order. Got: 178 Expected: 7
at Parser._tryReadPacketHeader (/var/www/api/kameazy/realtime/node_modules/mysql/lib/protocol/Parser.js:470:15)
at Parser.write (/var/www/api/kameazy/realtime/node_modules/mysql/lib/protocol/Parser.js:33:29)
at process._tickCallback (internal/process/next_tick.js:61:11)
--------------------
at Protocol._enqueue (/var/www/api/kameazy/realtime/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Immediate._start (/var/www/api/kameazy/realtime/node_modules/@rodrigogs/zongji/index.js:240:31)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5) code: 'PROTOCOL_PACKETS_OUT_OF_ORDER', fatal: true }

@sfabara
Copy link

sfabara commented Oct 31, 2022

I am getting the same problem after we updated our MySQL server from version 7 to version 8.0.29. Both packets out of order error and the unknown encoding: utf8mb3. Not sure what direction to take with solving this.

@sfabara
Copy link

sfabara commented Nov 2, 2022

@Athu135 Hello i found a small go around for this problem. Requires edit to the @rodrigogs/zongii/lib/common.js file.
Im creating a pull request now for the fix.

@Athu135
Copy link
Author

Athu135 commented Nov 3, 2022

@sfabara Hello listening to this gives a relieve. Could please let me know on how to do it. It would be of great help.

@sfabara
Copy link

sfabara commented Nov 4, 2022

@Athu135 https://github.com/sfabara/zongji I forked the zongji repo and added the fix - if you want to see for yourself it was just a change a change on lines:

  • 443
  • 466
    of @sfabara/zongii/lib/common.js file.

@Ludovic-LABORDE
Copy link

@sfabara It work for me, thanks !

@seanodotcom
Copy link

@Athu135 https://github.com/sfabara/zongji I forked the zongji repo and added the fix - if you want to see for yourself it was just a change a change on lines:

  • 443
  • 466
    of @sfabara/zongii/lib/common.js file.

Excellent, thank you! I was wondering if I'd have to change the collation in every database & every table on my server just to watch the MySQL binlog... with this fix, I do not!

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

4 participants