TeslaLogger
TeslaLogger copied to clipboard
Unknown column 'sessionId' in 'field list'
🚨 MySQL Exception: "Unknown column 'sessionId' in 'field list'" in SuCSession (TeslaLogger 1.63.6.0)
Hi, since lately I'm seeing the following recurring MySQL error in the logs:
MySql.Data.MySqlClient.MySqlException (0x80004005): Unknown column 'sessionId' in 'field list'
at TeslaLogger.SuCSession..ctor (System.Object jsonSession, TeslaLogger.Car car)
at TeslaLogger.GetChargingHistoryV2Service.ParseJSON (System.String sjson, TeslaLogger.Car car)
...
Apparently, TeslaLogger is expecting a sessionId column in the database (most likely in the sucSession table), but that column doesn't exist in my schema. This causes Supercharger sessions to fail when being saved.
Steps to Reproduce:
- Fresh install with the current
docker-composesetup - Drive to a Supercharger and begin charging
- View logs via
docker logs teslalogger→ error appears immediately
System Info:
- TeslaLogger version: latest (1.63.6.0)
masteras of 11.06.2025 - Setup: Docker with mariadb and TeslaLogger services
- mariadb:10.4.7
- No manual schema changes were made
Expected Behavior:
The column sessionId should either:
- be automatically created through a database migration script OR
- be treated as optional in the code if missing
Suggestion:
- Add the missing column via migration script
- Or: check for column existence in code before using it to avoid runtime exceptions
Thanks for your great work — TeslaLogger is otherwise running perfectly! 🙌
Best regards, rd13
maybe related to #1569
I think there is a exception during UpdateTeslalogger:Start(), so subsequent db changes are skipped.
https://github.com/bassmaster187/TeslaLogger/blob/d3b8ea7bd8aecd6246515145b0d0f0663d6fc14f/TeslaLogger/UpdateTeslalogger.cs#L53
Yes could be related to #1569.