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

I get a white screen when i activate this plugin #650

Closed
roger2014jr opened this issue Feb 18, 2018 · 38 comments
Closed

I get a white screen when i activate this plugin #650

roger2014jr opened this issue Feb 18, 2018 · 38 comments

Comments

@roger2014jr
Copy link

I'm using the latest WordPress with a multi-site install, Now I'm stuck and have to figure out how to uninstall this plugin manually

@afragen
Copy link
Owner

afragen commented Feb 19, 2018

Try adding define( ‘WP_DEBUG’, true ); in your wp-config.php file to see where the error is.

@picasso
Copy link

picasso commented Feb 19, 2018

PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /wp-content/plugins/github-updater/src/Singleton.php on line 39, referer: /wp-admin/update-core.php

I've got this error when updated github-updater from version 7.3.1.19 to version 7.5.0.7

@afragen
Copy link
Owner

afragen commented Feb 19, 2018

500 internal server errors are often difficult to figure out. https://www.google.com/search?q=500+internal+server+error

My test site have 768M allocated to memory. Most of these errors are related to htaccess files.

@afragen
Copy link
Owner

afragen commented Feb 19, 2018

Line 39 of Singleton is a call to the PHP function debug_backtrace().

I’m looking at ways to limit this but likely won’t be able to test until tonight.

@afragen
Copy link
Owner

afragen commented Feb 19, 2018

For now you can comment out https://github.com/afragen/github-updater/blob/develop/src/Singleton.php#L39 until I can fix and test. This will likely cause several non-fatal PHP errors.

@reddog
Copy link

reddog commented Feb 19, 2018

Can confirm I also get the same error with a fresh install of WordPress 4.9.4 on Ubuntu 16.04.

Removing the github-updater-develop folder from plugins (I downloaded the zip from https://github.com/afragen/github-updater which appears to auto-download the develop branch), and then installing the 7.5.0 release from https://github.com/afragen/github-updater/releases/tag/7.5.0 , it looks like all is okay.

@afragen
Copy link
Owner

afragen commented Feb 19, 2018

Thanks @reddog. I believe the debug_backtrace() was a conditional call in the master branch but I changed to make it happen all the time. I’m working on a fix.

@afragen
Copy link
Owner

afragen commented Feb 20, 2018

Update to latest develop branch and let me know if the memory issue persists. Thanks.

@teolaz
Copy link

teolaz commented Feb 22, 2018

Same error with last develop branch version (line 41), switched to 7.5.0 as suggested by @reddog and now it's working again...

@afragen
Copy link
Owner

afragen commented Feb 22, 2018

So the problem is that there is really no difference in Singleton.php from the develop branch to 7.5.0

I realize that this is where the error is firing but can people share anything else that they did to there installations in the same timeframe?

Does this issue persist in a local installation?

@afragen
Copy link
Owner

afragen commented Feb 22, 2018

Can people provide server details. PHP version, WP version, PHP memory available?

@afragen
Copy link
Owner

afragen commented Mar 2, 2018

Is there anything new? I’ve been unable to replicate this issue, does it still exist?

@tomkenkel
Copy link

tomkenkel commented Mar 2, 2018

Still exists. WP 4.9.4; Ubuntu 16.04 LTS; PHP 7.0.27; PHP Memory Limit 256MB.

@afragen
Copy link
Owner

afragen commented Mar 3, 2018

Can we all test in a local environment. I’d like to try and replicate this but haven’t been able to.

Test using default theme and only with the GitHub Updater plugin active.

@tomkenkel
Copy link

Using scotchbox. New WP install; twentyseventeen theme; GitHub Updater the only active plugin.

screenshot 2018-03-03 19 32 36

@afragen
Copy link
Owner

afragen commented Mar 4, 2018

Can you rename github-updater-develop to github-updater?

@afragen
Copy link
Owner

afragen commented Mar 4, 2018

Are there any mu-plugins?

@afragen
Copy link
Owner

afragen commented Mar 4, 2018

@tomkenkel does switching to v7.5.0 work for you?

@tomkenkel
Copy link

I renamed the directory. No fix.
No mu-plugins. Full plugin list is Akismet, Hello Dolly, and GitHub Updater. Only GHU is active.
7.5.0 works as expected. All previous versions of this plugin have been great. Thank you for making it!

@afragen
Copy link
Owner

afragen commented Mar 4, 2018

@tomkenkel I have to say I don’t really understand why 7.5.0 works but develop doesn’t. The Singleton class isn’t significantly different between the 2 versions.

@tomkenkel
Copy link

I’m not good at PHP, but I don't think it's the class. Replacing the Singleton class in develop with the class from 7.5.0 creates a different error:
“Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes)…”

@afragen
Copy link
Owner

afragen commented Mar 4, 2018

The odd thing is there’s not a significant amount of difference in the develop branch.

Can you add the following in wp-config.php and check the debug.log in wp-content?

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

@afragen
Copy link
Owner

afragen commented Mar 4, 2018

Interesting, a new error. Can you change the timeout? https://www.fdgweb.com/increase-php-timeout-values-apache-ngnix/

And I have zero idea why there would be a timeout here. Not even hitting an API. You might try adding the filter to bypass wp-cron and eliminate that as an issue.

add_filter( 'github_updater_disable_wpcron', '__return_true' );

@tomkenkel
Copy link

Longer timeout

[04-Mar-2018 23:05:18 UTC] PHP Fatal error: Maximum execution time of 240 seconds exceeded in /var/www/public/site/wp-content/plugins/github-updater/src/Singleton.php on line 41

[04-Mar-2018 23:06:41 UTC] PHP Fatal error: Maximum execution time of 240 seconds exceeded in /var/www/public/site/wp-content/plugins/github-updater/src/Singleton.php on line 42

[04-Mar-2018 23:10:08 UTC] PHP Fatal error: Maximum execution time of 240 seconds exceeded in /var/www/public/site/wp-content/plugins/github-updater-develop/src/Singleton.php on line 41

@afragen
Copy link
Owner

afragen commented Mar 4, 2018

Set the timeout for 600, humor me.

Also, if you could dump the $backtrace variable from that line to a gist, that would help.

@afragen
Copy link
Owner

afragen commented Mar 4, 2018

Another thing to try is changing the line to the following.

$backtrace = debug_backtrace( $limit = 2 );

@afragen
Copy link
Owner

afragen commented Mar 4, 2018

Odd that a standard PHP function would timeout.

@afragen
Copy link
Owner

afragen commented Mar 6, 2018

Can you try the branch no-backtrace and let me know if that works?

@tomkenkel
Copy link

Different error

[06-Mar-2018 13:18:46 UTC] PHP Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 262144 bytes) in /var/www/public/site/wp-includes/option.php on line 1186 [06-Mar-2018 13:18:47 UTC] PHP Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 262144 bytes) in /var/www/public/site/wp-includes/load.php on line 679

This was run on Scotchbox’s recently updated server stack. I can try tonight with the stack I used when we started.

@afragen
Copy link
Owner

afragen commented Mar 6, 2018

Is there more in the error logs? This error doesn't seem to trace back to GitHub Updater directly, does it?

@afragen
Copy link
Owner

afragen commented Mar 8, 2018

I think I may have found an fixed this error. I think it may be related to #656

Please test and let me know.

@tomkenkel
Copy link

tomkenkel commented Mar 8, 2018

Installs and activates as expected. I was able to install and activate a theme from GitHub. I haven’t tried updating the theme. I started getting the cron warning below after updating Scotchbox. It’s always something.

Thanks for your persistence!

screenshot 2018-03-08 08 08 38

@afragen
Copy link
Owner

afragen commented Mar 8, 2018

That’s just a warning that WP-Cron hasn’t run in over 24 hours. If this persists it may mean that something in the server setup is interfering with how WP-Cron runs and you might need to create an actual cron job. Look at the wiki regarding background processing.

@afragen
Copy link
Owner

afragen commented Mar 9, 2018

@roger2014jr @teolaz @reddog @picasso please let me know if this issue is fixed for you. Thanks.

@afragen
Copy link
Owner

afragen commented Mar 10, 2018

@tomkenkel you can also turn off background processing with a filter to see if the issue is WP-Cron only.

add_filter( 'github_updater_disable_wpcron', '__return_true' );

@teolaz
Copy link

teolaz commented Mar 12, 2018

@afragen updated to 7.5.0, cannot get again the same error on different sites :S

@afragen
Copy link
Owner

afragen commented Mar 12, 2018

The error was on the develop branch, not the release.

@afragen
Copy link
Owner

afragen commented Mar 24, 2018

This is fixed in latest develop branch. I had inadvertently created an infinite loop. 🤦‍♂️

@afragen afragen closed this as completed Mar 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants