The problem happened while testing aTalk running on an android virtual device during jingle file transfer process.
The “session-accept” in reply to a “session-initiate” from the AVD may contain a candidate with an invalid host string e.g.
<candidate cid='T81Y91MAHL32U44N' host='fe80::bc17:dfff:fea5:c0fb%dummy0' jid='abc123@atalk.sytes.net/atalk' port='7777' priority='100' type='proxy'/>
This causes IllegalArgumentException to be thrown from the underlying InternetAddress#from(String host) on executed the below statement in JingleS5BTransportProvider#parse()
cb.setHost(parser.getAttributeValue(null, ATTR_HOST));
This leads to the whole jingle file transfer ended abruptly. Just wonder if it is better just to ignore an invalid candidate and proceed to use the rest.
Please advice.
2022-11-10 09:14:02.053 15453-15797/org.atalk.android D/SMACK: RECV (0):
<iq xml:lang='en-US' to='swordfish@atalk.sytes.net/atalk' from='abc123@atalk.sytes.net/atalk' type='set' id='8NZ1K-16'>
<jingle xmlns='urn:xmpp:jingle:1' responder='abc123@atalk.sytes.net/atalk' action='session-accept' sid='DSJL6ST2C4TZCN8BPDLP359V'>
<content name='cont-LNSU2JHPJR7YBIZL' creator='initiator' senders='initiator'>
<description xmlns='urn:xmpp:jingle:apps:file-transfer:5'>
<file>
<date>
2022-07-17T03:49:58.000+00:00
</date>
<media-type>
image/jpeg
</media-type>
<name>
swordfish.jpg
</name>
<size>
7914
</size>
<hash xmlns='urn:xmpp:hashes:2' algo='sha3-256'>
JPEMSj5h1xvkfRsQMdXP2kbyI8g9z9FL67W8sdmECQc=
</hash>
</file>
</description>
<transport xmlns='urn:xmpp:jingle:transports:s5b:1' dstaddr='9c1847c18549ac34ba71a39561da23c9700a3fb9' mode='tcp' sid='ILVBAECZEPS9FLSHLM9KTTDU'>
<candidate cid='Z52R8ISJGKGT6ELI' host='10.0.2.16' jid='abc123@atalk.sytes.net/atalk' port='7777' priority='100' type='proxy'/>
<candidate cid='T81Y91MAHL32U44N' host='fe80::bc17:dfff:fea5:c0fb%dummy0' jid='abc123@atalk.sytes.net/atalk' port='7777' priority='100' type='proxy'/>
<candidate cid='KX5KU4J92JH74ZU9' host='fe80::5054:ff:fe12:3456%eth0' jid='abc123@atalk.sytes.net/atalk' port='7777' priority='100' type='proxy'/>
<candidate cid='W8CZLK4YQ26GAS2U' host='fec0::5054:ff:fe12:3456' jid='abc123@atalk.sytes.net/atalk' port='7777' priority='100' type='proxy'/>
<candidate cid='UI1M2IPG1STYBCXW' host='fe80::a28:faa6:dcda:6530%wlan0' jid='abc123@atalk.sytes.net/atalk' port='7777' priority='100' type='proxy'/>
<candidate cid='6U5Q2FRDECSYVCP1' host='fec0::9fd5:5740:9435:b80f' jid='abc123@atalk.sytes.net/atalk' port='7777' priority='100' type='proxy'/>
<candidate cid='5GWY3FXMAI9B23GQ' host='fec0::15c5:cccb:cd43:d69e' jid='abc123@atalk.sytes.net/atalk' port='7777' priority='100' type='proxy'/>
<candidate cid='R9PD848ESL9KUVIF' host='10.0.2.15' jid='abc123@atalk.sytes.net/atalk' port='7777' priority='100' type='proxy'/>
<candidate cid='2VVWG3ZTEW2L57Z6' host='42.60.99.4' jid='proxy.atalk.sytes.net/55238004' port='7777' priority='0' type='proxy'/>
</transport>
<security xmlns='urn:xmpp:jingle:jet:0' name='cont-LNSU2JHPJR7YBIZL' cipher='urn:xmpp:ciphers:aes-256-gcm-nopadding:0' type='eu.siacs.conversations.axolotl'>
<encrypted xmlns='eu.siacs.conversations.axolotl'>
<header sid='646419288'>
<key rid='1201354019'>
MwohBV+/wsXuwLlsJF9teNnr/8Qf7aW4RLb0TGWGTx7gQfY1EAQYBCIwmjIkgsC49uQP8qonfF0agbOdBsQOe2R8OWk3NaAq5A1gQRJg9LBZ/HYsR5wJIUSrySplzbLbp6s=
</key>
<key prekey='true' rid='2028266418'>
MwgaEiEFTNzLSATRaz15XmbGNW99qmT8a9zBo7E5IGmvCbGyZGAaIQV/iXNtFvWTc9FCFRZWKDFf9sFUvLBXNpJreYZymc6RNyJiMwohBbsaeoazry0RhxneaKLcYaP6lKvo/2/6aSTWklOVSCZTEAkYACIwtpKox6UR0f9wGEUgCi3LMZmASbKScucm8yA/h9TP3WuF6FUevbBdRnVpgmqJ1Jfwe8Qpzkdia80oADAB
</key>
<iv>
ScHj1EAMzda0+OFu
</iv>
</header>
<payload>
KeL2vf5m4O6DDeQy2Qf06lAl4qECtsG8PUFfVDJLrS+aMUUSbb68ES6kIQqmseI9p+7BYHnxaQHu1MRz
</payload>
</encrypted>
</security>
</content>
</jingle>
</iq>
2022-11-10 09:14:02.098 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: UnparseableStanza Error: <candidate xmlns='urn:xmpp:jingle:transports:s5b:1' cid='T81Y91MAHL32U44N' host='fe80::bc17:dfff:fea5:c0fb%dummy0' jid='abc123@atalk.sytes.net/atalk' port='7777' priority='100' type='proxy'/><candidate xmlns='urn:xmpp:jingle:transports:s5b:1' cid='KX5KU4J92JH74ZU9' host='fe80::5054:ff:fe12:3456%eth0' jid='abc123@atalk.sytes.net/atalk' port='7777' priority='100' type='proxy'/><candidate xmlns='urn:xmpp:jingle:transports:s5b:1' cid='W8CZLK4YQ26GAS2U' host='fec0::5054:ff:fe12:3456' jid='abc123@atalk.sytes.net/atalk' port='7777' priority='100' type='proxy'/><candidate xmlns='urn:xmpp:jingle:transports:s5b:1' cid='UI1M2IPG1STYBCXW' host='fe80::a28:faa6:dcda:6530%wlan0' jid='abc123@atalk.sytes.net/atalk' port='7777' priority='100' type='proxy'/><candidate xmlns='urn:xmpp:jingle:transports:s5b:1' cid='6U5Q2FRDECSYVCP1' host='fec0::9fd5:5740:9435:b80f' jid='abc123@atalk.sytes.net/atalk' port='7777' priority='100' type='proxy'/><candidate xmlns='urn:xmpp:jingle:transports:s5b:1' cid='5GWY3FXMAI9B23GQ' host='fec0::15c5:cccb:cd43:d69e' jid='abc123@atalk.sytes.net/atalk' port='7777' priority='100' type='proxy'/><candidate xmlns='urn:xmpp:jingle:transports:s5b:1' cid='R9PD848ESL9KUVIF' host='10.0.2.15' jid='abc123@atalk.sytes.net/atalk' port='7777' priority='100' type='proxy'/><candidate xmlns='urn:xmpp:jingle:transports:s5b:1' cid='2VVWG3ZTEW2L57Z6' host='42.60.99.4' jid='proxy.atalk.sytes.net/55238004' port='7777' priority='0' type='proxy'/></transport><security xmlns='urn:xmpp:jingle:jet:0' name='cont-LNSU2JHPJR7YBIZL' cipher='urn:xmpp:ciphers:aes-256-gcm-nopadding:0' type='eu.siacs.conversations.axolotl'><encrypted><header sid='646419288'><key rid='1201354019'>MwohBV+/wsXuwLlsJF9teNnr/8Qf7aW4RLb0TGWGTx7gQfY1EAQYBCIwmjIkgsC49uQP8qonfF0agbOdBsQOe2R8OWk3NaAq5A1gQRJg9LBZ/HYsR5wJIUSrySplzbLbp6s=</key><key prekey='true' rid='2028266418'>MwgaEiEFTNzLSATRaz15XmbGNW99qmT8a9zBo7E5IGmvCbGyZGAaIQV/iXNtFvWTc9FCFRZWKDFf9sFUvLBXNpJreYZymc6RNyJiMwohBbsaeoazry0RhxneaKLcYaP6lKvo/2/6aSTWklOVSCZTEAkYACIwtpKox6UR0f9wGEUgCi3LMZmASbKScucm8yA/h9TP3WuF6FUevbBdRnVpgmqJ1Jfwe8Qpzkdia80oADAB</key><key prekey='true' rid='660938212'>MwhdEiEFgv+XsDjR0XUzXgn7w5VUxrDf/GBhLM6eE862AK5h6FwaIQV/iXNtFvWTc9FCFRZWKDFf9sFUvLBXNpJreYZymc6RNyJiMwohBcv7payU2105XuyDq9bIYDWKoDXHRcSyEu4ro6dDlqoNEAkYACIweF4apqBvbT/3jenLfjvQab7kECXgBlgXeiHVym2vcrLTNna2EJkX7bKtyBixmDa+Wd7sRFIzj/IoADAB</key><key rid='1312485350'>MwohBUlErXh5tSitGfUM4QT7+/uhVDuo5B0AV9/13WN4tE9XEAcYACIwiqUQ/k3Xjbx02Fkra7/5c7K6tFYDS3h5lGi7UgT5H40E0EJqBzwN3cONav50fO5u7VypIepiQ+M=</key><key prekey='true' rid='459141212'>MwgXEiEFJxONGyq5CpoSBY7v0HPy4xZhdPH5mcEkuZfWoIOHhRwaIQV/iXNtFvWTc9FCFRZWKDFf9sFUvLBXNpJreYZymc6RNyJiMwohBVRKqiGYCNz6gbgG8ZT+y/Uek3JSoImvhC93e+vvZLI/EAkYACIwBu7odEW2tSYsdp1fVAALDv+QcqTvFB3Q0h46vrTZrtAk8fQVPy499i68xlVIW5YhL4zz346dXPkoADAB</key><key prekey='true' rid='1605373784'>MwgtEiEFlAx5Ae9wZbO5kU7mk0U41pw73WczOomWVf49GXRcfyUaIQV/iXNtFvWTc9FCFRZWKDFf9sFUvLBXNpJreYZymc6RNyJiMwohBXUcxaBEM1tjx2NV08Q5kxADIbzmmgcuUOfbfoLdkd0oEAkYACIwJLbfcnG8rJorrW3h5x4a27U1c4f5xmNJsdzPIN4CA95817P5MUJxRXKwP1KM2VhYLZ6/wpGlH58oADAB</key><iv>ScHj1EAMzda0+OFu</iv></header><payload>KeL2vf5m4O6DDeQy2Qf06lAl4qECtsG8PUFfVDJLrS+aMUUSbb68ES6kIQqmseI9p+7BYHnxaQHu1MRz</payload></encrypted></security></content></jingle></iq>: java.net.UnknownHostException: Unable to resolve host "fe80::bc17:dfff:fea5:c0fb%dummy0": No address associated with hostname
2022-11-10 09:14:02.098 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: java.lang.IllegalArgumentException: java.net.UnknownHostException: Unable to resolve host "fe80::bc17:dfff:fea5:c0fb%dummy0": No address associated with hostname
2022-11-10 09:14:02.098 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.minidns.util.InetAddressUtil.ipv6From(InetAddressUtil.java:41)
2022-11-10 09:14:02.098 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.jivesoftware.smack.util.InternetAddress$Ipv6.<init>(InternetAddress.java:137)
2022-11-10 09:14:02.098 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.jivesoftware.smack.util.InternetAddress$Ipv6.<init>(InternetAddress.java:132)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.jivesoftware.smack.util.InternetAddress.from(InternetAddress.java:73)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.jivesoftware.smackx.jingle.transports.jingle_s5b.elements.JingleS5BTransportCandidate$Builder.setHost(JingleS5BTransportCandidate.java:179)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.jivesoftware.smackx.jingle.transports.jingle_s5b.provider.JingleS5BTransportProvider.parse(JingleS5BTransportProvider.java:72)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.jivesoftware.smackx.jingle.transports.jingle_s5b.provider.JingleS5BTransportProvider.parse(JingleS5BTransportProvider.java:44)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.jivesoftware.smack.provider.Provider.parse(Provider.java:53)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.jivesoftware.smack.provider.Provider.parse(Provider.java:43)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.jivesoftware.smackx.jingle.provider.JingleProvider.parseJingleContent(JingleProvider.java:214)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.jivesoftware.smackx.jingle.provider.JingleProvider.parse(JingleProvider.java:100)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.jivesoftware.smackx.jingle.provider.JingleProvider.parse(JingleProvider.java:59)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.jivesoftware.smack.provider.IqProvider.parse(IqProvider.java:40)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.jivesoftware.smack.util.PacketParserUtils.parseIQ(PacketParserUtils.java:555)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.jivesoftware.smack.util.PacketParserUtils.parseStanza(PacketParserUtils.java:113)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.jivesoftware.smack.AbstractXMPPConnection.parseAndProcessStanza(AbstractXMPPConnection.java:1450)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$1000(XMPPTCPConnection.java:131)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:972)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$700(XMPPTCPConnection.java:916)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:939)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at java.lang.Thread.run(Thread.java:920)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: Caused by: java.net.UnknownHostException: Unable to resolve host "fe80::bc17:dfff:fea5:c0fb%dummy0": No address associated with hostname
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:156)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:103)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at java.net.InetAddress.getByName(InetAddress.java:1106)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at org.minidns.util.InetAddressUtil.ipv6From(InetAddressUtil.java:39)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: ... 20 more
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at libcore.io.Linux.android_getaddrinfo(Native Method)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:136)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at libcore.io.BlockGuardOs.android_getaddrinfo(BlockGuardOs.java:221)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:136)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:135)
2022-11-10 09:14:02.099 15453-15797/org.atalk.android W/(ProtocolProviderServiceJabberImpl.java:2190)#lambda$initSmackDefaultSettings$1: ... 23 more