Skip to main content



my-place.social gets a 500 error trying to view helpers@forum.friendi.ca


I'm writing this from my Piefed server because my Friendica server, my-place.social, can no longer view helpers@forum.friendi.ca. I get a 500 error. As far as I can tell, viewing all other groups and contacts works fine.

This problem may be related to the Wasabi outage from yesterday. I use Wasabi S3 for image storage, and they had a partial outage yesterday that caused obvious issues on the server, like blurred images. I say this because the exception may be image related.

This is the error in the friendica log:

2024-11-30T13:23:16Z app [ERROR]: ** Uncaught Exception TypeError: "Friendica\Object\Image::__construct(): Argument #1 ($data) must be of type string, null given, ** called in /var/www/html/src/Object/Image.php on line 781" at /var/www/html/src/Object/Image.php line 62 {"exception":"TypeError: Friendica\Object\Image::__construct(): Argument #1 ($data) must be of type string, null given, called in /var/www/html/src/Object/Image.php on line 781 and defined in /var/www/html/src/Object/Image.php:62\nStack trace:\n#0 /var/www/html/src/Object/Image.php(781): Friendica\Object\Image->__construct()\n#1 /var/www/html/src/Model/Post/Link.php(152): Friendica\Object\Image->getBlurHash()\n#2 /var/www/html/src/Model/Post/Link.php(79): Friendica\Model\Post\Link::fetchMimeType()\n#3 /var/www/html/src/Content/Text/BBCode.php(321): Friendica\Model\Post\Link::getByLink()\n#4 /var/www/html/src/Content/Text/BBCode.php(861): Friendica\Content\Text\BBCode::proxyUrl()\n#5 [internal function]: Friendica\Content\Text\BBCode::Friendica\Content\Text\{closure}()\n#6 /var/www/html/src/Content/Text/BBCode.php(851): preg_replace_callback()\n#7 /var/www/html/src/Content/Text/BBCode.php(1883): Friendica\Content\Text\BBCode::convertImages()\n#8 /var/www/html/src/Content/Text/BBCode.php(1389): Friendica\Content\Text\BBCode::convertImagesToHtml()\n#9 /var/www/html/src/Util/Strings.php(517): Friendica\Content\Text\BBCode::Friendica\Content\Text\{closure}()\n#10 /var/www/html/src/Content/Text/BBCode.php(2517): Friendica\Util\Strings::performWithEscapedBlocks()\n#11 /var/www/html/src/Content/Text/BBCode.php(1324): Friendica\Content\Text\BBCode::performWithEscapedTags()\n#12 /var/www/html/src/Util/Strings.php(517): Friendica\Content\Text\BBCode::Friendica\Content\Text\{closure}()\n#13 /var/www/html/src/Content/Text/BBCode.php(2517): Friendica\Util\Strings::performWithEscapedBlocks()\n#14 /var/www/html/src/Content/Text/BBCode.php(1323): Friendica\Content\Text\BBCode::performWithEscapedTags()\n#15 /var/www/html/src/Content/Text/BBCode.php(1283): Friendica\Content\Text\BBCode::convert()\n#16 /var/www/html/src/Model/Item.php(3340): Friendica\Content\Text\BBCode::convertForUriId()\n#17 /var/www/html/src/Model/Item.php(3471): Friendica\Model\Item::putInCache()\n#18 /var/www/html/src/Object/Post.php(464): Friendica\Model\Item::prepareBody()\n#19 /var/www/html/src/Object/Post.php(655): Friendica\Object\Post->getTemplateData()\n#20 /var/www/html/src/Object/Post.php(655): Friendica\Object\Post->getTemplateData()\n#21 /var/www/html/src/Object/Post.php(655): Friendica\Object\Post->getTemplateData()\n#22 /var/www/html/src/Object/Thread.php(204): Friendica\Object\Post->getTemplateData()\n#23 /var/www/html/src/Content/Conversation.php(680): Friendica\Object\Thread->getTemplateData()\n#24 /var/www/html/src/Content/Conversation.php(583): Friendica\Content\Conversation->getThreadList()\n#25 /var/www/html/src/Model/Contact.php(1725): Friendica\Content\Conversation->render()\n#26 /var/www/html/src/Module/Contact/Conversations.php(123): Friendica\Model\Contact::getThreadsFromId()\n#27 /var/www/html/src/BaseModule.php(250): Friendica\Module\Contact\Conversations->content()\n#28 /var/www/html/src/App.php(682): Friendica\BaseModule->run()\n#29 /var/www/html/index.php(46): Friendica\App->runFrontend()\n#30 {main}"} - {"file":null,"line":null,"function":null,"request-id":"674b11c1ce218","stack":"ErrorHandler::handleException (128), ErrorHandler::Friendica\Core\Logger\Handler\{closure}","uid":"caec99","process_id":9285}

I tried updating the contact information, unfollowing/following. I can't view it from any other account on the server. I assume the contact record in the database is corrupted.

I thought of playing with the .console archive function to archive the contact and see if I can follow it again to have the server build a new record, but stuff like this could have unintended consequences. So, I'm reaching out first.

Does anyone have advice on how to fix this?

#1
in reply to Jerry on PieFed

I saw your first post as well, but currently can't answer, since I'm deep into developing.
in reply to Michael Vogel

... answer: can't answer? Weird.

when you read the error messages from the beginning it says that it expects data from a specific type, but it gets back NULL , like this

Image.php line 62 {"exception":"TypeError: Friendica\Object\Image::__construct(): Argument #1 ($data) must be of type string, null given,

I think your cache/data/images are corrupt from your sushi S3 outage. That damaged your data storage. Or it changed some paths and your paths direct to the seven seas or nirvana. Maybe check the paths first before deleting the whole cache and data storage or restore from a backup.

in reply to Jerry on PieFed

Thanks. Other contacts seem fine. Yeah, I figure something was being updated in the DB when there was an exception fetching or writing an image, and it wasn't properly handled, leaving the database in an improper state.

Is there any way to just delete the contact from the database and delete all its associated data so it can be recreated? I'll never be able to figure out what to delete or restore. And it's been too long, so a restore would cause other issues.

If I use the .console command to archive the contact (I think it works on contacts), would it create a whole new DB record if I connected again, or try to restore from the archive? Or if I block the contact, will the system eventually delete it? And then if I unblock, would it create a fresh DB record?

Is there a DB update trick to make Friendica think this account was never here and so it would create a fresh record?