Skip to content

[Windows] - Unknown contact and send/receive exception #33

Description

@M4v3r1cK87

Hello,
I trying the new version 3.0 of the desktop client using the "KontalkDesktopApp.jar".

I have imported successfully all the keys exported by the app but, when the application start and download all the list of contacts, some are "Unknown".

OK for the Unknown contacts but when i try to send a message to an Know user, i receive an exception :

Jul 14, 2015 1:12:37 PM org.kontalk.system.Control setPresence
WARNING: (presence) can't find user with jid: [email protected]/Kontalk_Desktop
Jul 14, 2015 1:12:37 PM org.kontalk.system.Control setPresence
WARNING: (presence) can't find user with jid: [email protected]/Kontalk_Desktop
Jul 14, 2015 1:12:37 PM org.kontalk.system.Control checkFingerprint
WARNING: (fingerprint) can't find user with jid:[email protected]
Jul 14, 2015 1:12:37 PM org.kontalk.system.Control checkFingerprint
WARNING: (fingerprint) can't find user with jid:[email protected]
Jul 14, 2015 1:12:49 PM org.kontalk.client.Client sendPacket
INFO: sent packet: <message to='[email protected]' id='7h2h8-118' type='chat'><composing xmlns='http://jabber.org/protocol/chatstates'/></message>
Jul 14, 2015 1:12:49 PM org.kontalk.client.AcknowledgedListener processPacket
INFO: got acknowledgement for message: <message to='[email protected]' id='7h2h8-118' type='chat'><composing xmlns='http://jabber.org/p
rotocol/chatstates'/></message>
Jul 14, 2015 1:12:50 PM org.kontalk.crypto.Coder processOutMessage
INFO: encrypting message...
Jul 14, 2015 1:12:50 PM org.kontalk.crypto.Coder processOutMessage
WARNING: can't encrypt message
org.bouncycastle.openpgp.PGPException: cannot recognise keyAlgorithm: 18
        at org.bouncycastle.openpgp.operator.bc.BcImplProvider.createSigner(Unknown Source)
        at org.bouncycastle.openpgp.operator.bc.BcPGPContentSignerBuilder.build(Unknown Source)
        at org.bouncycastle.openpgp.PGPSignatureGenerator.init(Unknown Source)
        at org.kontalk.crypto.Coder.processOutMessage(Coder.java:218)
        at org.kontalk.client.Client.sendMessage(Client.java:229)
        at org.kontalk.system.Control.sendMessage(Control.java:510)
        at org.kontalk.system.Control.sendText(Control.java:172)
        at org.kontalk.view.View.callSendText(View.java:511)
        at org.kontalk.view.View.access$400(View.java:108)
        at org.kontalk.view.View$3.actionPerformed(View.java:169)
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at javax.swing.AbstractButton.doClick(Unknown Source)
        at com.alee.managers.hotkey.ButtonHotkeyRunnable.run(ButtonHotkeyRunnable.java:47)
        at com.alee.utils.SwingUtils.invokeLater(SwingUtils.java:2367)
        at com.alee.managers.hotkey.HotkeyManager.processHotkeys(HotkeyManager.java:222)
        at com.alee.managers.hotkey.HotkeyManager$1.eventDispatched(HotkeyManager.java:116)
        at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Unknown Source)
        at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
        at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
        at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
        at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
        at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
        at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
        at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
        at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
        at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
        at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
        at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
        at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
        at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
        at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
        at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
        at java.awt.Toolkit.notifyAWTEventListeners(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
        at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
        at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
        at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
        at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$500(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

Jul 14, 2015 1:12:50 PM org.kontalk.client.Client sendMessage
WARNING: encryption failed, not sending message

The messages are not sent and remain in the chat with the red exclamation mark and the detail is:
Security : Decrypted / Signed
Problems : Unknown Error

Also when receive a message, the message is delivery to the kontalk android app but in the desktop app not appear. Receive the error :

Jul 14, 2015 1:15:40 PM org.kontalk.client.AcknowledgedListener processPacket
INFO: got acknowledgement for message: <message to='[email protected]/eb2e56271013472f' id='7h2h8-126' type='chat'><received xmlns='urn
:xmpp:receipts' id='7oKEX54H8eVzUMtyoCLJBzYzYrS2o5'/></message>
Jul 14, 2015 1:15:43 PM org.kontalk.client.PresenceListener processPacket
INFO: got presence packet: <presence to='[email protected]' from='[email protected]/c50dd795f13
4343c' id='Cott1-18' type='unavailable'><pubkey xmlns='urn:xmpp:pubkey:2'><print>91CCA2786C660B92474F28B88210963CFCD849BC</print></pubkey></presence>
Jul 14, 2015 1:15:45 PM org.kontalk.client.KonMessageListener processChatMessage
INFO: got message: <message to='[email protected]' from='[email protected]/eb2e56271013472f' ty
pe='chat'><composing xmlns='http://jabber.org/protocol/chatstates'/></message>
Jul 14, 2015 1:15:45 PM org.kontalk.client.KonMessageListener processChatMessage
INFO: got chatstate: composing
Jul 14, 2015 1:16:00 PM org.kontalk.client.KonMessageListener processChatMessage
INFO: got message: <message to='[email protected]' from='[email protected]/eb2e56271013472f' id
='I9K99We2RhuBOknMig5qnnK6PAtG84' type='chat'><body>(encrypted)</body><e2e xmlns='urn:ietf:params:xml:ns:xmpp-e2e'>hH4DEYsbzuVafHoSAgME1U62ca...
Jul 14, 2015 1:16:00 PM org.kontalk.client.KonMessageListener processChatMessage
INFO: got chatstate: active
Jul 14, 2015 1:16:00 PM org.kontalk.client.KonMessageListener parseMessageContent
INFO: message contains encryption and body (ignoring body): (encrypted)
Jul 14, 2015 1:16:00 PM org.kontalk.crypto.Coder processInMessage
INFO: decrypting encrypted message...
Jul 14, 2015 1:16:00 PM org.jivesoftware.smack.AbstractXMPPConnection$3 run
SEVERE: Exception in async packet listener
java.lang.ClassCastException: org.bouncycastle.crypto.params.RSAKeyParameters cannot be cast to org.bouncycastle.crypto.params.ECPublicKeyParameters
        at org.bouncycastle.crypto.signers.ECDSASigner.init(Unknown Source)
        at org.bouncycastle.crypto.signers.DSADigestSigner.init(Unknown Source)
        at org.bouncycastle.openpgp.operator.bc.BcPGPContentVerifierBuilderProvider$BcPGPContentVerifierBuilder.build(Unknown Source)
        at org.bouncycastle.openpgp.PGPOnePassSignature.init(Unknown Source)
        at org.kontalk.crypto.Coder.decryptAndVerify(Coder.java:510)
        at org.kontalk.crypto.Coder.processInMessage(Coder.java:290)
        at org.kontalk.system.Control.decryptAndDownload(Control.java:312)
        at org.kontalk.system.Control.newInMessage(Control.java:302)
        at org.kontalk.client.KonMessageListener.processChatMessage(KonMessageListener.java:160)
        at org.kontalk.client.KonMessageListener.processPacket(KonMessageListener.java:69)
        at org.jivesoftware.smack.AbstractXMPPConnection$3.run(AbstractXMPPConnection.java:1101)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

unknown

My OS and Java versions are:

Microsoft Windows [Versione 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Tutti i diritti riservati.
C:\Users\valerio>java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

Activity

  1. M4v3r1cK87 commented on Jul 14, 2015

    @M4v3r1cK87
    ContributorAuthor

    I have closed and reopened the client and now see old message received as crypted (before exit this message don't appear).

    crypted

    If I try to decript this message an error appear.

    Jul 14, 2015 2:44:26 PM org.kontalk.system.Control setPresence
    WARNING: (presence) can't find user with jid: [email protected]/Kontalk_Desktop
    Jul 14, 2015 2:44:26 PM org.kontalk.system.Control checkFingerprint
    WARNING: (fingerprint) can't find user with jid:[email protected]
    Jul 14, 2015 2:44:26 PM org.kontalk.system.Control setPresence
    WARNING: (presence) can't find user with jid: [email protected]/Kontalk_Desktop
    Jul 14, 2015 2:44:26 PM org.kontalk.system.Control checkFingerprint
    WARNING: (fingerprint) can't find user with jid:[email protected]
    Jul 14, 2015 2:44:26 PM org.kontalk.system.Control checkFingerprint
    WARNING: (fingerprint) can't find user with jid:[email protected]
    Jul 14, 2015 2:44:31 PM org.kontalk.crypto.Coder processInMessage
    INFO: decrypting encrypted message...
    Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: org.bouncycastle.crypto.params.RSAKeyParameters cannot be cast to org.bouncycastle.crypto.params.ECPublicK
    eyParameters
            at org.bouncycastle.crypto.signers.ECDSASigner.init(Unknown Source)
            at org.bouncycastle.crypto.signers.DSADigestSigner.init(Unknown Source)
            at org.bouncycastle.openpgp.operator.bc.BcPGPContentVerifierBuilderProvider$BcPGPContentVerifierBuilder.build(Unknown Source)
            at org.bouncycastle.openpgp.PGPOnePassSignature.init(Unknown Source)
            at org.kontalk.crypto.Coder.decryptAndVerify(Coder.java:510)
            at org.kontalk.crypto.Coder.processInMessage(Coder.java:290)
            at org.kontalk.system.Control.decryptAndDownload(Control.java:312)
            at org.kontalk.view.View.callDecrypt(View.java:520)
            at org.kontalk.view.ThreadView$MessageList$MessageItem$1.actionPerformed(ThreadView.java:675)
            at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
            at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
            at javax.swing.AbstractButton.doClick(Unknown Source)
            at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
            at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
            at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
            at java.awt.Component.processMouseEvent(Unknown Source)
            at javax.swing.JComponent.processMouseEvent(Unknown Source)
            at java.awt.Component.processEvent(Unknown Source)
            at java.awt.Container.processEvent(Unknown Source)
            at java.awt.Component.dispatchEventImpl(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Window.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
            at java.awt.EventQueue.access$500(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
            at java.awt.EventQueue$4.run(Unknown Source)
            at java.awt.EventQueue$4.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
            at java.awt.EventQueue.dispatchEvent(Unknown Source)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.run(Unknown Source)
    Jul 14, 2015 2:44:48 PM org.kontalk.client.PresenceListener processPacket
    INFO: got presence packet: <presence to='[email protected]' from='[email protected]/cf456655d4e
    6a1ac' id='SYF55-515'><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.kontalk.org/' ver='none'/><pubkey xmlns='urn:xmpp:pubkey:2'><print>BB1C7347EB348
    409DA7F9C5AB50E00550FAE76CC</print></pubkey></presence>
    Jul 14, 2015 2:46:00 PM org.kontalk.client.PresenceListener processPacket
    INFO: got presence packet: <presence to='[email protected]' from='[email protected]/4b4e69e108c
    a08a' id='R7z9z-5'><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.kontalk.org/' ver='none'/><pubkey xmlns='urn:xmpp:pubkey:2'><print>EC615752792767EA
    276F38CF06C85AD254B0A3C4</print></pubkey></presence>
    Jul 14, 2015 2:46:39 PM org.kontalk.client.PresenceListener processPacket
    INFO: got presence packet: <presence to='[email protected]' from='[email protected]/cf456655d4e
    6a1ac' id='SYF55-515' type='unavailable'><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.kontalk.org/' ver='none'/><pubkey xmlns='urn:xmpp:pubkey:2'><
    print>BB1C7347EB348409DA7F9C5AB50E00550FAE76CC</print></pubkey></presence>
    

    Edit : The new messages (encrypted) seems to be the message that I received in the android app and in the desktop client, but also specified in the first message, the desktop client go to exception and not receive/show immediately the message. Only if close and reopen the desktop client, the message are showed into chat (but is crypted).

  2. daniele-athome commented on Jul 14, 2015

    @daniele-athome
    Member

    @abika this might be related to the new encryption method?

  3. added 2 commits that reference this issue on Jul 14, 2015
    64d1614
    18e0a14
  4. abika commented on Jul 14, 2015

    @abika
    Member

    Thanks for the detailed report. These were two bugs, both related to the new key structure.

    I'll publish a new release, then you will also be able to decrypt the messages already received.

    About the "Unknown" contacts: Please continue here: #11 . Do you have the public keys for these contacts? If you update the keys (Contacts->Right click->Edit Contact->update button), what log messages do you get? Specially those starting with INFO: full UID in key:...

  5. M4v3r1cK87 commented on Jul 14, 2015

    @M4v3r1cK87
    ContributorAuthor

    Hello @abika
    about this error there are another some problem (i don't know if is related to this).

    If I receive a message to the desktop app but there is an error, the log show me the exception but not the application : in this example I receive a message from this user, the message is received but the application cannot decrypt this, so the application not showing the message.

    message not receive

    But if in case that I close and reopen the application, the message appear :
    message received

  6. abika commented on Jul 14, 2015

    @abika
    Member

    yes, the exception is not catched. Already fixed in repository

  7. abika commented on Jul 14, 2015

    @abika
    Member
  8. M4v3r1cK87 commented on Jul 15, 2015

    @M4v3r1cK87
    ContributorAuthor

    Hi @abika
    now seems that all works correctly. Perfect ! You can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions