Type Coercion failed: cannot convert org.jivesoftware.xiff.core::EscapedJID

Hi I am using sparkweb downloaded from svn and compiled yesterday.

I’m able to connect to a local openfire but when I attempt to connect to a conference server I get the following from the debug version of flash player:

TypeError: Error #1034: Type Coercion failed: cannot convert org.jivesoftware.xiff.core::EscapedJID@1b0738a9 to org.jivesoftware.xiff.core.UnescapedJID.

at com.jivesoftware.spark.managers::MUCManager/handleSpeculativeInfoReply()

at Function/http://adobe.com/AS3/2006/builtin::apply()

at org.jivesoftware.xiff.core::XMPPConnection/handleIQ()

at org.jivesoftware.xiff.core::XMPPSocketConnection/bSocketReceivedData()

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at org.jivesoftware.xiff.util::SocketConn/onSockRead()

at org.jivesoftware.xiff.util::SocketConn/onRead()

I hope I am interpreting this properly as a bug in XIFF and not sparkweb.

Paul

That’s a bug in SparkWeb. It should be calling .unescaped on the JID.

Hi David,

I ran into the same issue and attempted to write a patch for it. Adding a simple .unescaped on line 108 of MUCManager.as then provokes this error:

ReferenceError: Error #1069: Property unescaped not found on org.jivesoftware.xiff.core.UnescapedJID and there is no default value.
     at com.jivesoftware.spark::MUCRoomListItemRenderer/get jid()[Z:\home\DEV\SparkWeb\SparkWebCommonComponents\com\jivesoftware\spark\MUCRoomListItemRenderer.mxml:137]
     at com.jivesoftware.spark::MUCRoomListItemRenderer/configMenu()[Z:\home\DEV\SparkWeb\SparkWebCommonComponents\com\jivesoftware\spark\MUCRoomListItemRenderer.mxml:76]
     at com.jivesoftware.spark::MUCRoomListItemRenderer/set data()[Z:\home\DEV\SparkWeb\SparkWebCommonComponents\com\jivesoftware\spark\MUCRoomListItemRenderer.mxml:58]
     at mx.controls::List/makeRowsAndColumns()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\List.as:1286]
     at mx.controls.listClasses::ListBase/makeRowsAndColumnsWithExtraRows()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:1359]
     at mx.controls.listClasses::ListBase/updateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:3657]
     at mx.controls::List/updateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\List.as:1003]
     at mx.controls.listClasses::ListBase/validateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:3279]
     at mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:605]
     at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:678]
     at Function/http://adobe.com/AS3/2006/builtin::apply()
     at mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8565]

My patch idea is probably not what you are suggesting?

thanks!

daryl

Hm… there’s some weird code in here. What on earth was I thinking with that ‘cache’ that isn’t ever read.

I’ll see what I can do.

booo double post due to really slow response times

ok, turns out that whole section of code was just totally busted. ActionScript’s lack of a typed collection class kept the compiler from catching it

Give http://dscoder.com/mucbrowserfixes.diff a try and see if it fixes it (there’s one or two unrelated changes in that diff, but they’re trivial; no behavior change except I accidentally left in changing the default server from jivesoftware.com to igniterealtime.org, oops).

Thanks David,

After adding your patch, I now get this error when attempting to load open_chat on ignite

TypeError: Error #1009: Cannot access a property or method of a null object reference.
     at org.jivesoftware.xiff.vcard::VCard$/getVCard()[Z:\home\DEV\SparkWeb\xiff\src\org\jivesoftware\xiff\vcard\VCard.as:77]
     at com.jivesoftware.spark::BuddyRenderer/loadVCard()[Z:\home\DEV\SparkWeb\SparkWebCommonComponents\com\jivesoftware\spark\BuddyRenderer.mxml:207]
     at com.jivesoftware.spark::BuddyRenderer/set data()[Z:\home\DEV\SparkWeb\SparkWebCommonComponents\com\jivesoftware\spark\BuddyRenderer.mxml:247]
     at mx.controls::List/makeRowsAndColumns()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\List.as:1286]
     at mx.controls.listClasses::ListBase/makeRowsAndColumnsWithExtraRows()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:1359]
     at mx.controls.listClasses::ListBase/updateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:3657]
     at mx.controls::List/updateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\List.as:1003]
     at mx.controls.listClasses::ListBase/validateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:3279]
     at mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:605]
     at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:660]
     at Function/http://adobe.com/AS3/2006/builtin::apply()
     at mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8565]
     at mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8508]

daryl

Why do you need tu put such a piece of unreadable info into thread’s title? I’m making that reply to fix my Start page layout…

UPD: but this doesnt help, unless thread’s author change thread’s title

Argh. I blame gremlins

I can’t look into it now, but I’ll try to remember to this evening.

ok, the first patch + a second to address this issue are in trunk now. Give it a spin and let me know how it works

Hi David,

Thanks for the rapid patches I just built from trunk and this issue is resolved…

daryl