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

ContactList hide error when trying to get last activity #869

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stokito
Copy link
Contributor

@stokito stokito commented Aug 11, 2024

No description provided.

… that doesn't support it yet

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
@Plyha
Copy link
Member

Plyha commented Aug 21, 2024

Can you please show what you corrected with some example?

@stokito
Copy link
Contributor Author

stokito commented Aug 21, 2024

I have the exception in logs when hover a mouse over an offline contact from another server:

WARNING: Unable to get Last Activity from: stokito@yax.im
org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPP error reply received from stokito@yax.im: XMPPError: service-unavailable - cancel
	at org.jivesoftware.smack.XMPPException$XMPPErrorException.ifHasErrorThenThrow(XMPPException.java:171)
	at org.jivesoftware.smack.XMPPException$XMPPErrorException.ifHasErrorThenThrow(XMPPException.java:165)
	at org.jivesoftware.smack.StanzaCollector.nextResultOrThrow(StanzaCollector.java:284)
	at org.jivesoftware.smack.StanzaCollector.nextResultOrThrow(StanzaCollector.java:228)
	at org.jivesoftware.smackx.iqlast.LastActivityManager.getLastActivity(LastActivityManager.java:240)
	at org.jivesoftware.spark.ui.ContactInfoWindow.customizeUI(ContactInfoWindow.java:241)
	at org.jivesoftware.spark.ui.ContactInfoWindow.setContactItem(ContactInfoWindow.java:325)
	at org.jivesoftware.spark.ui.ContactInfoWindow.display(ContactInfoWindow.java:184)
	at org.jivesoftware.spark.ui.ContactGroup$4.construct(ContactGroup.java:1055)
	at org.jivesoftware.spark.util.SwingWorker.lambda$new$0(SwingWorker.java:139)
	at java.base/java.lang.Thread.run(Thread.java:1583)

Here I using my account on conversations.im and this seems like a problem of the server. That's strange because it uses latest ejaberd and the XEP-0012 must work without any issues.
The cause of the error can be that the stokito@yax.im contact is on another server (Prosody). So it can be s2s issue.
The last activity is not that important feature and the code will hide the exception

# Conflicts:
#	core/src/main/java/org/jivesoftware/spark/ui/ContactInfoWindow.java
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

Successfully merging this pull request may close these issues.

2 participants