Remote-follow stopped working
Dear !Friendica Support ,
I normally can like/repeat comments from #Mastodon but now I get a blank page on my Friendica instance. So this is what I did:
1) I normally follow a user on Mastodon, but currently I don't see any of his posts or comments (maybe related?).
2) So my "backup" method is that I go to the comment's URL, e.g. https://social.snopyta.org/@kromonos/108483904376408153 and click "Favorite" there
3) Then I enter my id
4) But now I get a blank page, e.g. https://f.haeder.net/follow?url=https%3A%2F%2Fsocial.snopyta.org%2Fusers%2Fkromonos%2Fstatuses%2F108483904376408153
Any quick ideas? Or should I better on an issue?
I normally can like/repeat comments from #Mastodon but now I get a blank page on my Friendica instance. So this is what I did:
1) I normally follow a user on Mastodon, but currently I don't see any of his posts or comments (maybe related?).
2) So my "backup" method is that I go to the comment's URL, e.g. https://social.snopyta.org/@kromonos/108483904376408153 and click "Favorite" there
3) Then I enter my id
roland@f.haeder.net
and normally that comment is being transferred to my instance4) But now I get a blank page, e.g. https://f.haeder.net/follow?url=https%3A%2F%2Fsocial.snopyta.org%2Fusers%2Fkromonos%2Fstatuses%2F108483904376408153
Any quick ideas? Or should I better on an issue?
Liwott
•Roland Häder
•Tobias
•Roland Häder
•Tobias
•Roland Häder
•Roland Häder
•... show more
But I don't play TicTac now.
Roland Häder
•string
inFriendica\Content\Text\HTML::toBBCode()
doesn't allownull
but is called withnull
from various places.Roland Häder
•src/ModelAPContact.php
on line 244 is a nested call. It doesn't catch any unwantednull
values.Roland Häder
•But also with
empty($value)
instead of$value != ""
. So I changed it to the first one. I guess blaming the type-hint is wrong as it hides the actual problem (invocation with wrong variable types).Roland Häder
•APContact
and now I checksrc/Protocol/ActivityPub/Processor.php on line 618
bad invocation.Roland Häder
•$item['title'] = (empty($activity['name']) ? HTML::toBBCode($activity['name']) : '');
which should avoid theTypeError
exception.So thank you for pointing me the right direction.
Roland Häder
•(!empty($foo))
instead. I made a followup PR 11647 for this and it ultimately fixed the error discovered by me here.Roland Häder
•2022-06-16T16:43:28Z worker [ERROR]: Uncaught Exception TypeError: "Return value of Friendica\Protocol\ActivityPub::fetchContent() must be of the type array, bool returned" at /var/www/.../src/Protocol/ActivityPub.php line 109 {"exception":"TypeError: Return value of Friendica\\Protocol\\ActivityPub::fetchContent() must be of the type array, bool returned in /var/www/.../src/Protocol/ActivityPub.php:109\nStack trace:\n#0 /var/www/.../src/Model/APContact.php(320): Friendica\\Protocol\\ActivityPub::fetchContent('https://misskey...')\n#1 /var/www/.../src/Protocol/ActivityPub.php(151): Friendica\\Model\\APContact::getByURL('https://misskey...', true)\n#2 /var/www/.../src/Network/Probe.php(313): Friendica\\Protocol\\ActivityPub::probeProfile('https://misskey...')\n#3 /var/www/.../src/Model/Contact.php(2328): Friendica\\Network\\Probe::uri('https://misskey...', '', 0)\n#4 /var/www/.../src/Worker/UpdateContact.php(35): Friendica\\Model\\Contact::updateFromProbe(653142)\n#5 [internal function]: Friendica\\Worker\\UpdateContact::execute(653142)\n#6 /var/www/.../src/Core/Worker.php(486):
... show more2022-06-16T16:43:28Z worker [ERROR]: Uncaught Exception TypeError: "Return value of Friendica\Protocol\ActivityPub::fetchContent() must be of the type array, bool returned" at /var/www/.../src/Protocol/ActivityPub.php line 109 {"exception":"TypeError: Return value of Friendica\\Protocol\\ActivityPub::fetchContent() must be of the type array, bool returned in /var/www/.../src/Protocol/ActivityPub.php:109\nStack trace:\n#0 /var/www/.../src/Model/APContact.php(320): Friendica\\Protocol\\ActivityPub::fetchContent('https://misskey...')\n#1 /var/www/.../src/Protocol/ActivityPub.php(151): Friendica\\Model\\APContact::getByURL('https://misskey...', true)\n#2 /var/www/.../src/Network/Probe.php(313): Friendica\\Protocol\\ActivityPub::probeProfile('https://misskey...')\n#3 /var/www/.../src/Model/Contact.php(2328): Friendica\\Network\\Probe::uri('https://misskey...', '', 0)\n#4 /var/www/.../src/Worker/UpdateContact.php(35): Friendica\\Model\\Contact::updateFromProbe(653142)\n#5 [internal function]: Friendica\\Worker\\UpdateContact::execute(653142)\n#6 /var/www/.../src/Core/Worker.php(486): call_user_func_array('Friendica\\\\Worke...', Array)\n#7 /var/www/.../src/Core/Worker.php(381): Friendica\\Core\\Worker::execFunction(Array, 'UpdateContact', Array, true)\n#8 /var/www/.../src/Core/Worker.php(106): Friendica\\Core\\Worker::execute(Array)\n#9 /var/www/.../bin/worker.php(86): Friendica\\Core\\Worker::processQueue(false, Object(Friendica\\Core\\Worker\\Entity\\Process))\n#10 {main}"} - {"file":null,"line":null,"function":null,"uid":"5e3af8","process_id":26304}
just popped up on a tail-ed log file.Roland Häder
•develop
branch fixes this, plus I added a few more (loud) exceptions for some hopefully rare conditions. That's what an exception is for. Bad shit happens.Roland Häder
•/follow?url=x
is back when the instance is blocked. I just noticed it. I work on it already.