Importing from KeePass failing
Hello
Im trying to migrate our companies passwords from KeePass towards Teampass, but importing them fails/stalls.
Whenever i try to import a vault from KeePass to Teampass the importing gets stuck on the following message "Reading file"
I've edited the config to allow for larger than 10mb files, so thats not the issue. I've also tried with smaller files, giving me the same issue
Any idea what i can do to fix this? Id like to avoid having to import the CSV's since that has already caused me a lot of trouble due to the contents of the comments and passwords
Teampass version:
I assume, that you use apache webserver? Please check the logs of the webserver. Most of the time there you will find the error.
edit: you can post the error here if you need more help ;)
[Wed Oct 01 07:23:05.222084 2025] [php:error] [pid 146789] [client 10.15.254.63:61156] PHP Fatal error: Uncaught TypeError: base64_encode(): Argument #1 ($string) must be of type string, null given in /var/www/html/teampass/sources/import.queries.php:997\nStack trace:\n#0 /var/www/html/teampass/sources/import.queries.php(997): base64_encode()\n#1 /var/www/html/teampass/sources/import.queries.php(965): buildItemDefinition()\n#2 /var/www/html/teampass/sources/import.queries.php(939): handleEntries()\n#3 /var/www/html/teampass/sources/import.queries.php(1065): recursive()\n#4 {main}\n thrown in /var/www/html/teampass/sources/import.queries.php on line 997, referer: https://teampass.qliro.com/index.php?page=import
This seems to be the error showing up in the logs when importing :)
From your error it seems, that the value in base64_encode isnt a string but a null. i dont know how good you are with changing code. But you can test this: Open this file: /var/www/html/teampass/sources/import.queries.php On Line 997 you should have this line: $itemDefinition['Password'] = base64_encode($itemDefinition['Password']) ?? ''; Change this line to: $itemDefinition['Password'] = base64_encode($itemDefinition['Password'] ?? ''); save the file and try the import again. this should change a null to an empty string which can be process by bas64_encode
Thanks for the reply!
I managed to fix it in the meantime, with something along the line of what you suggested, which then gave me the issue that the passwords got imported into a non-existing folder, and a couple of tweaks later got it working!