kontalk / desktopclient-java

Kontalk official platform independent desktop client
https://www.kontalk.org
GNU General Public License v3.0
57 stars 24 forks source link

Contacts shown as <unknown> #11

Closed webratte closed 9 years ago

webratte commented 9 years ago

Used Kontalkversion 0.01b1

There should be a way to show names of contacts. Maybe a in Java Desktopclient integrated adressbook with phonenumbers (imported from Android phone?) So you could match the hashes of the phonenumbers.

abika commented 9 years ago

The names are set from the (automatically transmitted) public keys of each contact. Have you received the keys (Contact->Edit->"Encryption Key: Available")?

If you have the keys but the display names did not change something is wrong (I worked on the parsing recently)

webratte commented 9 years ago

Yes, Encryption Keys are available. See also the screenshot. contact-issue

abika commented 9 years ago

ok, that's strange. I just tested is and it is working for me (as always...). Can you post the output of $gpg ~/.kontalk/kontalk-public.asc ? Should look like this (cut the address for privacy):

pub  rsa2048/4C3668B1 2015-01-06
uid                            Alex_tigase (NO COMMENT) <374b04dfa548f8b79....@beta.kontalk.net>
sub  rsa2048/346A72E2 2015-01-06
webratte commented 9 years ago

Sorry, I'm not sure what to do. I use Kubuntu and copied "$gpg ~/.kontalk/kontalk-public.asc" into the Terminal as root. There comes a errormessage: "sudo: /home/MyName/.kontalk/kontalk-public.asc: command not found". I have searched for kontalk-public.asc but I can't find it. The folder on my Computer for the Desktopclient is: "/home/MyName/Kontalk/Desktopclient/KontalkDesktopApp-0.01beta1"

abika commented 9 years ago

without the $ (its only an indication for using the shell), and don't use sudo or your root account (specially if you don't know what the command is doing), just: gpg ~/.kontalk/kontalk-public.asc
The folder is hidden (a dot as first character), that's why you can't find it. And thanks for your time!

webratte commented 9 years ago

OK, I got it :-) Thank you for your Linux tutorial. I know, somtimes I should much more carfully. But I learn!!! I hope this will help:

pub 2048R/EF2CD187 2015-02-25 Mike e9c2f61cd9de29c....@beta.kontalk.net sub 2048R/343D9195 2015-02-25

abika commented 9 years ago

ok, "uid" is missing but this is probably some copy/paste issue.

I tested that again and everything was working fine (one space too much, but anyway). @daniele-athome can you confirm this? I now the " (NO COMMENT)" string is missing now, but anything else changed?

For now I'll add more debug output to find out what's going on...

daniele-athome commented 9 years ago

Yes, that's a valid uid. Once I realized I couldn't find a use for the comment part, I removed it. Nothing else is changed.

webratte commented 9 years ago

@abika You said: "ok, "uid" is missing but this is probably some copy/paste issue."

I have copied the correct output. "uid" is missing. The only thing I changed was cut the adress.

webratte commented 9 years ago

I don't know why, but now after using the current Android Client and creating a new key it works fine. I think I can close this issue for now.

abika commented 9 years ago

I'll leave the additional log output for now. Reopen this issue if you experience this again.

webratte commented 9 years ago

Sorry, this issue seems not fixed. Other contacts are OK. Only my own contact is shown as unknown and if I send something to myself with my phone I can receive and decrypt it on my Computer but get the errormessage you can see on the screenshot.

If I send a message with my computer to myself it can not encrypted on my phone. I will this test after release Android Client 3.0-rc2. Maybe this is an fixed issue with keymanagement in Android Client.

On screenshot you can see another issue with umlauts. This happens not in messages (umlauts will correct shown) Feel free to open for that a new issue with better description ;-) contact-issue1

abika commented 9 years ago

there are three problems here:

You can also check the debug.log file: lines with "full UID in key: ..." and "user name from key: ..." are interesting

webratte commented 9 years ago

Umlaute: I use the current Beta v3.0-beta2 Other problems: please can you explain where I can find (or how to get) the logfile and the kontalk_db.sqlite I use Linux Kubuntu. Tomorrow I will trie to find out more.

abika commented 9 years ago

The package files were update, see here. Type this in the address bar of your file manager (e.g. Dolphin): ~/.kontalk

webratte commented 9 years ago

Thank you, renaming kontalk_db.sqlite fixed the problem. Now I can see myself and can send messages in both directions. The renamed kontalk_db.sqlite I can delete I suppose?

Do you need still the logfile?

abika commented 9 years ago

[back from vacation]

Renaming the database was actually only an ugly workaround (and you lost your conversations). You can keep the old database, I'll work on a better fix for the next release.

Logfile is not needed anymore, I assume the naming-issue was also fixed(?).

M4v3r1cK87 commented 9 years ago

Hello, I have the same problem. Some contacts are "Unknown" (also my nick I think is "Unknown"). Have try to refresh the Encryption Key (for all contacts "Unknown" the Encryption Key is "Not Available") and this is the log result :

Jul 14, 2015 6:06:24 PM org.kontalk.client.Client sendPacket
INFO: sent packet: <iq to='7a516ec680ef5d483c01857e2e35b74ddc9ea013@beta.kontalk.net' id='gy5V4-45' type='get'><pubkey xmlns='urn:xmpp:pubkey:2'/></iq>
Jul 14, 2015 6:06:24 PM org.kontalk.client.Client processPacket
INFO: got packet (unhandled): <iq to='06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net/Kontalk_Desktop' from='7a516ec680ef5d483c01857e2e35b74ddc9ea013@beta.kontalk.ne
t' id='gy5V4-45' type='error'><error type='auth'><not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas' xml:lang='en'>N
ot authorized.</text></error></iq>
Jul 14, 2015 6:06:47 PM org.kontalk.client.Client sendPacket
INFO: sent packet: <iq to='8bc2862f1f9c1effef848636444e5195b9d4fb1e@beta.kontalk.net' id='gy5V4-47' type='get'><pubkey xmlns='urn:xmpp:pubkey:2'/></iq>
Jul 14, 2015 6:06:47 PM org.kontalk.client.Client processPacket
INFO: got packet (unhandled): <iq to='06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net/Kontalk_Desktop' from='8bc2862f1f9c1effef848636444e5195b9d4fb1e@beta.kontalk.ne
t' id='gy5V4-47' type='error'><error type='auth'><not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas' xml:lang='en'>N
ot authorized.</text></error></iq>
Jul 14, 2015 6:06:49 PM org.kontalk.client.PresenceListener processPacket
INFO: got presence packet: <presence to='06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net' from='06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net/84368792a04
02c3c' type='unavailable'></presence>
Jul 14, 2015 6:06:49 PM org.kontalk.system.Control setPresence
WARNING: (presence) can't find user with jid: 06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net/Kontalk_Desktop
Jul 14, 2015 6:06:56 PM org.kontalk.client.Client sendPacket
INFO: sent packet: <iq to='565cc6b9980ba192b0999989d170362291ddb577@beta.kontalk.net' id='gy5V4-50' type='get'><pubkey xmlns='urn:xmpp:pubkey:2'/></iq>
Jul 14, 2015 6:06:56 PM org.kontalk.client.Client processPacket
INFO: got packet (unhandled): <iq to='06b924a1c7589bec098e855bc4dbc7c653778679@beta.kontalk.net/Kontalk_Desktop' from='565cc6b9980ba192b0999989d170362291ddb577@beta.kontalk.ne
t' id='gy5V4-50' type='error'><error type='auth'><not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas' xml:lang='en'>N
ot authorized.</text></error></iq>
abika commented 9 years ago

Ok, sorry but this is unrelated. You simply can't get the users key cause they didn't gave you permission (yet). And your contacts names are retrieved from the keys.

New issue #36 will handle that.