Closed redlock closed 3 years ago
So after digging into deepstream server code a bit the bug is apparent:
if (!BUILDERS[message.topic] || !BUILDERS[message.topic][message.action]) {
console.log(message, isAck)
}
const builder = BUILDERS[message.topic][message.action]
if (!builder) {
console.trace('missing builder for', message)
return ''
}
In the above code the server crashes when trying to find a builder with topic 1 which doesn't exist. Then when trying to access it with message.action you get the crash. There should be a condition to avoid this above it or just return in the earlier if statement.
hello!
Yeah that seems to be the case. Generally the text protocol is more of a best effort to have compatibility with older SDKs. But if you raise a fix I would be happy to merge it in!
Submitted a pull request. However, since I am not familiar with the context of where this function will be used I have returned an empty string (as was returned in a later line in the function). Please check it and review whether returning any empty string is safe. Thanks
Hello, There server crashed with this stack trace:
Before that it logged this message: { topic: 1, action: 1, originalTopic: 3 } false
UNKNOWN_TOPIC | AUTH
This happened in high load conditions using Records.
Thanks