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

Private messages (DM system) are not delivered #13627

Closed
1 task done
loma-one opened this issue Nov 9, 2023 · 21 comments · Fixed by #13658 or #13660
Closed
1 task done

Private messages (DM system) are not delivered #13627

loma-one opened this issue Nov 9, 2023 · 21 comments · Fixed by #13658 or #13660

Comments

@loma-one
Copy link

loma-one commented Nov 9, 2023

  • I have searched open and closed issues for duplicates

Bug Description

It is not possible to send private messages via the DM system. Messages are not sent to Mastodon or displayed there.

[EDIT] The problem also seems to affect Misskey, Firefisch and Diaspora.

Steps to Reproduce

  • Create a new message via the DM system /message
  • Send the message to a Mastodon account that you follow (or that is under your control)
  • Check the receipt in Mastodon

Actual Result:

Private messages via the DM system are not delivered

Expected Result:

Private messages are delivered via the DM system

Screenshots

Platform Info

Friendica Version: 2023.09-rc

Friendica Source: git

PHP version: 8.1

SQL version: 10.5

@kr428
Copy link

kr428 commented Nov 10, 2023

Browsing through the archive, we discussed the opposite end of that problem (Mastodon-style "direct messages" from Mastodon to Friendica and the various shortcomings of handling these) almost a year ago I see, see #12180 . Reading through that, I'm unsure whether there's an easy fix here - maybe, for that, it would initially be better to disable sending Friendica DMs on certain platforms and somehow improve handling for Mastodon/AP-style "private mentions" in here? (Using the direct messages feature transparently and "right" regardless of the platform the recipient is on definitely would be the best way and somehow expectation in a federated environment, but at the moment at least "this" part here is broken and even small improvements would be of benefit. 🙂)

@loma-one
Copy link
Author

The attempt to send DM from other instances also failed.

  • libranet.de
  • opensocial.at

@loma-one
Copy link
Author

loma-one commented Nov 17, 2023

It looks as if it is generally no longer possible to send DM. It is also no longer possible to send DM to other Friendica accounts.

@kr428
Copy link

kr428 commented Nov 17, 2023

Need to try Diaspora; that would explain why I don't see responses to some... 🙈
EDIT: Doesn't work for D* either.

@foss-
Copy link

foss- commented Nov 17, 2023

It looks as if it is generally no longer possible to send DM. It is also no longer possible to send DM to other Friendica accounts.

Cannot confirm with This is Friendica, version 2023.09-rc that is running at the web location https://pirati.ca. The database version is 1540/1540, the post update version is 1507/1507.

Tested sending and receiving and both worked as expected.

@loma-one could you please share the exact version you are using including database and post update version.

@loma-one
Copy link
Author

Libranet / Loma 1540/1540 Post-Update-Version 1507/1507.
opensocial.at 1539/1539 Post-Update-Version 1508/1507.

@loma-one
Copy link
Author

loma-one commented Nov 17, 2023

@foss- Please give me your @. I will then send you a message. You can then confirm that you have received it.


Sent 4 h ago. (libranet)
2023-11-17_22-17
Current status at the entrance (opensocial)
2023-11-17_22-16

It looks to me as if the despatch is missing.

@sekretaerbaer
Copy link

I can confirm that DMs from Friendica to Mastodon and Firefish do not work.
DMs between Friendica and Friendica work here.
In the test I did, it was between the instances sekretaerbaer.de and friendica.opensocial.space, both instances are on the same state
Version 2023.09-rc
Database version is 1540/1540
Post-update version 1507/1507

Bildschirmfoto 2023-11-18 um 05 27 03
Bildschirmfoto 2023-11-18 um 05 26 28

@loma-one
Copy link
Author

loma-one commented Nov 18, 2023

@foss- The Message is sending


The test between sekretaerbaer.de and loma/libranet only partially successful

Source Target Status
libranet/opensocial/loma mastodon.social
mastodon.social libranet/opensocial/loma
libranet/opensocial/loma procial.tchncs.de
libranet/opensocial/loma misskey.de
sekretaerbaer.de loma
libranet/loma sekretaerbaer.de
pirati.ca loma
libranet/loma pirati.ca
diasp loma
libranet/opensocial/loma diasp

Logs sekretaerbaer.de

2023-11-18T06:21:52Z worker [WARNING]: No delivery data {"command":"mail","uri-id":44,"cid":397275,"worker_id":"c299a21","worker_cmd":"BulkDelivery"} - {"file":"Delivery.php","line":192,"function":"deliver","request-id":"6558580020fb4","stack":"Delivery::deliver (39), BulkDelivery::execute, Worker::execFunction (386), Worker::execute (121), Worker::processQueue (87)","uid":"fa02cd","process_id":2193926}
2023-11-18T06:21:52Z worker [WARNING]: E_WARNING: Undefined array key "created" {"code":2,"message":"Undefined array key \"created\"","file":"/var/www/html/src/Worker/Notifier.php","line":616} - {"file":"Notifier.php","line":616,"function":"delivery","request-id":"65585800088f6","stack":"ErrorHandler::handleError (616), Notifier::delivery (476), Notifier::execute, Worker::execFunction (386), Worker::execute (121), Worker::processQueue (87)","uid":"3dfabe","process_id":2193924}

Log loma

2023-11-18T06:36:12Z app [INFO]: Fetching activity {"id":137553581,"parent-network":["dfrn","dspr","stat","feed","mail","apub"]} - {"file":"Transmitter.php","line":1322,"function":"createActivityFromItem","request-id":"65585b5c4860d","stack":"Transmitter::createActivityFromItem (1300), Transmitter::createCachedActivityFromItem (101), Objects::rawContent (244), BaseModule::run (711), App::runFrontend (55)","uid":"8b4383","process_id":322549}

@loma-one
Copy link
Author

Cannot confirm with This is Friendica, version 2023.09-rc that is running at the web location https://pirati.ca. The database version is 1540/1540, the post update version is 1507/1507.

@foss- can you confirm receipt of my DM from Libranet & loma?

@foss-
Copy link

foss- commented Nov 19, 2023

Sent a test message your way at Sat, 18 Nov 2023 - 9:47 AM, did not receive a reply and unsure how to see if it was sent. annando should be able to check that in the logs and have received neither of your test messages.

@loma-one
Copy link
Author

@foss- Thank you. Documented here.
#13627 (comment)

@kr428
Copy link

kr428 commented Nov 19, 2023

Same for loma.ml -> zotum.net and loma.ml -> pixelfed.social. If these aren't compatible, it would already help not having these contacts listed / suggested in the message recipient field...

@kr428
Copy link

kr428 commented Nov 19, 2023

By the way did anyone of you already test inbound messages? Still waiting but seems Mastodon > Friendica (at least troet.cafe and social.tchncs.de > loma.ml) isn't really working either.

@loma-one
Copy link
Author

@annando
Copy link
Collaborator

annando commented Nov 20, 2023

Mastodon -> will always end up in private posts but no private messages, due to technical limitatios.

@loma-one
Copy link
Author

loma-one commented Nov 20, 2023

Nothing arrives at Mastodon. "0". No message, no post. Just like with the other platforms


@annando I had sent you a message from Friendica to Friendica yesterday to let you know that the WSOD to the "no preview" feature is also fixed with the patch. This message may not have been sent either.
Unfortunately I can't find an error message in the logs.
2023-11-20_19-14

@kr428
Copy link

kr428 commented Nov 20, 2023

Mastodon -> will always end up in private posts but no private messages, due to technical limitatios.

Yes. That's why there was a discussion elsewhere about making the new "mention" feature capable of private mentions in order to allow for better communication from/to Mastodon here. 😔

@loma-one
Copy link
Author

Test instance https://dis-le.de
Stand Pull 676ce83
Manual transfer src/Protocol/ActivityPub/Transmitter.php and src/Worker/Notifier.php
DM sending and receiving unfortunately not possible (Friendica > Mastodon)(Friendica > Friendica)

2023-11-21T11:16:59Z worker [WARNING]: E_WARNING: Undefined array key "created" {"code":2,"message":"Undefined array key \"created\"","file":"/var/www/html/friend/src/Worker/Notifier.php","line":615} - {"file":"Notifier.php","line":615,"function":"delivery","request-id":"655c91ab126c2","stack":"ErrorHandler::handleError (615), Notifier::delivery (475), Notifier::execute, Worker::execFunction (386), Worker::execute (121), Worker::processQueue (87)","uid":"dac965","process_id":20432}
2023-11-21T11:16:59Z worker [ERROR]: DB Error {"code":1452,"error":"Cannot add or update a child row: a foreign key constraint fails (`friend`.`delivery-queue`, CONSTRAINT `delivery-queue_ibfk_2` FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON DELETE CASCADE)","params":"INSERT INTO `delivery-queue` (`gsid`, `uri-id`, `created`, `command`, `cid`, `uid`, `failed`) VALUES (19, 142, '2023-11-21 11:16:59', 'mail', 1587592, 0, 0) ON DUPLICATE KEY UPDATE `gsid` = 19, `uri-id` = 142, `created` = '2023-11-21 11:16:59', `command` = 'mail', `cid` = 1587592, `uid` = 0, `failed` = 0"} - {"file":"Database.php","line":812,"function":"e","request-id":"655c91ab126c2","stack":"Database::e (1060), Database::insert (86), DeliveryQueueItem::save (616), Notifier::delivery (475), Notifier::execute, Worker::execFunction (386), Worker::execute (121), Worker::processQueue (87)","uid":"dac965","process_id":20432}

@loma-one
Copy link
Author

loma-one commented Nov 22, 2023

The problem persists. Messages are not sent or not displayed on the target system.
https://loma.ml/display/373ebf56-1865-5d10-e2d2-d6a616404480

@annando
Copy link
Collaborator

annando commented Nov 22, 2023

PR #13660 has fixed it.

@MrPetovan MrPetovan added this to the 2023.09 milestone Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants