Importing from Enpass, Vaultwarden/Bitwarden app logs "Malformed communication packet"
-
I've been trying to run some tests and was importing my data from Enpass via both json and csv format (Bitwarden supports importing both formats), but I receive the following error no matter which file format I use:
Jun 08 11:45:08 [2021-06-08 18:45:08.405][request][INFO] POST /api/ciphers/import Jun 08 11:45:08 [2021-06-08 18:45:08.598][error][ERROR] Error saving cipher. Jun 08 11:45:08 [CAUSE] DatabaseError( Jun 08 11:45:08 __Unknown, Jun 08 11:45:08 "Malformed communication packet.", Jun 08 11:45:08 ) Jun 08 11:45:08 172.18.0.1 - - [08/Jun/2021:18:45:08 +0000] "POST /api/ciphers/import HTTP/1.1" 400 1038 "https://vault.d19.ca/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36" Jun 08 11:45:08 [2021-06-08 18:45:08.599][response][INFO] POST /api/ciphers/import (post_ciphers_import) => 400 Bad Request
It seems like this is possibly related to MySQL 8, based on some very quick research into
Malformed communication packet
error text, plus it follows afterDatabaseError
so it must be MySQL-related somehow.The CSV is only about 300 KB in size, and the JSON is about 2.7 MB in size (JSON contains the attachments on records too so that's why it's much larger). I don't think it's a size issue though since the CSV is so small and still fails.
Any advice on this? Some configuration change I need to make perhaps?
-
Okay weird update... I changed it to 1G but still received the same error after restarting MySQL service. So then I went back and set it back to 64M default it had (which should have been enough anyways), but then when I tried it again soon after it then suddenly worked importing the JSON file without "Malformed communication packet", it's as if maybe the 1G value worked but wasn't recognized until later? Or it was a total coincidence, I'm not certain which yet. lol.
I'm wondering now if it maybe makes sense to up the max_allowed_packet up a bit though? I mean 64 MB is fine but wondering if it should be closer to 256 MB or something like that instead? I'm not certain if this was even to do with it, but it seemed possible given that it worked soon after tinkering with the values.