Critical Bug in Android Client SDK----Please help
We are using Photon to develop phone game demo. Photon-Android_v6-2-1_SDK.
Server side send me vaules in a Hashtable<Byte,Object>, the problem is: the result Hashtable always get an value with Key = 0 and Value = 0, and I can't get the result I want! Cause Null Exceptions...
I use peer.opCustom(opCode, ev, true); to send client values.
I use the call back and log all values.
public void operationResult(byte opCode, int returnCode, Hashtable<Byte, Object> returnValues, short invocID)
{
Log.e("operationResult", "opCode="+opCode+" returnCode="+returnCode+" invocID="+invocID+" Size="+returnValues.size() );
for(Entry<Byte, Object> et : returnValues.entrySet()) {
Log.e("Entry--", "Key="+et.getKey()+" Value="+et.getValue());
}
and then the Log :
11-23 02:54:51.370: E/Entry--(652): Key=60 Value=103
11-23 02:54:51.370: E/Entry--(652): Key=3 Value={3=111111, 2=d71ce75f-9a4e-43cb-836d-3b2d1988439f, 1=1046801224}
11-23 02:54:51.370: E/Entry--(652): Key=2 Value=singa_awda
11-23 02:54:51.370: E/Entry--(652): Key=0 Value=0 <
Wrong value! Sever sent me key = 1, valus = 1.
Unfortunately, all the result received from this callback always contains "Key=0 Value=0", and the real value can not be got.....
Unfortunately, IOs SDK do not have the problem...

Server side send me vaules in a Hashtable<Byte,Object>, the problem is: the result Hashtable always get an value with Key = 0 and Value = 0, and I can't get the result I want! Cause Null Exceptions...
I use peer.opCustom(opCode, ev, true); to send client values.
I use the call back and log all values.
public void operationResult(byte opCode, int returnCode, Hashtable<Byte, Object> returnValues, short invocID)
{
Log.e("operationResult", "opCode="+opCode+" returnCode="+returnCode+" invocID="+invocID+" Size="+returnValues.size() );
for(Entry<Byte, Object> et : returnValues.entrySet()) {
Log.e("Entry--", "Key="+et.getKey()+" Value="+et.getValue());
}
and then the Log :
11-23 02:54:51.370: E/Entry--(652): Key=60 Value=103
11-23 02:54:51.370: E/Entry--(652): Key=3 Value={3=111111, 2=d71ce75f-9a4e-43cb-836d-3b2d1988439f, 1=1046801224}
11-23 02:54:51.370: E/Entry--(652): Key=2 Value=singa_awda
11-23 02:54:51.370: E/Entry--(652): Key=0 Value=0 <
Wrong value! Sever sent me key = 1, valus = 1.
Unfortunately, all the result received from this callback always contains "Key=0 Value=0", and the real value can not be got.....
Unfortunately, IOs SDK do not have the problem...



0
Comments
-
Can you tell us the server version, which you use, please?0
-
First, lets look whats really in your received hashtable.
Your for-loop expects the entry to be of type Byte. If it isn't (for whatever reason), I think the result might be a zero.
Maybe you can log again but this time use <Object, Object> and ToString per key/value. Out of my head, I don't know if it prints the type. If not, get it into your log, too, please.
If we find this to be a bug, we can provide you with a fix real soon.0 -
Server is 3.00
-
public void operationResult(byte opCode, int returnCode, Hashtable<Byte, Object> returnValues, short invocID)
type or argments can not be changed, because it's defined by IPhotonPeerListener.0 -
Please update your Android client to a Photon 3 version (current one is Photon 3.0.0.0.Beta).
Photon Android 6.2.1 is a Photon 2 client and Photon 2 clients are not compatible to Photon 3 servers!0 -
Oh,Thanks!!
It' my fault,I did not communicate enough with our server side~~~0