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

Some TextMessages are too long to store in the database #35

Open
fifieldt opened this issue May 22, 2024 · 2 comments
Open

Some TextMessages are too long to store in the database #35

fifieldt opened this issue May 22, 2024 · 2 comments

Comments

@fifieldt
Copy link
Contributor

When running meshtastic-map for long enough, some exceptions like below arise.

Invalid prisma.textMessage.create()` invocation in
meshtastic-map/src/mqtt.js:312:42

309 }
310
311 try {
→ 312 await prisma.textMessage.create(
The provided value for the column is too long for the column's type. Column: text
at In.handleRequestError (meshtastic-map/node_modules/@prisma/client/runtime/library.js:122:6854)
at In.handleAndLogRequestError (meshtastic-map/node_modules/@prisma/client/runtime/library.js:122:6188)
at In.request (meshtastic-map/node_modules/@prisma/client/runtime/library.js:122:5896)
at async l (meshtastic-map/node_modules/@prisma/client/runtime/library.js:127:10871)
at async MqttClient. (meshtastic-map/src/mqtt.js:312:17) {
code: 'P2000',
clientVersion: '5.11.0',
meta: { modelName: 'TextMessage', column_name: 'text' }
`

@liamcottle
Copy link
Owner

I've seen these logs, but haven't investigated them any further.

My initial thoughts without actually debugging it, are that the packets are being decrypted and successfully parsed as a Data message (in protobuf) even though the decryption key was not the correct key.

And by chance, the portnum just happens to line up with TEXT_MESSAGE_APP and the decoded text is just full of garbage.

@fifieldt
Copy link
Contributor Author

fifieldt commented Jun 6, 2024

Great analysis. I mainly added this as a placeholder to investigate.

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

2 participants