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

[2020.06] PHP Fatal Errors #8473

Closed
MrPetovan opened this issue Mar 30, 2020 · 46 comments
Closed

[2020.06] PHP Fatal Errors #8473

MrPetovan opened this issue Mar 30, 2020 · 46 comments
Labels
Milestone

Comments

@MrPetovan
Copy link
Collaborator

Please report here any PHP Fatal error message obtained running the 2020.03 stable or 2020.06-dev versions.

Follow-up to #7998

@MrPetovan MrPetovan added the Bug label Mar 30, 2020
@MrPetovan MrPetovan added this to the 2020.06 milestone Mar 30, 2020
@MrPetovan MrPetovan pinned this issue Mar 30, 2020
@strk
Copy link

strk commented Apr 17, 2020

how about 2020-04-17 13:22:19 Europe/Rome: aggiornando la tabella conversation. ?

#0 [internal function]: Friendica\Module\Maintenance::content(Array)
#1 /home/www/site/src/App/Page.php(332): call_user_func(Array, Array)
#2 /home/www/site/src/App/Page.php(388): Friendica\App\Page->initContent(Object(Friendica\App\Module), Object(Friendica\App\Mode))
#3 /home/www/site/src/App.php(576): Friendica\App\Page->run(Object(Friendica\App), Object(Friendica\App\BaseURL), Object(Friendica\App\Mode), Object(Friendica\App\Module), Object(Friendica\Core\L10n), Object(Friendica\Core\Config\JitConfig), Object(Friendica\Core\PConfig\JitPConfig))
#4 /home/www/site/index.php(42): Friendica\App->runFrontend(Object(Friendica\App\Module), Object(Friendica\App\Router), Object(Friendica\Core\PConfig\JitPConfig), Object(Friendica\App\Authentication), Object(Friendica\App\Page))
#5 {main}

@MrPetovan
Copy link
Collaborator Author

MrPetovan commented Apr 17, 2020

Hi @strk and welcome back! This is a maintenance message that the conversation table is being updated following a Friendica upgrade. It's an Exception that aborts the normal page loading but it isn't a bug.

@strk
Copy link

strk commented Apr 18, 2020 via email

@ghost
Copy link

ghost commented Apr 25, 2020

[2020.03]

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Friendica\\Protocol\\Activity::match() must be of the type string, null given, called in /friendica/include/conversation.php on line 158 and defined in /friendica/src/Protocol/Activity.php:218\nStack trace:\n
#0 /friendica/include/conversation.php(158): Friendica\\Protocol\\Activity->match(NULL, 'http://activity...')\n
#1 /friendica/include/api.php(2980): localize_item(Array)\n
#2 /friendica/include/api.php(965): api_format_item(Array, 'json')\n
#3 /friendica/include/api.php(340): api_account_verify_credentials('json')\n
#4 /friendica/mod/api.php(132): api_call(Object(Friendica\\App))\n
#5 /friendica/src/LegacyModule.php(90): api_content(Object(Friendica\\App))\n
#6 /friendica/src/LegacyModule.php(64): Friendica

@MrPetovan
Copy link
Collaborator Author

MrPetovan commented Apr 27, 2020

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Friendica\Protocol\Diaspora::myHandle() must be of the type array, bool given, called in src/Protocol/Diaspora.php on line 3338 and defined in src/Protocol/Diaspora.php:3051
Stack trace:
#0 src/Protocol/Diaspora.php(3338): Friendica\Protocol\Diaspora::myHandle(false)
#1 src/Protocol/Diaspora.php(2786): Friendica\Protocol\Diaspora::sendParticipation(Array, Array)
#2 src/Protocol/Diaspora.php(778): Friendica\Protocol\Diaspora::receiveReshare(Array, Object(SimpleXMLElement), '<reshare>\n  <au...')
#3 src/Protocol/Diaspora.php(682): Friendica\Protocol\Diaspora::dispatch(Array, Array, Object(SimpleXMLElement))
#4 src/Module/Diaspora/Receive.php(86): Friendica\Protocol\Diaspora::dispatchPublic(Array)
#5 ...

@AlfredSK
Copy link

AlfredSK commented May 1, 2020

2020.06-dev:

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Friendica\Model\Tag::getByURIId() must be of the type int, null given, called in .../src/Protocol/ActivityPub/Processor.php on line 1018 and defined in .../src/Model/Tag.php:320
Stack trace:
#0 .../src/Protocol/ActivityPub/Processor.php(1018): Friendica\Model\Tag::getByURIId(NULL, Array)
#1 .../src/Protocol/ActivityPub/Processor.php(400): Friendica\Protocol\ActivityPub\Processor::getImplicitMentionList(Array)
#2 .../src/Protocol/ActivityPub/Processor.php(521): Friendica\Protocol\ActivityPub\Processor::processContent(Array, Array)
#3 .../src/Protocol/ActivityPub/Processor.php(222): Friendica\Protocol\ActivityPub\Processor::postItem(Array, Array)
#4 .../src/Protocol/ActivityPub/Receiver.php(376): Friendica\Protocol\ActivityPub\Processor::createItem(Array)
#5 .../src/Protocol/ActivityPub/Receiver.php(129): Friendica\Protocol\ActivityPub\R in .../src/Model/Tag.php on line 320

Addressed in #8570

@AlfredSK
Copy link

AlfredSK commented May 4, 2020

2020.06-dev:

Uncaught TypeError: Argument 1 passed to Friendica\Model\Tag::getByURIId() must be of the type int, null given,
called in .../src/Protocol/OStatus.php on line 2084 and defined in .../src/Model/Tag.php:318
Stack trace:
#0 .../src/Protocol/OStatus.php(2084): Friendica\Model\Tag::getByURIId(NULL)
#1 .../src/Protocol/OStatus.php(1881): Friendica\Protocol\OStatus::entryFooter(Object(DOMDocument), Object(DOMElement), Array, Array)
#2 .../src/Protocol/OStatus.php(1591): Friendica\Protocol\OStatus::followEntry(Object(DOMDocument), Array, Array, true)
#3 .../src/Protocol/OStatus.php(2291): Friendica\Protocol\OStatus::entry(Object(DOMDocument), Array, Array, true)
#4 .../src/Model/Contact.php(2463): Friendica\Protocol\OStatus::salmon(Array, Array)
#5 .../mod/follow.php(51): Friendica\Model\Contact::createFromProbe(2447, 'https://gnusoci...', true)
#6 ... in .../src/Model/Tag.php on line 318

Adresses by #8579

MrPetovan added a commit to MrPetovan/friendica that referenced this issue May 4, 2020
- Address friendica#8473 (comment)
- $item['uri-id'] isn't present for follow entry pseudo-items
@AlfredSK
Copy link

AlfredSK commented May 7, 2020

2020.06-dev:

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Friendica\Content\Text\Markdown::convertDiasporaMentionsToHtml() must be of the type string, null given, called in .../src/Content/Text/Markdown.php on line 56 and defined in .../src/Content/Text/Markdown.php:71
Stack trace:
#0 .../src/Content/Text/Markdown.php(56): Friendica\Content\Text\Markdown::convertDiasporaMentionsToHtml(NULL)
#1 .../src/Protocol/ActivityPub/Receiver.php(1065): Friendica\Content\Text\Markdown::convert(NULL)
#2 .../src/Protocol/ActivityPub/Receiver.php(797): Friendica\Protocol\ActivityPub\Receiver::processObject(Array)
#3 .../src/Protocol/ActivityPub/Receiver.php(230): Friendica\Protocol\ActivityPub\Receiver::fetchObject('https://mastodo...', Array, true, 32)
#4 .../src/Protocol/ActivityPub/Receiver.php(354): Friendica\Protocol\ActivityPub\Receiver::prepareObjectData(Array, 32, true, true)
#5 .../src/Protocol/Act in /var/www/html/mordor/src/Content/Text/Markdown.php on line 71

Addressed in #8599

@ghost
Copy link

ghost commented May 11, 2020

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Friendica\Model\Post\DeliveryData::incrementQueueDone() must be of the type integer, null given, called in /friendica/src/Worker/APDelivery.php on line 77 and defined in /friendica/src/Model/Post/DeliveryData.php:83
Stack trace:
#0 /friendica/src/Worker/APDelivery.php(77): Friendica\Model\Post\DeliveryData::incrementQueueDone(NULL, 1)
#1 [internal function]: Friendica\Worker\APDelivery::execute('wall-new', 12027609, 'https://gnusoci...', 694)
#2 /friendica/src/Core/Worker.php(407): call_user_func_array('Friendica\\Worke...', Array)
#3 /friendica/src/Core/Worker.php(306): Friendica\Core\Worker::execFunction(Array, 'APDelivery', Array, true)
#4 /friendica/src/Core/Worker.php(123): Friendica\Core\Worker::execute(Array)
#5 /friendica/bin/worker.php(75): Friendica\Core\Worker::processQueue(true)
#6 {main}  thrown in /friendica/src/Model/Post/DeliveryData.php on line 83

Adressed in #8624

@MrPetovan
Copy link
Collaborator Author

Thanks for the report, I don't know why an item ended up with no uri-id (not even 0), I guess this is a question for @annando.

@ghost
Copy link

ghost commented May 11, 2020

get this error message every minute

@ghost
Copy link

ghost commented May 12, 2020

2020.06-dev

PHP Fatal error:  Uncaught TypeError: Argument 2 passed to Friendica\Worker\Delivery::setFailedQueue() must be of the type array, null given, called in /friendica/src/Worker/Delivery.php on line 78 and defined in /friendica/src/Worker/Delivery.php:248
Stack trace:
#0 /friendica/src/Worker/Delivery.php(78): Friendica\Worker\Delivery::setFailedQueue('wall-new', NULL)
#1 [internal function]: Friendica\Worker\Delivery::execute('wall-new', '11920037', 344915)
#2 /friendica/src/Core/Worker.php(407): call_user_func_array('Friendica\\Worke...', Array)
#3 /friendica/src/Core/Worker.php(306): Friendica\Core\Worker::execFunction(Array, 'Delivery', Array, true)
#4 /friendica/src/Core/Worker.php(123): Friendica\Core\Worker::execute(Array)
#5 /friendica/bin/worker.php(75): Friendica\Core\Worker::processQueue(false)
#6 {main}
  thrown in /friendica/src/Worker/Delivery.php on line 248

Adressed in #8625

@annando
Copy link
Collaborator

annando commented May 12, 2020

@copiis should be fixed with #8625

@ghost
Copy link

ghost commented May 12, 2020

@copiis should be fixed with #8625

Still getting the messages
It always comes along with this message

PHP Notice: Undefined variable: target_item in /friendica/src/Worker/Delivery.php on line 78

@annando
Copy link
Collaborator

annando commented May 12, 2020

@copiis the PR isn't merged yet.

@ghost
Copy link

ghost commented May 19, 2020

These messages appear when I tried to switch from database to memcache in 2020.06-dev

PHP Fatal error:  Uncaught Exception: Memcache class isn't available in /friendica/src/Core/Cache/MemcacheCache.php:49
Stack trace:
#0 /friendica/src/Factory/CacheFactory.php(96): Friendica\Core\Cache\MemcacheCache->__construct('meld.de', Object(Friendica\Core\Config\JitConfig))
#1 /friendica/vendor/level-2/dice/Dice.php(150): Friendica\Factory\CacheFactory->create('memcache')
#2 /friendica/vendor/level-2/dice/Dice.php(96): Dice\Dice->Dice\{closure}(Array, Array)
#3 /friendica/vendor/level-2/dice/Dice.php(240): Dice\Dice->create('Friendica\\Core\\...', Array, Array)
#4 /friendica/vendor/level-2/dice/Dice.php(149): Dice\Dice->Dice\{closure}(Array, Array)
#5 /friendica/vendor/level-2/dice/Dice.php(96): Dice\Dice->Dice\{closure}(Array, Array)
#6 /friendica/vendor/level-2/dice/Dice.php(240): Dice\Dice->create('Friendica\\Core\\...', Array, Ar in /friendica/src/Core/Cache/MemcacheCache.php on line 49

@MrPetovan
Copy link
Collaborator Author

Please try memcached instead, both memcache and memcached exist and they are independent of each other so one or the other may not exist on your system.

@nupplaphil
Copy link
Collaborator

nupplaphil commented Jun 9, 2020

2020.06-dev (occurred at stable too, that's why I updated to dev):

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Friendica\Protocol\Diaspora::sendShare() must be of the type array, null given, called in /var/www/html/src/Model/Contact.php on line 2475 and defined in /var/www/html/src/Protocol/Diaspora.php:3433
Stack trace:
#0 /var/www/html/src/Model/Contact.php(2475): Friendica\Protocol\Diaspora::sendShare(NULL, Array)
#1 /var/www/html/src/Worker/AddContact.php(36): Friendica\Model\Contact::createFromProbe(711, 'pikonim@pod.ger...', '', false)
#2 [internal function]: Friendica\Worker\AddContact::execute(711, 'pikonim@pod.ger...')
#3 /var/www/html/src/Core/Worker.php(409): call_user_func_array('Friendica\\Worke...', Array)
#4 /var/www/html/src/Core/Worker.php(310): Friendica\Core\Worker::execFunction(Array, 'AddContact', Array, true)
#5 /var/www/html/src/Core/Worker.php(123): Friendica\Core\Worker::execute(Array)
#6 /var/www/html/bin/worker.php(75): Friendica\Core\Worker::processQueue(false)
#7 {main}
  thrown in /var/www/html/src/Protocol/Diaspora.php on line 3433

This happens everytime the worker is running, currently there are 4.000 pending "AddContact" or "UpdateContact" entries in the queue because of it.

Adressed in #8753

@ghost
Copy link

ghost commented Jun 18, 2020

PHP Fatal error:  Uncaught Error: Call to undefined function share_header() in /friendica/addon/twitter/twitter.php:1630
Stack trace:
#0 /friendica/addon/twitter/twitter.php(1819): twitter_createpost(Object(Friendica\App), 1, Object(stdClass), Array, '1', true, false)
#1 /friendica/addon/twitter/twitter_sync.php(30): twitter_fetchhometimeline(Object(Friendica\App), 1)
#2 /friendica/src/Core/Worker.php(411): twitter_sync_run(Array, 3)
#3 /friendica/src/Core/Worker.php(357): Friendica\Core\Worker::execFunction(Array, 'twitter_sync_ru...', Array, false)
#4 /friendica/src/Core/Worker.php(123): Friendica\Core\Worker::execute(Array)
#5 /friendica/bin/worker.php(75): Friendica\Core\Worker::processQueue(true)
#6 {main}  thrown in /friendica/addon/twitter/twitter.php on line 1630

Addressed in friendica/friendica-addons#989

@annando
Copy link
Collaborator

annando commented Jun 18, 2020

@copiis caused by #8784

Ping @MrPetovan

@utzer
Copy link

utzer commented Jun 19, 2020

I get this in 2020.06-RC:

[19-Jun-2020 06:13:15 UTC] PHP Fatal error:  Uncaught TypeError: Argument 5 passed to Friendica\Content\PageInfo::getFooterFromUrl() must be of the type string, null given, called in /var/www/include/items.php on line 55 and defined in /var/www/src/Content/PageInfo.php:73
Stack trace:
#0 /var/www/include/items.php(55): Friendica\Content\PageInfo::getFooterFromUrl('https://blog.pi...', false, '', true, NULL)
#1 /var/www/src/Protocol/Feed.php(531): add_page_info('https://blog.pi...', false, '', true, NULL)
#2 /var/www/src/Protocol/Feed.php(85): Friendica\Protocol\Feed::import('<?xml version="...', Array, Array)
#3 /var/www/include/items.php(73): Friendica\Protocol\Feed::consume('<?xml version="...', Array, Array, NULL)
#4 /var/www/src/Worker/OnePoll.php(176): consume_feed('<?xml version="...', Array, Array, NULL)
#5 [internal function]: Friendica\Worker\OnePoll::execute(4400)
#6 /var/www/src/Core/Worker.php(409): call_user_func_array('Friendica\\Worke...', Array)
#7 /var/www/src/Core/Worker.php(310): Friendica\Core\Worker::execFunction(Array, 'On in /var/www/src/Content/PageInfo.php on line 73

Addressed in #8789

@MrPetovan
Copy link
Collaborator Author

Thanks, I'm on it.

@AlfredSK
Copy link

AlfredSK commented Jun 21, 2020

For some reason 'Smilies.php' is trying to allocate a lot of PHP memory. My default setting for PHP memory_limit is 256MB. I tried to raise the limit to see if I can get rid of the error. But even with 400MB I get the same error about 'allowed memory size exhausted'. Is there some kind of memory leak?

PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 81920 bytes) in ...src/Content/Smilies.php on line 174

This is the function that is responsible for the memory error:

        private static function strOrigReplace($search, $replace, $subject)
        {
                return strtr($subject, array_combine($search, $replace));
        }

2020.06-RC
PHP 7.3

@MrPetovan
Copy link
Collaborator Author

Do you have any more information (trace, offending post body)?

@AlfredSK
Copy link

Unfortunately, no. There is no trace info. Just the line I provided. And honestly, I don't know how to track down the corresponding post.

Oh! I just found that the same fatal error happens on line 51.

@AlfredSK
Copy link

AlfredSK commented Jun 29, 2020

2020.06-rc: a notice, a warning and a fatal error

[29-Jun-2020 21:50:29 UTC] PHP Notice:  Trying to get property 'link' of non-object in /var/www/html/libranet/include/enotify.php on line 482
[29-Jun-2020 21:50:29 UTC] PHP Warning:  Creating default object from empty value in /var/www/html/libranet/include/enotify.php on line 482
[29-Jun-2020 21:50:29 UTC] PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Friendica\BaseRepository::update() must be an instance of Friendica\BaseModel, instance of stdClass given, called in /var/www/html/libranet/include/enotify.php on line 484 and defined in /var/www/html/libranet/src/BaseRepository.php:142
Stack trace:
#0 /var/www/html/libranet/include/enotify.php(484): Friendica\BaseRepository->update(Object(stdClass))
#1 /var/www/html/libranet/include/enotify.php(650): notification(Array)
#2 /var/www/html/libranet/include/enotify.php(577): check_item_notification('73788053', 600, 32)
#3 /var/www/html/libranet/src/Model/Item.php(1941): check_user_notification('73788053')
#4 /var/www/html/libranet/src/Protocol/ActivityPub/Processor.php(546): Friendica\Model\Item::insert(Array)
#5 /var/www/html/libranet/src/Protocol/ActivityPub/Processor.php(208): Friendica\Protocol\ActivityPub\Processor::postItem(Array, Array)
#6 /var/www/html/libranet/src/Protocol/ActivityPub/Receiver.php(377): Friendica\Protocol\ActivityPub\Processor::createItem(Array)
 in /var/www/html/libranet/src/BaseRepository.php on line 142

Addressed in #8831

@MrPetovan
Copy link
Collaborator Author

Whoa, that's a pretty nice straight flush.

@MrPetovan
Copy link
Collaborator Author

Can you please check for an SQL error at the same timestamp in the friendica log?

@AlfredSK
Copy link

AlfredSK commented Jun 29, 2020

Maybe this?

2020-06-29T21:50:29Z index [ERROR]: DB Error {"code":1054,"error":"Unknown column 'paren
t-item.author-id' in 'on clause'","callstack":"DBA::p, Item::select, Diaspora::receivePa
rticipation, Diaspora::dispatch, Receive::receiveUser, Receive::post, call_user_func, Mo
dule::run","params":"SELECT `item`.`id`, `item`.`uri-id`, `item`.`uri-id` AS `internal-u
ri-id`, `item`.`uid` AS `internal-uid`, `item`.`network` AS `internal-network`, `item`.`
psid` AS `internal-psid`, `item-content`.`verb`, `verb`.`name` AS `internal-verb`, `auth
or`.`network` AS `author-network`, `parent-item-author`.`network` AS `parent-author-netw
ork` FROM `item` LEFT JOIN `contact` AS `author` ON `author`.`id` = `item`.`author-id` L
EFT JOIN `item-content` ON `item-content`.`uri-id` = `item`.`uri-id` LEFT JOIN `verb` ON
 `verb`.`id` = `item`.`vid` STRAIGHT_JOIN `contact` AS `parent-item-author` ON `parent-i
tem-author`.`id` = `parent-item`.`author-id` WHERE (`item`.`parent` = 73788004 AND `item
`.`gravity` IN (6, 3))"} - {"file":"Database.php","line":666,"function":"p","uid":"e91f2
e","process_id":19642}

Sorry for the line breaks.

Probably caused by PR "Prevent delivering AP comments to Diaspora".

Addressed in #8832

@MrPetovan
Copy link
Collaborator Author

Unrelated I'm afraid, it should be about the notify table.

@AlfredSK
Copy link

AlfredSK commented Jun 29, 2020

There is no other DB error with that timestamp.

Need to sleep now. Can have another look tomorrow.

@MrPetovan
Copy link
Collaborator Author

I believe you, there might be an additional cause.

@MrPetovan
Copy link
Collaborator Author

Found the cause.

@ghost
Copy link

ghost commented Jul 3, 2020

PHP Fatal error:  Uncaught Error: Wrong parameters for Exception([string $message [, long $code [, Throwable $previous = NULL]]]) in /friendica/addon/twitter/twitter.php:696
Stack trace:
#0 /friendica/addon/twitter/twitter.php(696): Exception->__construct('Failed upload', Array)
#1 /friendica/src/Core/Hook.php(219): twitter_post_hook(Object(Friendica\App), Array)
#2 /friendica/src/Worker/ForkHook.php(33): Friendica\Core\Hook::callSingle(Object(Friendica\App), 'notifier_normal', Array, Array)
#3 [internal function]: Friendica\Worker\ForkHook::execute('notifier_normal', Array, Array)
#4 /friendica/src/Core/Worker.php(409): call_user_func_array('Friendica\\Worke...', Array)
#5 /friendica/src/Core/Worker.php(310): Friendica\Core\Worker::execFunction(Array, 'ForkHook', Array, true)
#6  /friendica/src/Core/Worker.php(123): Friendica\Core\Worker::execute(Array)
#7  /friendica/addon/twitter/twitter.php on line 696

Addressed in friendica/friendica-addons#995

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants