[SOLVED] Bug in Client.setAttribute()

All Union Platform questions, comments, feature requests, and bug reports.

Bug in Client.setAttribute()  

Postby qa3an » Wed 05 Dec 2012 02:55

Hi.

Sorry for my english. I'm flash developer and i try to use union platform. But i found one problem - when i try to set some Attribute to Client i catch this error in server's log file.

Code: Select all
2012-12-05 08:56:39,707 DEBUG - Processing from client [29] message [<U><M>C2S_SET_CLIENT_ATTR(u3)</M><L><A>29</A><A></A><A>CLIENT_READY</A><A>true</A><A></A><A>4</A></L></U>]
2012-12-05 08:56:39,707 WARN  - Exception setting attribute [CLIENT_READY=true]
net.user1.union.core.exception.ServerOnlyAttributeException
   at net.user1.union.core.attribute.c.b(SourceFile:242)
   at net.user1.union.core.attribute.a.a(SourceFile:61)
   at net.user1.union.core.LocalClient.setAttribute(SourceFile:250)
   at net.user1.union.core.a.a.h(SourceFile:720)
   at net.user1.union.core.a.a.a(SourceFile:195)
   at net.user1.union.core.a.d.run(SourceFile:38)
   at java.lang.Thread.run(Unknown Source)
2012-12-05 09:16:09,504 DEBUG - Processing from client [5] message [<U><M>C2S_SET_CLIENT_ATTR(u3)</M><L><A>5</A><A></A><A>CLIENT_READY_TO_GAME</A><A>yes</A><A></A><A>4</A></L></U>]
2012-12-05 09:16:09,504 WARN  - Exception setting attribute [CLIENT_READY_TO_GAME=yes]
net.user1.union.core.exception.ServerOnlyAttributeException
   at net.user1.union.core.attribute.c.b(SourceFile:242)
   at net.user1.union.core.attribute.a.a(SourceFile:61)
   at net.user1.union.core.LocalClient.setAttribute(SourceFile:250)
   at net.user1.union.core.a.a.h(SourceFile:720)
   at net.user1.union.core.a.a.a(SourceFile:195)
   at net.user1.union.core.a.d.run(SourceFile:38)
   at java.lang.Thread.run(Unknown Source)
2012-12-05 09:16:09,504 DEBUG - Server sending to client [5] message [<U><M>S2C_SET_CLIENT_ATTR_RESULT(u73)</M><L><A></A><A>5</A><A></A><A>CLIENT_READY_TO_GAME</A><A>4</A><A>SERVER_ONLY</A></L></U>]
2012-12-05 09:16:10,984 DEBUG - Processing a MESSAGE_RECEIVED for session 9
2012-12-05 09:16:10,987 DEBUG - Processing a MESSAGE_RECEIVED for session 9
2012-12-05 09:16:12,452 DEBUG - Processing a MESSAGE_RECEIVED for session 1
2012-12-05 09:16:12,454 DEBUG - Processing a MESSAGE_RECEIVED for session 1
2012-12-05 09:16:14,392 DEBUG - Processing a MESSAGE_RECEIVED for session 11
2012-12-05 09:16:14,394 DEBUG - Processing a MESSAGE_RECEIVED for session 11
2012-12-05 09:16:17,839 DEBUG - Processing a MESSAGE_RECEIVED for session 13
2012-12-05 09:16:17,842 DEBUG - Processing a MESSAGE_RECEIVED for session 13
2012-12-05 09:16:18,022 DEBUG - Processing a MESSAGE_RECEIVED for session 1
2012-12-05 09:35:33,126 DEBUG - Processing from client [3] message [<U><M>C2S_SET_CLIENT_ATTR(u3)</M><L><A>3</A><A></A><A>CLIENT_READY_TO_GAME</A><A>yes</A><A>lobby.roomdfaa370af9fd9956d4242334df475b61</A><A>4</A></L></U>]
2012-12-05 09:35:33,126 WARN  - Exception setting attribute [CLIENT_READY_TO_GAME=yes]
net.user1.union.core.exception.ServerOnlyAttributeException
   at net.user1.union.core.attribute.c.b(SourceFile:242)
   at net.user1.union.core.attribute.a.a(SourceFile:61)
   at net.user1.union.core.LocalClient.setAttribute(SourceFile:250)
   at net.user1.union.core.a.a.h(SourceFile:720)
   at net.user1.union.core.a.a.a(SourceFile:195)
   at net.user1.union.core.a.d.run(SourceFile:38)
   at java.lang.Thread.run(Unknown Source)


Thanks.
qa3an
 
Posts: 2
Joined: Wed 05 Dec 2012 02:18

Re: Bug in Client.setAttribute()

Postby colin » Wed 05 Dec 2012 17:28

hi qa3an,
welcome to union!

the attribute looks like it has been flagged as "server only" by a server-side module. clients cannot assign values to "server only" attributes. if you want to assign the attribute from client code, you'll have to change the flags on the attribute in your module.

let me know if that solves the problem.

colin
colin
 
Posts: 232
Joined: Mon 17 Oct 2011 18:47

Re: Bug in Client.setAttribute()

Postby qa3an » Sun 09 Dec 2012 09:18

Yes. The problem solved. But when i wrote this post i found that sometimes server allow me to set up this attribute. And i thought that it is bug not my mistake.

Thanks.
qa3an
 
Posts: 2
Joined: Wed 05 Dec 2012 02:18

Re: Bug in Client.setAttribute()

Postby Cagatey01 » Tue 30 Dec 2014 03:53

Hi all,

I am new to union platform. I need a simple example for communication between flash(reactor) and union platform(java and jar file for modules). Like when i am pass two numbers it will get added in server (java) and return back the result to flash. I think event listener is work for this. But i stuck in coding please help me out.

Thanks,
Cagatey01
 
Posts: 1
Joined: Tue 30 Dec 2014 03:35

Re: Bug in Client.setAttribute()

Postby colin » Wed 31 Dec 2014 16:58

hi Cagatey01,
welcome to union. please start a new topic for your question rather than replying to an existing topic.

thanks,
colin
colin
 
Posts: 232
Joined: Mon 17 Oct 2011 18:47


Return to Union Platform

Online

Users browsing this forum: No registered users and 4 guests