Can not receive Jabber message on Mac


#1

Hi,

I downloaded the Kontalk desktop-client, so I could rename a Jabber kontak, as @daniele_athome recommended in this thread

The Jabber contact name is still somehow not changed in the Android client, but I realized the messages are not received on the desktop client.

System: Mac Retina 15, OSx 10.10.5.
java version "1.8.0_112"
KontalkDesktop-3.1.2

I extracted the archive from GitHub and started the client with java -jar KontalkDesktopApp.jar

In the console log I was able to see following output upon expected message reception:

KONFIGURATION: message: <message to='849c6fb6308058f4cb6c379182c4c041d802bbc2@beta.kontalk.net' from='zapier@jabber.org/65d480d1d8161aae' type='chat'><body>Nový E-mail od:

Karel Mácha &lt;karel.macha@karlitos.net&gt;

Předmět:

Dulezite veci

Obsah:

Toto je obsah mailu.
</body></message>
Dez 19, 2016 4:54:45 PM org.kontalk.system.Control onNewInMessage
INFORMATION: new incoming message, IDs:jid='zapier@jabber.org/65d480d1d8161aae',xmpp=,thread=
Dez 19, 2016 4:54:45 PM org.kontalk.persistence.Database execInsert
WARNUNG: can't execute insert: INSERT INTO messages VALUES (NULL,?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [1, null, Mon Dec 19 16:54:45 CET 2016, IN, {"plain_text":"Nový E-mail od:\n\nKarel Mácha <karel.macha@karlitos.net>\n\nPředmět:\n\nDulezite veci\n\nObsah:\n\nToto je obsah mailu.\n"}, NOT, NOT, [], {}, null]
java.sql.SQLException: [SQLITE_CONSTRAINT]  Abort due to constraint violation (NOT NULL constraint failed: messages.xmpp_id)
	at org.sqlite.core.DB.newSQLException(DB.java:890)
	at org.sqlite.core.DB.newSQLException(DB.java:901)
	at org.sqlite.core.DB.execute(DB.java:810)
	at org.sqlite.core.DB.executeUpdate(DB.java:847)
	at org.sqlite.jdbc3.JDBC3PreparedStatement.executeUpdate(JDBC3PreparedStatement.java:86)
	at org.kontalk.persistence.Database.execInsert(Database.java:255)
	at org.kontalk.model.message.KonMessage.<init>(KonMessage.java:161)
	at org.kontalk.model.message.InMessage.<init>(InMessage.java:46)
	at org.kontalk.model.Model.createInMessage(Model.java:102)
	at org.kontalk.system.Control.onNewInMessage(Control.java:270)
	at org.kontalk.client.KonMessageListener.processChatMessage(KonMessageListener.java:178)
	at org.kontalk.client.KonMessageListener.processPacket(KonMessageListener.java:89)
	at org.jivesoftware.smack.AbstractXMPPConnection$3.run(AbstractXMPPConnection.java:1105)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Dez 19, 2016 4:54:45 PM org.kontalk.model.message.KonMessage <init>
WARNUNG: db, could not insert message
Dez 19, 2016 4:54:45 PM org.kontalk.persistence.Database execInsert
WARNUNG: can't execute insert: INSERT INTO transmissions VALUES (NULL,?, ?, ?, ?) [-1, 3, 'zapier@jabber.org/65d480d1d8161aae', null]
java.sql.SQLException: [SQLITE_CONSTRAINT]  Abort due to constraint violation (FOREIGN KEY constraint failed)
	at org.sqlite.core.DB.newSQLException(DB.java:890)
	at org.sqlite.core.DB.newSQLException(DB.java:901)
	at org.sqlite.core.DB.execute(DB.java:810)
	at org.sqlite.core.DB.executeUpdate(DB.java:847)
	at org.sqlite.jdbc3.JDBC3PreparedStatement.executeUpdate(JDBC3PreparedStatement.java:86)
	at org.kontalk.persistence.Database.execInsert(Database.java:255)
	at org.kontalk.model.message.Transmission.insert(Transmission.java:115)
	at org.kontalk.model.message.Transmission.<init>(Transmission.java:77)
	at org.kontalk.model.message.InMessage.<init>(InMessage.java:54)
	at org.kontalk.model.Model.createInMessage(Model.java:102)
	at org.kontalk.system.Control.onNewInMessage(Control.java:270)
	at org.kontalk.client.KonMessageListener.processChatMessage(KonMessageListener.java:178)
	at org.kontalk.client.KonMessageListener.processPacket(KonMessageListener.java:89)
	at org.jivesoftware.smack.AbstractXMPPConnection$3.run(AbstractXMPPConnection.java:1105)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Dez 19, 2016 4:54:45 PM org.kontalk.model.message.Transmission insert
WARNUNG: could not insert

#2

Thanks for reporting. The XMPP ID for a message is RECOMMENDED but not required. Most Jabber clients add the XMPP ID and therefore this bug was not noticed before. Which client is the sender using?

Anyway, fixed now. See https://github.com/kontalk/desktopclient-java/issues/99.

Please report bugs/issues directly on GitHub.


#3

Thanks. I was not sure if this is a bug or just something caused by my setup and did not want to clutter GitHub issue tracker.

I was just trying the zapier service allowing redirection of e-mails to Jabber.


#4

Tested this myself. Its working now.