Offering file for transfer fails with StanzaException
Steps to reproduce: * Implement file transfer according http://sco0ter.bitbucket.org/babbler/xep/filetransfer.html * Offer a file for transfer
Expected result: * No exception. Outgoing message in console log.
Actual result: * StanzaException. No outgoing message in console log.
Below is the console log. If there is something I can help / check please let me know! :-)
OUT: <iq id="82a59dc4-decf-4f1e-83cb-95f1b17ce6d6" to="mkarg@einfachjabber.de" type="get"><query xmlns="http://jabber.org/protocol/disco#info"></query></iq> IN : <iq from="mkarg@einfachjabber.de" id="82a59dc4-decf-4f1e-83cb-95f1b17ce6d6" to="mkarg@jabber.de/eclipse" type="error"><error type="cancel"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"></service-unavailable></error></iq> rocks.xmpp.core.stanza.model.StanzaException: <service-unavailable/> - (type 'cancel': do not retry (the error cannot be remedied)) at rocks.xmpp.core.session.XmppSession.query(XmppSession.java:527) at rocks.xmpp.core.session.XmppSession.query(XmppSession.java:471) at rocks.xmpp.extensions.disco.ServiceDiscoveryManager.discoverInformation(ServiceDiscoveryManager.java:293) at rocks.xmpp.extensions.disco.ServiceDiscoveryManager.discoverInformation(ServiceDiscoveryManager.java:275) at rocks.xmpp.extensions.caps.EntityCapabilitiesManager.discoverCapabilities(EntityCapabilitiesManager.java:210) at rocks.xmpp.extensions.caps.EntityCapabilitiesManager.isSupported(EntityCapabilitiesManager.java:241) at rocks.xmpp.extensions.filetransfer.FileTransferManager.offerFile(FileTransferManager.java:139) at application.chat.XmppChat.lambda$7(XmppChat.java:396) at application.chat.XmppChat$$Lambda$402/88777887.accept(Unknown Source) at java.util.ArrayList.forEach(ArrayList.java:1249) at application.chat.XmppChat.offerFiles(XmppChat.java:394) at application.chatwindow.ChatWindowController.lambda$8(ChatWindowController.java:209) at application.chatwindow.ChatWindowController$$Lambda$220/1066528549.handle(Unknown Source) at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191) at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54) at javafx.event.Event.fireEvent(Event.java:198) at javafx.scene.Scene$DnDGesture.fireEvent(Scene.java:2904) at javafx.scene.Scene$DnDGesture.processTargetDrop(Scene.java:3130) at javafx.scene.Scene$DnDGesture.access$6400(Scene.java:2880) at javafx.scene.Scene$DropTargetListener.drop(Scene.java:2844) at com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler.lambda$handleDragDrop$305(GlassSceneDnDEventHandler.java:81) at com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler$$Lambda$401/1707311396.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler.handleDragDrop(GlassSceneDnDEventHandler.java:79) at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleDragDrop$358(GlassViewEventHandler.java:663) at com.sun.javafx.tk.quantum.GlassViewEventHandler$$Lambda$400/862119867.get(Unknown Source) at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:404) at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleDragDrop(GlassViewEventHandler.java:662) at com.sun.glass.ui.View.handleDragDrop(View.java:712) at com.sun.glass.ui.View.notifyDragDrop(View.java:1027) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$144(WinApplication.java:101) at com.sun.glass.ui.win.WinApplication$$Lambda$36/186276003.run(Unknown Source) at java.lang.Thread.run(Thread.java:745)
Comments (8)
-
repo owner -
reporter I retried with full JID (including resource), but the stack trace still looks very scary on the sending side:
OUT: <iq id="27b4061e-93e5-4026-a189-9896f5cacb34" to="mkarg@einfachjabber.de/standalone" type="get"><query xmlns="http://jabber.org/protocol/disco#info"></query></iq> IN : <iq from="mkarg@einfachjabber.de/standalone" id="27b4061e-93e5-4026-a189-9896f5cacb34" to="mkarg@jabber.de/eclipse" type="result"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="client" type="pc"></identity><feature var="http://jabber.org/protocol/bytestreams"></feature><feature var="http://jabber.org/protocol/caps"></feature><feature var="http://jabber.org/protocol/chatstates"></feature><feature var="http://jabber.org/protocol/disco#info"></feature><feature var="http://jabber.org/protocol/disco#items"></feature><feature var="http://jabber.org/protocol/ibb"></feature><feature var="http://jabber.org/protocol/rsm"></feature><feature var="http://jabber.org/protocol/si"></feature><feature var="http://jabber.org/protocol/si/profile/file-transfer"></feature><feature var="jabber:iq:last"></feature><feature var="jabber:iq:oob"></feature><feature var="jabber:iq:version"></feature><feature var="jabber
oob"></feature><feature var="jid\20escaping"></feature><feature var="urn:xmpp:hash-function-text-names:md5"></feature><feature var="urn:xmpp:hash-function-text-names:sha-1"></feature><feature var="urn:xmpp:hash-function-text-names:sha-224"></feature><feature var="urn:xmpp:hash-function-text-names:sha-256"></feature><feature var="urn:xmpp:hash-function-text-names:sha-384"></feature><feature var="urn:xmpp:hash-function-text-names:sha-512"></feature><feature var="urn:xmpp:hashes:1"></feature><feature var="urn:xmpp:ping"></feature><feature var="urn:xmpp:time"></feature><feature var="vcard-temp"></feature></query></iq> OUT: <iq id="bf6c9fcb-871a-4aa6-b11e-07c77c794553" to="mkarg@einfachjabber.de/standalone" type="set"><si xmlns="http://jabber.org/protocol/si" id="5830dae7-3db5-467c-8ab1-eee55bc1d380" profile="http://jabber.org/protocol/si/profile/file-transfer"><file xmlns="http://jabber.org/protocol/si/profile/file-transfer" size="44979" name="Untitled.fbr.recoverydata" date="2014-12-06T16:52:40.379+01:00"><desc>a file</desc></file><feature xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber
data" type="form"><field type="list-single"><value>stream-method</value><option><value>http://jabber.org/protocol/bytestreams</value></option><option><value>http://jabber.org/protocol/ibb</value></option></field></x></feature></si></iq> IN : <iq from="mkarg@einfachjabber.de/standalone" id="bf6c9fcb-871a-4aa6-b11e-07c77c794553" to="mkarg@jabber.de/eclipse" type="error"><error type="modify"><bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"></bad-request><no-valid-streams xmlns="http://jabber.org/protocol/si"></no-valid-streams></error></iq> rocks.xmpp.core.stanza.model.StanzaException: <bad-request/> - (type 'modify': retry after changing the data sent) rocks.xmpp.extensions.si.model.NoValidStreams@75a38260 at rocks.xmpp.core.session.XmppSession.query(XmppSession.java:527) at rocks.xmpp.extensions.si.StreamInitiationManager.initiateStream(StreamInitiationManager.java:129) at rocks.xmpp.extensions.filetransfer.FileTransferManager.offerFile(FileTransferManager.java:150) at application.chat.XmppChat.lambda$9(XmppChat.java:391) at application.chat.XmppChat$$Lambda$452/2691047.accept(Unknown Source) at java.util.ArrayList.forEach(ArrayList.java:1249) at application.chat.XmppChat.offerFiles(XmppChat.java:388) at application.chatwindow.ChatWindowController.lambda$8(ChatWindowController.java:209) at application.chatwindow.ChatWindowController$$Lambda$222/1411979560.handle(Unknown Source) at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191) at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54) at javafx.event.Event.fireEvent(Event.java:198) at javafx.scene.Scene$DnDGesture.fireEvent(Scene.java:2904) at javafx.scene.Scene$DnDGesture.processTargetDrop(Scene.java:3130) at javafx.scene.Scene$DnDGesture.access$6400(Scene.java:2880) at javafx.scene.Scene$DropTargetListener.drop(Scene.java:2844) at com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler.lambda$handleDragDrop$305(GlassSceneDnDEventHandler.java:81) at com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler$$Lambda$451/1410643404.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler.handleDragDrop(GlassSceneDnDEventHandler.java:79) at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleDragDrop$358(GlassViewEventHandler.java:663) at com.sun.javafx.tk.quantum.GlassViewEventHandler$$Lambda$450/31222712.get(Unknown Source) at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:404) at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleDragDrop(GlassViewEventHandler.java:662) at com.sun.glass.ui.View.handleDragDrop(View.java:712) at com.sun.glass.ui.View.notifyDragDrop(View.java:1027) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$144(WinApplication.java:101) at com.sun.glass.ui.win.WinApplication$$Lambda$36/186276003.run(Unknown Source) at java.lang.Thread.run(Thread.java:745)
What next? :-)
-
repo owner Arg... I did too much refactoring recently and didn't test it again... I am sorry :-(.
<field type="list-single"><value>stream-method</value>
should be
<field var="stream-method" type="list-single">.
Will fix it ASAP and inform you.
-
repo owner Fixed: c33f8d196bfe835531e3c02f9a6ad86f276daa58
sorry again.
-
reporter Works like a charm now. Thank you very much for fixing this so promptly! I really appreciate your agility and would be glad if you'd login and accept the pending PayPal donations! It makes me feel uncomfortable that you are such supportive but didn't accept that few Euros. :-)
-
reporter - changed status to resolved
Cannot reproduce anymore after your fix from tonight.
-
repo owner - changed status to closed
-
repo owner - changed version to 0.5.0
- Log in to comment
Seems like you did offer the file to a bare JID ("mkarg@einfachjabber.de").
According to how XMPP works (specifically IQs), you have to use a full JID, i.e. with an available resource. Otherwise the server handles your <iq/> and it seems like your server doesn't support service discovery (which is also strange).