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

[2019.09] PHP Fatal Errors #7297

Closed
MrPetovan opened this issue Jun 22, 2019 · 49 comments · Fixed by #7535
Closed

[2019.09] PHP Fatal Errors #7297

MrPetovan opened this issue Jun 22, 2019 · 49 comments · Fixed by #7535
Labels
Milestone

Comments

@MrPetovan
Copy link
Collaborator

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

@MrPetovan MrPetovan added the Bug label Jun 22, 2019
@MrPetovan MrPetovan added this to the 2019.09 milestone Jun 22, 2019
@MrPetovan MrPetovan pinned this issue Jun 22, 2019
@AndyHee
Copy link

AndyHee commented Jun 30, 2019

This is a recent fatal error, details here: https://friendica.hubup.pro/display/174591b4-155d-18c2-9291-98a040514688

PHP Notice:  Undefined variable: a in /var/www/friendica/src/Worker/OnePoll.php on line 615
PHP Fatal error:  Uncaught Error: Call to a member function getHostName() on null in /var/www/friendica/src/Worker/OnePoll.php:615
Stack trace:
#0 /var/www/friendica/src/Worker/OnePoll.php(139): Friendica\Worker\OnePoll::pollMail(Array, 1, '2019-06-30 13:1...')
#1 [internal function]: Friendica\Worker\OnePoll::execute(43595)
#2 /var/www/friendica/src/Core/Worker.php(402): call_user_func_array('Friendica\\Worke...', Array)
#3 /var/www/friendica/src/Core/Worker.php(299): Friendica\Core\Worker::execFunction(Array, 'OnePoll', Array, true)
#4 /var/www/friendica/src/Core/Worker.php(114): Friendica\Core\Worker::execute(Array)
#5 /var/www/friendica/bin/worker.php(54): Friendica\Core\Worker::processQueue(false)
#6 {main}
  thrown in /var/www/friendica/src/Worker/OnePoll.php on line 615

Fixed by #7332

@utzer
Copy link

utzer commented Jul 5, 2019

Expected behavior

Show photo.

Actual behavior

When I try to open certain photos from /photos/$user/album I get a http 500 error, which lead me to dig what is going on and then I saw I get a PHP error, there was nothing happening in the http error log, so just php it seems.

One block like this shows up in the log each time I press F5 or try to open another photo from the album.

[02-Jul-2019 12:42:31 Europe/Brussels] PHP Fatal error:  Uncaught TypeError: Argument 3 passed to get_responses() must be of the type array, bool given, called in /path/to/webroot/mod/photos.php on line 1541 and defined in https://social.yl.ms/photos/utzer/image/38aea7645d6d44c8b75c558993c99206include/conversation.php:1524
Stack trace:
#0 /path/to/webroot/mod/photos.php(1541): get_responses(Array, Array, false)
#1 /path/to/webroot/src/LegacyModule.php(71): photos_content(Object(Friendica\App))
#2 /path/to/webroot/src/LegacyModule.php(45): Friendica\LegacyModule::runModuleFunction('content')
#3 [internal function]: Friendica\LegacyModule::content()
#4 /path/to/webroot/src/App.php(1241): call_user_func(Array)
#5 /path/to/webroot/index.php(17): Friendica\App->runFrontend()
#6 {main}
  thrown in /path/to/webroot/include/conversation.php on line 1524

Steps to reproduce the problem

Go to some old photos, in my case it was an album from 2016.

Friendica version you encountered the problem

Latest released version, 2019.06.

Friendica source (git, zip)

git

PHP version

7.3.6

SQL version

10.3.16-MariaDB

A copy of #7340

Fixed by #7342

@MrPetovan
Copy link
Collaborator Author

Are you getting a string of Notice messages about undefined indices in mod/photos.php as well just before this fatal error?

@utzer
Copy link

utzer commented Jul 5, 2019 via email

@MrPetovan
Copy link
Collaborator Author

If the error_reporting value is set up to log notices as well, yes.

MrPetovan added a commit to MrPetovan/friendica that referenced this issue Jul 5, 2019
@utzer
Copy link

utzer commented Jul 5, 2019 via email

@utzer
Copy link

utzer commented Jul 6, 2019

No notices, just this as above (??):
thrown in /path/to/webroot/include/conversation.php on line 1524 [06-Jul-2019 05:09:05 Europe/Brussels] PHP Fatal error: Uncaught TypeError: Argument 3 passed to get_responses() must be of the type array, bool given, called in /path/to/webroot/mod/photos.php on line 1541 and defined in /path/to/webroot/include/conversation.php:1524 Stack trace: #0 /path/to/webroot/mod/photos.php(1541): get_responses(Array, Array, false) #1 /path/to/webroot/src/LegacyModule.php(71): photos_content(Object(Friendica\App)) #2 /path/to/webroot/src/LegacyModule.php(45): Friendica\LegacyModule::runModuleFunction('content') #3 [internal function]: Friendica\LegacyModule::content() #4 /path/to/webroot/src/App.php(1241): call_user_func(Array) #5 /path/to/webroot/index.php(17): Friendica\App->runFrontend() #6 {main} thrown in /path/to/webroot/include/conversation.php on line 1524

I changed the logging level to "E_ALL" only, which should include E_NOTICES and did "killall php" and a restart of httpd.

@MrPetovan
Copy link
Collaborator Author

Ok, thanks, the fatal error has been suppressed in #7342

@utzer
Copy link

utzer commented Jul 6, 2019

But this does not fix the problem, right?

@MrPetovan
Copy link
Collaborator Author

Indeed, we still try to fetch missing item data for old pictures, but at least it doesn't make the page crash.

@utzer
Copy link

utzer commented Jul 6, 2019

Sorry, but I have to ask again, what do you mean by this?

at least it doesn't make the page crash

I still get a http 500 error, so this is not what you mean by crash correct?

@MrPetovan
Copy link
Collaborator Author

500 error still isn't good, Has it been happening since you recently pulled? Can you provide the (hopefully new) error message triggering the 500 page?

@utzer
Copy link

utzer commented Jul 6, 2019

Nothing new in the php log, still like this:
[06-Jul-2019 16:47:59 Europe/Brussels] PHP Fatal error: Uncaught TypeError: Argument 3 passed to get_responses() must be of the type array, bool given, called in /path/to/webroot/mod/photos.php on line 1541 and defined in /path/to/webroot/include/conversation.php:1524 Stack trace: #0 /path/to/webroot/mod/photos.php(1541): get_responses(Array, Array, false) #1 /path/to/webroot/src/LegacyModule.php(71): photos_content(Object(Friendica\App)) #2 /path/to/webroot/src/LegacyModule.php(45): Friendica\LegacyModule::runModuleFunction('content') #3 [internal function]: Friendica\LegacyModule::content() #4 /path/to/webroot/src/App.php(1241): call_user_func(Array) #5 /path/to/webroot/index.php(17): Friendica\App->runFrontend() #6 {main} thrown in /path/to/webroot/include/conversation.php on line 1524

Nothing in the httpd log.

Edit: Meh... sorry, I guess I need to checkout to dev?
Edit2: Anything I need to know about that before I do checkout, like DB Updates or any new major functions?

@AlfredSK
Copy link

AlfredSK commented Jul 6, 2019

There are two minor DB updates in develop at the moment. No major changes. Only some bug fixes iirc. The checkout from current master to develop was a no-brainer.

@utzer
Copy link

utzer commented Jul 8, 2019

There are two minor DB updates in develop at the moment. No major changes. Only some bug fixes iirc. The checkout from current master to develop was a no-brainer.

I think that will take a long time, the progress in mysql at least is not increasing sind 200 seconds. :-D

Edit: Less than an hour, but more than 30 minutes... too big database and too slow server. :-/

@utzer
Copy link

utzer commented Jul 8, 2019

Update: This shows up in php logs:

[08-Jul-2019 05:13:07 Europe/Brussels] PHP Notice:  Undefined index: uri in /path/to/webroot/include/conversation.php on line 1529
[08-Jul-2019 05:13:07 Europe/Brussels] PHP Fatal error:  Uncaught BadFunctionCallException: defaults($arr, $key, $def) $key is null in /path/to/webroot/boot.php:348
Stack trace:
#0 /path/to/webroot/include/conversation.php(1529): defaults(Array, NULL, 0)
#1 /path/to/webroot/mod/photos.php(1542): get_responses(Array, Array, Array)
#2 /path/to/webroot/src/LegacyModule.php(71): photos_content(Object(Friendica\App))
#3 /path/to/webroot/src/LegacyModule.php(45): Friendica\LegacyModule::runModuleFunction('content')
#4 [internal function]: Friendica\LegacyModule::content()
#5 /path/to/webroot/src/App.php(1258): call_user_func(Array)
#6 /path/to/webroot/index.php(17): Friendica\App->runFrontend()
#7 {main}
  thrown in /path/to/webroot/boot.php on line 348

I still get the HTTP 500 fault.

Fixed by #7349

@MrPetovan
Copy link
Collaborator Author

Thanks, yes there still is a crash, but it isn't on the same place. Progress!

@utzer
Copy link

utzer commented Jul 9, 2019

I get a new error and my system just shows the maintenance mode.

[09-Jul-2019 06:37:46 Europe/Berlin] PHP Fatal error: Uncaught Error: Undefined class constant 'Success' in /path/to/webroot/update.php:385 Stack trace: #0 /path/to/webroot/src/Core/Update.php(187): update_1318() #1 /path/to/webroot/src/Core/Update.php(139): Friendica\Core\Update::runUpdateFunction(1318, 'update') #2 /path/to/webroot/src/Core/Update.php(52): Friendica\Core\Update::run('/path/to/webroot') #3 /path/to/webroot/bin/worker.php(36): Friendica\Core\Update::check('/path/to/webroot', true, Object(Friendica\App\Mode)) #4 {main} thrown in /path/to/webroot/update.php on line 385

@MrPetovan
Copy link
Collaborator Author

It shouldn't occur anymore with the latest develop.

@annando
Copy link
Collaborator

annando commented Jul 9, 2019

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Friendica\Util\Network::post() must be of the type string, null given, called in /src/Protocol/DFRN.php on line 1460 and defined in /src/Util/Network.php:253
Stack trace:
#0 /src/Protocol/DFRN.php(1460): Friendica\Util\Network::post(NULL, '{"aes_key":"jhr...', Array)
#1 /src/Worker/Delivery.php(303): Friendica\Protocol\DFRN::transmit(Array, Array, '<?xml version="...', false)
#2 /src/Worker/Delivery.php(181): Friendica\Worker\Delivery::deliverDFRN('wall-new', Array, Array, Array, Array, true, false, false)
#3 [internal function]: Friendica\Worker\Delivery::execute('wall-new', 32326353, 845808)
#4 /src/Core/Worker.php(402): call_user_func_array('Friendica\\Worke...', Array)
#5 /src/Core/Worker.php(299): Frien in /src/Util/Network.php on line 253

Fixed by #7360

@MrPetovan
Copy link
Collaborator Author

On it.

@MrPetovan
Copy link
Collaborator Author

If it doesn't happen that often, it may just be a dropped database connection. Nothing we can do, the fatal error actually is warranted.

@AlfredSK
Copy link

develop:

Uncaught ImagickException: no decode delegate for this image format `' @ error/constitute.c/ReadImage/504 in .../src/Object/Image.php:750
Stack trace:
#0 .../src/Object/Image.php(750): Imagick->__construct('photo')
#1 .../src/Content/Text/BBCode.php(440): Friendica\Object\Image::guessType('photo', true)
#2 .../src/Content/Text/Markdown.php(122): Friendica\Content\Text\BBCode::scaleExternalImages('[h3]Le canal d'...', false)
#3 .../src/Protocol/Diaspora.php(2922): Friendica\Content\Text\Markdown::toBBCode('[h3]Le canal d'...')
#4 .../src/Protocol/Diaspora.php(757): Friendica\Protocol\Diaspora::receiveStatusMessage(Array, Object(SimpleXMLElement), '<status_message...')
#5 .../src/Protocol/Diaspora.php(655): Friendica\Protocol\Diaspora::dispatch(Array, Array, Object(SimpleXMLElement))
#6 .../src/Protocol/Diaspora.php(1354): Friendica\Protocol\Diaspora::dispatchPu in .../src/Object/Image.php on line 750

@MrPetovan
Copy link
Collaborator Author

Seems specifically relevant to the post in question, would you be able to pull its source from the little the exception shows if it's a public post?

@AlfredSK
Copy link

Where do I have to look for it? In 'item-content' -> 'body' or somewhere else?

@MrPetovan
Copy link
Collaborator Author

Yes, then you can retrieve the GIUD and paste it in /admin/item/source

@AlfredSK
Copy link

Hmm. Empty result set. Does the body field content start with '[h3]Le canal'?
When I search for '[h3]Le ca' I get results but not for '[h3]Le canal'.

@MrPetovan
Copy link
Collaborator Author

What about searching for %Le canal d'%?

@AlfredSK
Copy link

AlfredSK commented Aug 18, 2019

Nothing found for the issue above. But I have a new one. :-)

Uncaught Error: Class 'Friendica\Module\Search\Login' not found in .../src/Module/Search/Directory.php:18
Stack trace:
#0 [internal function]: Friendica\Module\Search\Directory::content()
#1 .../src/App/Page.php(311): call_user_func(Array)
#2 .../src/App/Page.php(365): Friendica\App\Page->initContent(Object(Friendica\App\Module), Object(Friendica\App\Mode))
#3 .../src/App.php(742): Friendica\App\Page->run(Object(Friendica\App), Object(Friendica\App\BaseURL), Object(Friendica\App\Mode), Object(Friendica\App\Module), Object(Friendica\Core\L10n\L10n), Object(Friendica\Core\Config\PreloadConfiguration), Object(Friendica\Core\Config\PreloadPConfiguration))
#4 .../index.php(24): Friendica\App->runFrontend(Object(Friendica\App\Module), Object(Friendica\App\Router), Object(Friendica\Core\Config\PreloadPConfiguration))
#5 {main}
  thrown in .../src/Module/Search/Directory.php on line 18

Fixed by #7535

@MrPetovan
Copy link
Collaborator Author

On it.

@ghost
Copy link

ghost commented Aug 18, 2019

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Friendica\Model\Contact::unmarkForArchival() must be of the type array, boolean given, called in /src/Model/Contact.php on line 1818 and defined in a/src/Model/Contact.php:879
Stack trace:
#0 /src/Model/Contact.php(1818): Friendica\Model\Contact::unmarkForArchival(false)
#1 /src/Model/Contact.php(2017): Friendica\Model\Contact::updateContact(256476, 0, 'https://diasp.o...', Array)
#2 /src/Worker/UpdateContact.php(20): Friendica\Model\Contact::updateFromProbe(256476, '', true)
#3 [internal function]: Friendica\Worker\UpdateContact::execute(256476, 'force')
#4 /src/Core/Worker.php(400): call_user_func_array('Friendica\\Worke...', Array)
#5 /src/Core/Worker.php(299): Friendica\Core\Worker::execFunction(Array, 'UpdateContact', Array, true)
#6 /home/users/meld/www/frie in /home/users/meld/www/friendica/src/Model/Contact.php on line 879

Fixed by #7577

@utzer
Copy link

utzer commented Aug 19, 2019

I got a problem that the maximum number of processes that can be run was reached, not sure if this fault might be the cause, but maybe someone understands the error.

[19-Aug-2019 20:10:25 Europe/Berlin] PHP Fatal error: Uncaught Error: Call to a member function prepare() on null in /web/path/src/Database/Database.php:503 Stack trace: #0 /web/path/src/Database/Database.php(630): Friendica\Database\Database->p('SELECT jobsF...', Array) #1 /web/path/src/Database/Database.php(1453): Friendica\Database\Database->p('SELECTjobs F...', Array) #2 /web/path/src/Database/Database.php(1382): Friendica\Database\Database->select('worker-ipc', Array, Array, Array) #3 /web/path/src/Database/DBA.php(399): Friendica\Database\Database->selectFirst('worker-ipc', Array, Array, Array) #4 /web/path/src/Core/Worker.php(1321): Friendica\Database\DBA::selectFirst('worker-ipc', Array, Array) #5 /web/path/bin/daemon.php(193): Friendica\Core\Worker::IPCJobsExists() #6 {main} thrown in /web/path/src/Database/Database.php on line 503

Edit 1: There is many forks of MariaDB, not sure why it is forking so much. :-/

Edit 2: With the last MariaDB update the config was moved from /etc/mysql/my.cnf to /etc/my.cnf.d/*, just it wasn't moved/converted or anything, but actually a new blank config was created in /etc/my.cnf.d/

Fixed by #7577

@AlfredSK
Copy link

AlfredSK commented Sep 1, 2019

RC:

PHP Fatal error:  Uncaught Error: Call to undefined method Friendica\Core\L10n::getPokeVerbs() in .../mod/poke.php:165
Stack trace:
#0 .../src/LegacyModule.php(71): poke_content(Object(Friendica\App))
#1 .../src/LegacyModule.php(45): Friendica\LegacyModule::runModuleFunction('content')
#2 [internal function]: Friendica\LegacyModule::content()
#3 .../src/App/Page.php(311): call_user_func(Array)
#4 .../src/App/Page.php(365): Friendica\App\Page->initContent(Object(Friendica\App\Module), Object(Friendica\App\Mode))
#5 .../src/App.php(742): Friendica\App\Page->run(Object(Friendica\App), Object(Friendica\App\BaseURL), Object(Friendica\App\Mode), Object(Friendica\App\Module), Object(Friendica\Core\L10n\L10n), Object(Friendica\Core\Config\PreloadConfiguration), Object(Friendica\Core\Config\PreloadPConfiguration))
#6 .../index.php(24): Friendica\App->runFrontend(Object(Friendica\App\Module), Object(Friend in .../mod/poke.php on line 165

Fixed by #7593

@AlfredSK
Copy link

AlfredSK commented Sep 5, 2019

RC:

PHP Fatal error:  Uncaught Error: Class 'Friendica\Module\Register' not found in .../config/local-sample.config.php:37
Stack trace:
#0 {main}
  thrown in .../config/local-sample.config.php on line 37

@MrPetovan
Copy link
Collaborator Author

No one should be accessing this file, let alone directly from a browser like this, you can ignore it.

@ghost
Copy link

ghost commented Sep 12, 2019

PHP Fatal error: require(): Failed opening required a/vendor/composer/../paragonie/sodium_compat/autoload.php' (include_path= /vendor/pear/text_languagedetect:.:/usr/share/php') in /vendor/composer/autoload_real.php on line 70

@MrPetovan
Copy link
Collaborator Author

Please run bin/composer.phar install --no-dev at the root of your Friendica install.

@ghost
Copy link

ghost commented Sep 13, 2019

I did, some dependencies where updated

@MrPetovan
Copy link
Collaborator Author

You shouldn't be getting the same error again.

@nupplaphil
Copy link
Collaborator

Closed in favor of #7675

@nupplaphil nupplaphil unpinned this issue Sep 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants