Skip to content
Back

Got server error 500 "general_unknown" when responding raw binary from Function

  • 0
  • Android
  • Functions
  • Cloud
Man Nguyen
18 Aug, 2025, 16:43

My function responds a small ogg audio data, the console showed successful executions, but I got a server error from the client sdk (Android/Kotlin):

TypeScript
{
  "message" : "Server Error",
  "code" : 500,
  "type" : "general_unknown",
  "version" : "1.7.4"
}

Function side (Go 1.23):

TypeScript
// audio is a non-nil []byte
Context.Log("Audio generated:", len(audio), "bytes")
return Context.Res.Binary(audio)

The console logged "Audio generated: 2779 bytes" with status code 200. However, my client received an AppwriteException described above. I tried to encode the binary into base64 and it worked! But this is not the solution.

Thank you!

TL;DR
Developers are encountering a server error 500 'general_unknown' when responding with raw binary data from a Go server function, despite successful executions. Encoding binary data into base64 temporarily resolves the issue but isn't the ideal solution. Solution: Consider potential data format issues when handling raw binary data responses.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more