Back

Text error in Database Documents

  • 1
  • Databases
retr122
25 May, 2024, 17:54

Hello! I'm developing my app with appwrite cloud. When I tried to text something in app and than send it to server to create new document, I rarely find this error. I'm used russian/kazakh language in every cases and receives this strange text. Why?

TL;DR
There seems to be an error related to logging in the code. Make sure to use context.log() or context.error() for logging. Additionally, check for any unsupported logs being thrown. If there are strange symbols in the messageText attribute of newServerDocument, it might be a formatting issue.
Steven
25 May, 2024, 17:58

Does the same thing happen if you put it in the console?

retr122
25 May, 2024, 17:59

no

Steven
25 May, 2024, 18:30

Weird..I wonder if the encoding is changing client side 🧐

Can you compare the network request payload between doing it from the console vs from your app?

retr122
31 May, 2024, 11:46

I finally did it. In server appwrite function i receiving strange logs: Hello, Logs! {"host": "cloud.appwrite.io", "messagetext": "\u00d0\u00b4\u00d0\u00b0\u00d0\u00b0", "senderid": "662d14a5003243c80cb0", "receiverid": "66094e5a0c05c6251136", "chatid": "663f7aa7001426716235", "action": "sendNewMessage", "timestamp": "Fri May 31 16:40:42 GMT+05:00 2024"}

Unsupported logs detected. Use context.log() or context.error() for logging.

Successfully sent message: <firebase_admin.messaging.BatchResponse object at 0x7f66179da550>


D5
31 May, 2024, 15:27

How are you logging?

D5
31 May, 2024, 15:27

What's your code?

D5
31 May, 2024, 15:28

Also, this errro seems to be unrelated, so if possible, create a new post for a better assistance

retr122
31 May, 2024, 15:51

Code on server or client side?

D5
31 May, 2024, 15:59

The code that throws the error. Server side

D5
31 May, 2024, 16:00

If you're using any log way, you should replace it with context.log in order to not get that error

retr122
31 May, 2024, 16:14

newServerDocument in Cloud has strange symbols in messageText attribute

D5
31 May, 2024, 16:57

You don't have any logging?

retr122
31 May, 2024, 16:59

And log ```{"host": "cloud.appwrite.io", "messagetext": "\u00d0\u00b4\u00d0\u00b0\u00d0\u00b0", "senderid": "662d14a5003243c80cb0", "receiverid": "66094e5a0c05c6251136", "chatid": "663f7aa7001426716235", "action": "sendNewMessage", "timestamp": "Fri May 31 16:40:42 GMT+05:00 2024"}

Unsupported logs detected. Use context.log() or context.error() for logging.

Successfully sent message: <firebase_admin.messaging.BatchResponse object at 0x7f66179da550>


TypeScript
retr122
31 May, 2024, 17:00

Error maybe in my client side than?

D5
31 May, 2024, 17:00

No idea, but that error is being thrown whe you use something that is not context.log

D5
31 May, 2024, 17:00

At some point in the code

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