SendUpdatePeers returning BAD_REQUEST Error always?

0 votes

Hello, I am developing an app using AppWarp on Windows Runtime (Windows 8.1 and Windows Phone 8.1) and I am trying to send data to other players in a room but it is not working for some reason, every time I call SendUpdatePeers I get a BAD_REQUEST response code with the message saying "Bad username entered. Please try a different username". I am sure I am Joined and Subscribed to the room and connected to appwarp as I have printed the connection state right before Sending the update and it is 0 and I am getting notifications when other players join and leave or when they send a chat message. I am passing in an array of bytes as expected but they are being generated from a JObject like so:

public static byte[] BuildMessageBytes(JObject data)
{
return System.Text.Encoding.UTF8.GetBytes(data.ToString());
}
 
Does anyone know what could be going wrong?
asked Dec 18, 2014 in AppWarp by feraask (45 points)

1 Answer

0 votes

Hi Feraask,

Thank you for taking interest in the AppWarp SDK.We are glad to hear from you.We will try our best to solve your queries.Please feel free to ask.

With regards to your previous question, I would like to inform you that generally a user gets a BAD_REQUEST error only in two cases : 

1. If the user is not connected which according to you is not the case here.

2. If the update message size is too large (greater than 1000) which seems a possible case here.So please check the length of your message.

Do let us know if you face any other problems.
 
Thank you
answered Dec 18, 2014 by kanika mittal (50 points)
Yea it was the update size I was trying to send one over 1000 bytes, thanks for the help!
You'r welcome Feraask.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...