cmeng-git / atalk-android

xmpp/jabber client for android
Apache License 2.0
158 stars 60 forks source link

A/V calls fail #184

Closed ghost closed 3 years ago

ghost commented 3 years ago

Calling between two atlak instances works, but calling using dtls, to other clients or to another atalk with dtls enabled, I get the following error

Failed to create the call.
Invalid date string: Unparseable date: 
"ba`i`h` deebgGMT+00:00"

I have exernal services discovery for stun and turn according to conversations, but it too doesn't work. Is this an issue on my end?

cmeng-git commented 3 years ago

Please send me the aTalk debug log. It seems the problem came during key generation with unparseable date.

Look like aTalk has similar problem as: https://github.com/AzureAD/azure-activedirectory-library-for-android/issues/944

ghost commented 3 years ago

Sorry for the delay, here is the log: atalk-current-logcat.txt

cmeng-git commented 3 years ago

Based on your given debug log, below are the comments:

Your observed problem happens when aTalk is trying to generate the DTLS encryption keys of private and public keys for the DTLS call setup; where the current DateTime is required to be passed to bouncycastle.cert.X509v3CertificateBuilder. However the library bouncycastle used in aTalk is unable to parse your device local Time string i.e. "baiaafaf`fGMT+00:00". This causes the failure of the call setup.

Beside the above problem, I saw there are also many other exceptions occurred in the debug log; seems that it is also due to unparseable date.e.g.: Buddy last seen time etc

I expected that there would be many more problems arise due to unparseable device local Time string e.g. "baiaafaf`fGMT+00:00" in many third parties libraries used in aTalk; I see there is no simple solution to the problem.

'# I have external services discovery for stun and turn according to conversations, but it too doesn't work. Is this an issue on my end? Eng: Likely it is also due to unparseable time, but cannot confirm without the detail debug info.

By the way, did you try out Conversations xmpp client for DTLS call setup, was it working?

For all the observed problem, not sure if you can temporary switch your device system language to other e.g. English, to see if the problems go away.

=========== DTLS call setup failed ============== 

09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751): Failed to generate self-signed X.509 certificate
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751): java.lang.IllegalArgumentException: invalid date string: Unparseable date: "ba`ia`afaf`fGMT+00:00"
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at org.bouncycastle.asn1.ASN1UTCTime.<init>(Unknown Source:37)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at org.bouncycastle.asn1.DERUTCTime.<init>(Unknown Source:0)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at org.bouncycastle.asn1.x509.Time.<init>(Unknown Source:66)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at org.bouncycastle.cert.X509v3CertificateBuilder.<init>(Unknown Source:2)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at org.atalk.impl.neomedia.transform.dtls.DtlsControlImpl.generateX509Certificate(DtlsControlImpl.java:395)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at org.atalk.impl.neomedia.transform.dtls.DtlsControlImpl.generateCertificateInfo(DtlsControlImpl.java:315)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at org.atalk.impl.neomedia.transform.dtls.DtlsControlImpl.<init>(DtlsControlImpl.java:494)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at org.atalk.impl.neomedia.transform.dtls.DtlsControlImpl.<init>(DtlsControlImpl.java:470)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at org.atalk.impl.neomedia.MediaServiceImpl.createSrtpControl(MediaServiceImpl.java:619)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at net.java.sip.communicator.service.protocol.media.SrtpControls.getOrCreate(SrtpControls.java:63)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at net.java.sip.communicator.impl.protocol.jabber.CallPeerMediaHandlerJabberImpl.setDtlsEncryptionOnContent(CallPeerMediaHandlerJabberImpl.java:1884)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at net.java.sip.communicator.impl.protocol.jabber.CallPeerMediaHandlerJabberImpl.createContentList(CallPeerMediaHandlerJabberImpl.java:354)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at net.java.sip.communicator.impl.protocol.jabber.CallPeerJabberImpl.initiateSession(CallPeerJabberImpl.java:333)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at net.java.sip.communicator.impl.protocol.jabber.CallJabberImpl.initiateSession(CallJabberImpl.java:607)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at net.java.sip.communicator.impl.protocol.jabber.OperationSetBasicTelephonyJabberImpl.createOutgoingCall(OperationSetBasicTelephonyJabberImpl.java:381)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at net.java.sip.communicator.impl.protocol.jabber.OperationSetBasicTelephonyJabberImpl.createOutgoingCall(OperationSetBasicTelephonyJabberImpl.java:245)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at net.java.sip.communicator.impl.protocol.jabber.OperationSetBasicTelephonyJabberImpl.createOutgoingCall(OperationSetBasicTelephonyJabberImpl.java:217)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at net.java.sip.communicator.impl.protocol.jabber.OperationSetBasicTelephonyJabberImpl.createCall(OperationSetBasicTelephonyJabberImpl.java:127)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at net.java.sip.communicator.service.protocol.media.AbstractOperationSetBasicTelephony.createCall(AbstractOperationSetBasicTelephony.java:78)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at org.atalk.android.gui.call.CallManager.internalCall(CallManager.java:981)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at org.atalk.android.gui.call.CallManager.access$300(CallManager.java:43)
09-11 19:16:06.765 E/(DtlsControlImpl.java:406)#generateX509Certificate(17751):     at org.atalk.android.gui.call.CallManager$CreateCallThread.run(CallManager.java:902)
09-11 19:16:06.914 E/(OperationSetBasicTelephonyJabberImpl.java:402)#createOutgoingCall(17751): Initiate call session Exception: invalid date string: Unparseable date: "ba`ia`afaf`fGMT+00:00"
09-11 19:16:06.916 E/(CallManager.java:909)#run(17751): The call could not be created: 
09-11 19:16:06.916 E/(CallManager.java:909)#run(17751): net.java.sip.communicator.service.protocol.OperationFailedException: invalid date string: Unparseable date: "ba`ia`afaf`fGMT+00:00"
09-11 19:16:06.916 E/(CallManager.java:909)#run(17751):     at net.java.sip.communicator.impl.protocol.jabber.OperationSetBasicTelephonyJabberImpl.createOutgoingCall(OperationSetBasicTelephonyJabberImpl.java:403)
09-11 19:16:06.916 E/(CallManager.java:909)#run(17751):     at net.java.sip.communicator.impl.protocol.jabber.OperationSetBasicTelephonyJabberImpl.createOutgoingCall(OperationSetBasicTelephonyJabberImpl.java:245)
09-11 19:16:06.916 E/(CallManager.java:909)#run(17751):     at net.java.sip.communicator.impl.protocol.jabber.OperationSetBasicTelephonyJabberImpl.createOutgoingCall(OperationSetBasicTelephonyJabberImpl.java:217)
09-11 19:16:06.916 E/(CallManager.java:909)#run(17751):     at net.java.sip.communicator.impl.protocol.jabber.OperationSetBasicTelephonyJabberImpl.createCall(OperationSetBasicTelephonyJabberImpl.java:127)
09-11 19:16:06.916 E/(CallManager.java:909)#run(17751):     at net.java.sip.communicator.service.protocol.media.AbstractOperationSetBasicTelephony.createCall(AbstractOperationSetBasicTelephony.java:78)
09-11 19:16:06.916 E/(CallManager.java:909)#run(17751):     at org.atalk.android.gui.call.CallManager.internalCall(CallManager.java:981)
09-11 19:16:06.916 E/(CallManager.java:909)#run(17751):     at org.atalk.android.gui.call.CallManager.access$300(CallManager.java:43)
09-11 19:16:06.916 E/(CallManager.java:909)#run(17751):     at org.atalk.android.gui.call.CallManager$CreateCallThread.run(CallManager.java:902)

Exception in smack library with incorrect reported error message i.e. Connection failed: timeout; the reply time is only about 0.4 second and well within the timeout period.

=========== Exception in  getLastSeen ============
09-11 10:53:48.862 D/SMACK   ( 2393): SENT (0): 
09-11 10:53:48.862 D/SMACK   ( 2393): <iq to='test@dberry.example.org' id='6ETR7-35' type='get'>
09-11 10:53:48.862 D/SMACK   ( 2393):   <query xmlns='jabber:iq:last'/>
09-11 10:53:48.862 D/SMACK   ( 2393): </iq>
09-11 10:53:49.272 D/SMACK   ( 2393): <iq xml:lang='ar-SA' to='3li@tmpServer.net/atalk' from='test@dberry.example.org' type='error' id='6ETR7-35'>

09-11 10:53:49.272 D/SMACK   ( 2393): RECV (0): 
09-11 10:53:49.272 D/SMACK   ( 2393): <iq xml:lang='ar-SA' to='3li@tmpServer.net/atalk' from='test@dberry.example.org' type='error' id='6ETR7-35'>
09-11 10:53:49.272 D/SMACK   ( 2393):   <query xmlns='jabber:iq:last'/>
09-11 10:53:49.272 D/SMACK   ( 2393):   <error code='504' type='wait'>
09-11 10:53:49.272 D/SMACK   ( 2393):     <remote-server-timeout xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
09-11 10:53:49.272 D/SMACK   ( 2393):     <text xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>
09-11 10:53:49.272 D/SMACK   ( 2393):       Connection failed: timeout
09-11 10:53:49.272 D/SMACK   ( 2393):     </text>
09-11 10:53:49.272 D/SMACK   ( 2393):   </error>
09-11 10:53:49.272 D/SMACK   ( 2393): </iq>
09-11 10:53:49.276 D/SMACK   ( 2393): RECV (0): 
09-11 10:53:49.276 D/SMACK   ( 2393): <r xmlns='urn:xmpp:sm:3'/>
09-11 10:53:49.277 W/(ChatActivity.java:853)#lambda$getLastSeen$1$ChatActivity( 2393): Exception in getLastSeen XMPP error reply received from test@dberry.example.org: XMPPError: remote-server-timeout - wait [Connection failed: timeout]
==========  Exception in omemo support checking ==========
09-11 10:53:57.311 D/SMACK   ( 2393): SENT (0): 
09-11 10:53:57.311 D/SMACK   ( 2393): <iq to='test@dberry.example.org' id='2946F-20' type='get'>
09-11 10:53:57.311 D/SMACK   ( 2393):   <query xmlns='http://jabber.org/protocol/disco#info'>
09-11 10:53:57.311 D/SMACK   ( 2393):   </query>
09-11 10:53:57.311 D/SMACK   ( 2393): </iq>
09-11 10:53:57.349 D/SMACK   ( 2393): SENT (0): 
09-11 10:53:57.349 D/SMACK   ( 2393): <iq to='test@dberry.example.org' id='2946F-21' type='get'>
09-11 10:53:57.349 D/SMACK   ( 2393):   <query xmlns='http://jabber.org/protocol/disco#info'>
09-11 10:53:57.349 D/SMACK   ( 2393):   </query>
09-11 10:53:57.349 D/SMACK   ( 2393): </iq>
09-11 10:53:57.576 D/SMACK   ( 2393): RECV (0): 
09-11 10:53:57.576 D/SMACK   ( 2393): <iq xml:lang='ar-SA' to='3li@tmpServer.net/atalk' from='test@dberry.example.org' type='error' id='2946F-20'>
09-11 10:53:57.576 D/SMACK   ( 2393):   <query xmlns='http://jabber.org/protocol/disco#info'/>
09-11 10:53:57.576 D/SMACK   ( 2393):   <error code='504' type='wait'>
09-11 10:53:57.576 D/SMACK   ( 2393):     <remote-server-timeout xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
09-11 10:53:57.576 D/SMACK   ( 2393):     <text xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>
09-11 10:53:57.576 D/SMACK   ( 2393):       Connection failed: timeout
09-11 10:53:57.576 D/SMACK   ( 2393):     </text>
09-11 10:53:57.576 D/SMACK   ( 2393):   </error>
09-11 10:53:57.576 D/SMACK   ( 2393): </iq>
09-11 10:53:57.582 W/(CryptoFragment.java:986)#run( 2393): Exception in omemo support checking: XMPP error reply received from test@dberry.example.org: XMPPError: remote-server-timeout - wait [Connection failed: timeout]
ghost commented 3 years ago

Changing the language to english solved calling from atalk. However conversations is still not working. Calls between two conversation instances never connects. Calling from conversations to atalk gives the following

Error: Attempt to invoke virtual method 'org.atalk.service.neomedia.device.MediaDevice
net.java.sip.communicator.service.protocol.media.MediaAwareCall.getDefaultDevice
(org.atalk.util.MediaType)' on a null object reference
cmeng-git commented 3 years ago

The observed error message is because Conversations terminated the call session; believe the problem lies within Conversations implementations.

Please refer to the following for more info on aTalk/Conversation media call compatibility a. Call compatibility with Conversations #140 b. Conversations v2.8.7 media call compatibility with aTalk v2.3.0 #3788

If the video call is initiated from aTalk, the call is setup successfully on aTalk. But the video stream is terminated by Conversations mid way through the call ; and Conversations crashes.

The audio is working with Conversations; only the call is initiated from aTalk. The same transport handling problem on Conversations happens when the call is initiated from Conversations.

Following are the debug messages captured on Conversations if video call is initiated from Conversations (due to problem as stated in the following comment) https://github.com/cmeng-git/atalk-android/issues/140#issuecomment-642320208

2021-09-13 10:58:17.300 31321-32169/eu.siacs.conversations W/libEGL: EGLNativeWindowType 0xe7ea4808 disconnect failed
2021-09-13 10:58:17.302 31321-31321/eu.siacs.conversations D/SurfaceView: destroy() Surface(name=SurfaceView - eu.siacs.conversations/eu.siacs.conversations.ui.RtpSessionActivity@184558c@0[31321])/@0xb4ae743 eu.siacs.conversations.ui.widget.SurfaceViewRenderer{184558c G.E...... ......I. 720,516-1008,900 #7f0901ae app:id/local_video}
2021-09-13 10:58:17.303 31321-31321/eu.siacs.conversations I/org.webrtc.Logging: EglRenderer: local_videoReleasing.
2021-09-13 10:58:17.304 31321-32169/eu.siacs.conversations E/libEGL: call to OpenGL ES API with no current context (logged once per thread)
2021-09-13 10:58:17.304 31321-32169/eu.siacs.conversations I/org.webrtc.Logging: GlShader: Deleting shader.
2021-09-13 10:58:17.304 31321-32169/eu.siacs.conversations I/org.webrtc.Logging: EglRenderer: local_videoeglBase detach and release.
2021-09-13 10:58:17.305 31321-32169/eu.siacs.conversations I/org.webrtc.Logging: EglRenderer: local_videoQuitting render thread.
2021-09-13 10:58:17.306 31321-31321/eu.siacs.conversations I/org.webrtc.Logging: EglRenderer: local_videoReleasing done.
2021-09-13 10:58:17.307 31321-31321/eu.siacs.conversations I/org.webrtc.Logging: EglRenderer: remote_videoReleasing.
2021-09-13 10:58:17.308 31321-31321/eu.siacs.conversations I/org.webrtc.Logging: EglRenderer: remote_videoAlready released
2021-09-13 10:58:17.336 31321-31321/eu.siacs.conversations D/ViewRootImpl@d8dc019[RtpSessionActivity]: Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x1 surface={true 3398850560} changed=false
2021-09-13 10:58:18.417 31321-31352/eu.siacs.conversations D/conversations: unable to route jingle packet: <iq type="set" xml:lang="en" xmlns="jabber:client" id="QRP1R-43" from="swordfish@atalk.sytes.net/atalk" to="parrot@atalk.sytes.net/Conversations.lxYf"><jingle sid="to+rPlaeGYe++3niyWFiOA" action="transport-info" xmlns="urn:xmpp:jingle:1"><content name="0" creator="initiator" senders="initiator" xmlns="urn:xmpp:jingle:1"><transport pwd="4ltbklnj6cv2b33nt9b6m7n2h1" ufrag="cjuf01ffehe4p0" xmlns="urn:xmpp:jingle:transports:ice-udp:1"><rtcp-mux xmlns="urn:xmpp:jingle:transports:ice-udp:1"/><candidate port="5002" component="1" foundation="1" priority="2130706431" type="host" network="0" generation="0" ip="fe80::1004:3eff:fe07:ba63" protocol="udp" xmlns="urn:xmpp:jingle:transports:ice-udp:1" id="17"/><candidate port="5002" component="1" foundation="2" priority="2130706431" type="host" network="0" generation="0" ip="192.168.1.167" protocol="udp" xmlns="urn:xmpp:jingle:transports:ice-udp:1" id="18"/><candidate port="5002" component="1" foundation="3" priority="2113932031" type="host" network="0" generation="0" ip="10.231.13.85" protocol="udp" xmlns="urn:xmpp:jingle:transports:ice-udp:1" id="19"/></transport></content></jingle></iq>
2021-09-13 10:58:18.438 31321-32159/eu.siacs.conversations I/org.webrtc.Logging: Camera2Session: Stop done
2021-09-13 10:58:18.439 31321-32159/eu.siacs.conversations I/org.webrtc.Logging: Camera2Session: Camera device closed.
2021-09-13 10:58:18.627 31321-31352/eu.siacs.conversations D/conversations: unable to route jingle packet: <iq type="set" xml:lang="en" xmlns="jabber:client" id="QRP1R-45" from="swordfish@atalk.sytes.net/atalk" to="parrot@atalk.sytes.net/Conversations.lxYf"><jingle sid="to+rPlaeGYe++3niyWFiOA" action="transport-info" xmlns="urn:xmpp:jingle:1"><content name="1" creator="initiator" xmlns="urn:xmpp:jingle:1"><transport pwd="4ltbklnj6cv2b33nt9b6m7n2h1" ufrag="cjuf01ffehe4p0" xmlns="urn:xmpp:jingle:transports:ice-udp:1"><rtcp-mux xmlns="urn:xmpp:jingle:transports:ice-udp:1"/><candidate port="5003" component="1" foundation="1" priority="2130706431" type="host" network="0" generation="0" ip="fe80::1004:3eff:fe07:ba63" protocol="udp" xmlns="urn:xmpp:jingle:transports:ice-udp:1" id="20"/><candidate port="5003" component="1" foundation="2" priority="2130706431" type="host" network="0" generation="0" ip="192.168.1.167" protocol="udp" xmlns="urn:xmpp:jingle:transports:ice-udp:1" id="21"/><candidate port="5003" component="1" foundation="3" priority="2113932031" type="host" network="0" generation="0" ip="10.231.13.85" protocol="udp" xmlns="urn:xmpp:jingle:transports:ice-udp:1" id="22"/></transport></content></jingle></iq>
2021-09-13 10:58:19.167 31321-31352/eu.siacs.conversations D/conversations: unable to route jingle packet: <iq type="set" xml:lang="en" xmlns="jabber:client" id="QRP1R-47" from="swordfish@atalk.sytes.net/atalk" to="parrot@atalk.sytes.net/Conversations.lxYf"><jingle sid="to+rPlaeGYe++3niyWFiOA" action="session-info" xmlns="urn:xmpp:jingle:1"><ringing xmlns="urn:xmpp:jingle:apps:rtp:info:1"/></jingle></iq>
2021-09-13 10:58:19.478 31321-31352/eu.siacs.conversations D/conversations: unable to route jingle packet: <iq type="set" xml:lang="en" xmlns="jabber:client" id="QRP1R-48" from="swordfish@atalk.sytes.net/atalk" to="parrot@atalk.sytes.net/Conversations.lxYf"><jingle sid="to+rPlaeGYe++3niyWFiOA" action="session-terminate" xmlns="urn:xmpp:jingle:1"><reason xmlns="urn:xmpp:jingle:1"><incompatible-parameters xmlns="urn:xmpp:jingle:1"/><text xmlns="urn:xmpp:jingle:1">Error: Attempt to invoke virtual method &apos;org.atalk.service.neomedia.device.MediaDevice net.java.sip.communicator.service.protocol.media.MediaAwareCall.getDefaultDevice(org.atalk.util.MediaType)&apos; on a null object reference</text></reason></jingle></iq>
2021-09-13 10:58:19.506 31321-31352/eu.siacs.conversations D/conversations: unable to route jingle packet: <iq type="set" xml:lang="en" xmlns="jabber:client" id="QRP1R-49" from="swordfish@atalk.sytes.net/atalk" to="parrot@atalk.sytes.net/Conversations.lxYf"><jingle sid="to+rPlaeGYe++3niyWFiOA" action="session-terminate" xmlns="urn:xmpp:jingle:1"><reason xmlns="urn:xmpp:jingle:1"><failed-application xmlns="urn:xmpp:jingle:1"/><text xmlns="urn:xmpp:jingle:1">Error: Attempt to invoke virtual method &apos;org.atalk.service.neomedia.device.MediaDevice net.java.sip.communicator.service.protocol.media.MediaAwareCall.getDefaultDevice(org.atalk.util.MediaType)&apos; on a null object reference</text></reason></jingle></iq>
2021-09-13 10:58:19.697 31321-31448/eu.siacs.conversations D/conversations: eu.siacs.conversations.xmpp.jingle.ToneManager: putting AudioManager back into normal mode
2021-09-13 10:58:19.710 31321-31345/eu.siacs.conversations D/AudioTrack: stop() called with 120960 frames delivered
2021-09-13 10:58:19.727 31321-31448/eu.siacs.conversations D/AudioManager: setSpeakerphoneOn false
2021-09-13 10:58:20.411 31321-31352/eu.siacs.conversations D/conversations: unable to route jingle packet: <iq type="set" xml:lang="en" xmlns="jabber:client" id="QRP1R-51" from="swordfish@atalk.sytes.net/atalk" to="parrot@atalk.sytes.net/Conversations.lxYf"><jingle sid="to+rPlaeGYe++3niyWFiOA" action="session-terminate" xmlns="urn:xmpp:jingle:1"><reason xmlns="urn:xmpp:jingle:1"><incompatible-parameters xmlns="urn:xmpp:jingle:1"/><text xmlns="urn:xmpp:jingle:1">Error: Attempt to invoke virtual method &apos;org.atalk.service.neomedia.device.MediaDevice net.java.sip.communicator.service.protocol.media.MediaAwareCall.getDefaultDevice(org.atalk.util.MediaType)&apos; on a null object reference</text></reason></jingle></iq>
cmeng-git commented 3 years ago

By the way, what was the device initial system locale when problem happened. I try to use online google translate to detect the string "baiaafaf`fGMT+00:00", it too failed to detect the locale or to translate properly

Was the last seen time info of an offline buddy shown correctly when you open the chat session? e.g. 1/12/21 11:07AM

ghost commented 3 years ago

The device locale was arabic. The offline buddy was propably right as I was testing different clients and constantly disconnecting.

cmeng-git commented 3 years ago

The reason I asked the Last-seen status info while the device is installed with locale Arabic, is that I was wondering why smack library throws exceptions when all the replied stanzas are well within the 5-second timeout period.

With reference to your previous debug log, I see that you are testing between 2 users account on 2 difference domains i.e. berry.example.org and tempserver.net (servers name modified for discussion).

When you start a omemo chat session with 'test@berry.example.org', aTalk will check with the buddy,s for last seen status and omemo capable support. I see that all the replied stanzas throws . I am not sure why these happened. Did you ever successfully perform an omemo chat session between the two test accounts, in either one of the two devices system locales i.e. Arabic or English. Does any of the two server is your own test server?

When you start a omemo chat session with an offline buddy, the toolbar status will show the buddy last active time e.g. lastseen

============== smack <error code='504' type='wait'> ========
09-11 10:53:48.862 D/SMACK   ( 2393): SENT (0): 
09-11 10:53:48.862 D/SMACK   ( 2393): <iq to='test@berry.example.org' id='6ETR7-35' type='get'>
09-11 10:53:48.862 D/SMACK   ( 2393):   <query xmlns='jabber:iq:last'/>
09-11 10:53:48.862 D/SMACK   ( 2393): </iq>
09-11 10:53:48.985 D/SMACK   ( 2393): SENT (0): 
09-11 10:53:48.985 D/SMACK   ( 2393): <iq to='test@berry.example.org' id='2946F-17' type='get'>
09-11 10:53:48.985 D/SMACK   ( 2393):   <query xmlns='http://jabber.org/protocol/disco#info' node='eu.siacs.conversations.axolotl.devicelist'>
09-11 10:53:48.985 D/SMACK   ( 2393):   </query>
09-11 10:53:48.985 D/SMACK   ( 2393): </iq>
09-11 10:53:49.272 D/SMACK   ( 2393): RECV (0): 
09-11 10:53:49.272 D/SMACK   ( 2393): <iq xml:lang='ar-SA' to='3li@tempserver.net/atalk' from='test@berry.example.org' type='error' id='6ETR7-35'>
09-11 10:53:49.272 D/SMACK   ( 2393):   <query xmlns='jabber:iq:last'/>
09-11 10:53:49.272 D/SMACK   ( 2393):   <error code='504' type='wait'>
09-11 10:53:49.272 D/SMACK   ( 2393):     <remote-server-timeout xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
09-11 10:53:49.272 D/SMACK   ( 2393):     <text xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>
09-11 10:53:49.272 D/SMACK   ( 2393):       Connection failed: timeout
09-11 10:53:49.272 D/SMACK   ( 2393):     </text>
09-11 10:53:49.272 D/SMACK   ( 2393):   </error>
09-11 10:53:49.272 D/SMACK   ( 2393): </iq>
09-11 10:53:49.276 D/SMACK   ( 2393): RECV (0): 
09-11 10:53:49.277 W/(ChatActivity.java:853)#lambda$getLastSeen$1$ChatActivity( 2393): Exception in getLastSeen XMPP error reply received from test@berry.example.org: XMPPError: remote-server-timeout - wait [Connection failed: timeout]
09-11 10:53:49.389 D/SMACK   ( 2393): RECV (0): 
09-11 10:53:49.389 D/SMACK   ( 2393): <iq xml:lang='ar-SA' to='3li@tempserver.net/atalk' from='test@berry.example.org' type='error' id='2946F-17'>
09-11 10:53:49.389 D/SMACK   ( 2393):   <query xmlns='http://jabber.org/protocol/disco#info' node='eu.siacs.conversations.axolotl.devicelist'/>
09-11 10:53:49.389 D/SMACK   ( 2393):   <error code='504' type='wait'>
09-11 10:53:49.389 D/SMACK   ( 2393):     <remote-server-timeout xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
09-11 10:53:49.389 D/SMACK   ( 2393):     <text xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>
09-11 10:53:49.389 D/SMACK   ( 2393):       Connection failed: timeout
09-11 10:53:49.389 D/SMACK   ( 2393):     </text>
09-11 10:53:49.389 D/SMACK   ( 2393):   </error>
09-11 10:53:49.389 D/SMACK   ( 2393): </iq>
09-11 10:53:49.396 W/(CryptoFragment.java:986)#run( 2393): Exception in omemo support checking: XMPP error reply received from test@berry.example.org: XMPPError: remote-server-timeout - wait [Connection failed: timeout]

09-11 10:53:57.009 D/SMACK   ( 2393): SENT (0): 
09-11 10:53:57.009 D/SMACK   ( 2393): <iq to='test@berry.example.org' id='2946F-19' type='get'>
09-11 10:53:57.009 D/SMACK   ( 2393):   <query xmlns='http://jabber.org/protocol/disco#info'>
09-11 10:53:57.009 D/SMACK   ( 2393):   </query>
09-11 10:53:57.009 D/SMACK   ( 2393): </iq>
09-11 10:53:57.275 D/SMACK   ( 2393): RECV (0): 
09-11 10:53:57.275 D/SMACK   ( 2393): <iq xml:lang='ar-SA' to='3li@tempserver.net/atalk' from='test@berry.example.org' type='error' id='2946F-19'>
09-11 10:53:57.275 D/SMACK   ( 2393):   <query xmlns='http://jabber.org/protocol/disco#info'/>
09-11 10:53:57.275 D/SMACK   ( 2393):   <error code='504' type='wait'>
09-11 10:53:57.275 D/SMACK   ( 2393):     <remote-server-timeout xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
09-11 10:53:57.275 D/SMACK   ( 2393):     <text xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>
09-11 10:53:57.275 D/SMACK   ( 2393):       Connection failed: timeout
09-11 10:53:57.275 D/SMACK   ( 2393):     </text>
09-11 10:53:57.275 D/SMACK   ( 2393):   </error>
09-11 10:53:57.275 D/SMACK   ( 2393): </iq>
09-11 10:53:57.283 W/(ChatRoomJabberImpl.java:2485)#isPersistent( 2393): could not get persistent state for room 'test@berry.example.org':XMPP error reply received from test@berry.example.org: XMPPError: remote-server-timeout - wait [Connection failed: timeout]
ghost commented 3 years ago

The berry domain is self hosted. I have succesfully used omemo between berry users and tempserver in both arabic and english. I just checked and I do get last active time on offline accounts.

cmeng-git commented 3 years ago

BountyCastle libaries cannot support Arabic local time format i.e. "baiaafaf`fGMT+00:00".