Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
M4v3r1cK87 opened this issue Jul 14, 2015 · 7 comments
Closed

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

M4v3r1cK87 opened this issue Jul 14, 2015 · 7 comments
Assignees

Comments

@M4v3r1cK87
Copy link
Contributor

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: 06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net/Kontalk_Desktop
Jul 14, 2015 1:12:37 PM org.kontalk.system.Control setPresence
WARNING: (presence) can't find user with jid: 06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net/Kontalk_Desktop
Jul 14, 2015 1:12:37 PM org.kontalk.system.Control checkFingerprint
WARNING: (fingerprint) can't find user with jid:06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net
Jul 14, 2015 1:12:37 PM org.kontalk.system.Control checkFingerprint
WARNING: (fingerprint) can't find user with jid:06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net
Jul 14, 2015 1:12:49 PM org.kontalk.client.Client sendPacket
INFO: sent packet: <message to='e73ea3be23d0449597a82c62ed981f584a5c181b@beta.kontalk.net' 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='e73ea3be23d0449597a82c62ed981f584a5c181b@beta.kontalk.net' 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='e73ea3be23d0449597a82c62ed981f584a5c181b@beta.kontalk.net/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='06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net' from='45bb91905ce03f301d77811a3dd742c305606a3a@beta.kontalk.net/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='06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net' from='e73ea3be23d0449597a82c62ed981f584a5c181b@beta.kontalk.net/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='06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net' from='e73ea3be23d0449597a82c62ed981f584a5c181b@beta.kontalk.net/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)
@M4v3r1cK87
Copy link
Contributor Author

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: 06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net/Kontalk_Desktop
Jul 14, 2015 2:44:26 PM org.kontalk.system.Control checkFingerprint
WARNING: (fingerprint) can't find user with jid:06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net
Jul 14, 2015 2:44:26 PM org.kontalk.system.Control setPresence
WARNING: (presence) can't find user with jid: 06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net/Kontalk_Desktop
Jul 14, 2015 2:44:26 PM org.kontalk.system.Control checkFingerprint
WARNING: (fingerprint) can't find user with jid:06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net
Jul 14, 2015 2:44:26 PM org.kontalk.system.Control checkFingerprint
WARNING: (fingerprint) can't find user with jid:06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net
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='06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net' from='07de9159f0f18696946295b8912cd517c6f8c6a1@beta.kontalk.net/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='06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net' from='6e6ec94566bd22157f667c5297ae38351e001128@beta.kontalk.net/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='06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net' from='07de9159f0f18696946295b8912cd517c6f8c6a1@beta.kontalk.net/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).

@daniele-athome
Copy link
Member

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

@abika
Copy link
Member

abika commented Jul 14, 2015

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:...

@M4v3r1cK87
Copy link
Contributor Author

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

@abika
Copy link
Member

abika commented Jul 14, 2015

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

@abika
Copy link
Member

abika commented Jul 14, 2015

@M4v3r1cK87
Copy link
Contributor Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants