• Resolved JacobTheDev

    (@revxx14)


    On a few of our clients websites, we’re seeing a strange issue with Smush. When you go to upload an image, it gets stuck uploading at 100%. After a few minutes, it errors out with a message “The server cannot process the image.” The image actually does get uploaded, but you have to refresh the editor page to actually be able to select it.

    This only started occurring within the last few weeks, and disabling Smush fixes the problem. We tried rolling back to the previous release, but that made no difference.

    I don’t see any error output in the JavaScript console, nor in the PHP error log. I’m not sure were to even begin trying to track down this issue. What could be causing this?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @revxx14,

    Could you please try adding the following define inside the wp-config.php file and then check whether it makes any difference?
    define( 'WP_SMUSH_ASYNC', false );

    Please make sure to place the above code, just before the line /* That’s all, stop editing! Happy blogging. */

    If the issue is still the same even after above then please enable debug mode and see whether it helps in giving further clue regarding the issues noticed.

    You can find more details about debugging here:
    https://www.ads-software.com/support/article/debugging-in-wordpress

    Please do let us know how that goes. Looking forward to your response.

    Kind Regards,

    Nithin

    Thread Starter JacobTheDev

    (@revxx14)

    WP_SMUSH_ASYNC doesn’t seem to do anything unfortunately… I just ran in to a similar issue on another site, disabling Smush once again fixed it. It seems like it’s getting stuck trying to process images, causing everything else to slow down and error out. Would really appreciate any further guidance you can provide.

    This other client is on 3.10.3 for what that’s worth.

    Thread Starter JacobTheDev

    (@revxx14)

    I was able to get some errors to log, this is what we’re seeing:

    [14-Mar-2023 13:44:51 UTC] PHP Fatal error:  Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function “ajax_response” not found or invalid function name in /home4/myusername/public_html/wp-includes/class-wp-hook.php:308

    Stack trace:

    #0 /home4/myusername/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array)

    #1 /home4/myusername/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)

    #2 /home4/myusername/public_html/wp-admin/admin-ajax.php(203): do_action(‘wp_ajax_nopriv_…’)

    #3 {main}

      thrown in /home4/myusername/public_html/wp-includes/class-wp-hook.php on line 308

    Thread Starter JacobTheDev

    (@revxx14)

    Under Smush -> Bulk Smush, disable “Automatic compression” allows images to upload, but of course they then don’t get compressed, and bulk smush doesn’t work either.

    We also tried duplicating this site to a demo hosting environment, on the same server, with the same settings, and yet it works fine there…

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    HI @revxx14

    If you’re using 3.10.3 version of the plugin – are you by any chance powering the site with PHP 8.0 or newer?

    If yes, this may cause issues and at least 3.12.5 would be recommended version.

    That is, if it comes to the errors that you shared here:

    https://www.ads-software.com/support/topic/fails-to-process-images/#post-16558414

    If it comes to the issue reported initially

    – is there any other plugin on site that is in any way related to image processing (may be image optimization but may be some other tool that, e.g. automatically crops images edits them in any way – other than what WordPress core does out of the box)?

    – is there any firewall active on site or server? If yes, can you please make sure that following IP is fully allowed (not restricted two-way communication over HTTPS port)?: 159.89.254.12

    Kind regards,
    Adam

    Thread Starter JacobTheDev

    (@revxx14)

    That IP address is allowed, but it has made no difference. I just tried compressing with the “Network” panel open to try to see what’s happening. It gets stuck on async-upload.php for about 6 minutes… not sure if that’s helpful or not. Everything returns 200.

    Thread Starter JacobTheDev

    (@revxx14)

    I found an actual error message! I was testing various versions of Smush, trying to identify when the issue started. When I got to 3.10.3, and went to “Bulk Smush,” I got the following error:

    Error posting to API: cURL error 28: Failed to connect to smushpro.wpmudev.com port 443 after 10001 ms: Timeout was reached

    Thread Starter JacobTheDev

    (@revxx14)

    Thanks to that error, we were able to track it down! The IP address for smushpro.wpmudev.com was blocked on our servers, adding the IP address 165.227.251.120 to our allowed list seems to have cleared up the issue. Thanks so much for your help, I know this has been a frustrating issue (at least for us it has been).

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @revxx14

    Thank you for response and I’m happy you have found solution.

    Thank you also for sharing it. I have also passed information about this to our developers and docs team so they’d make sure that all the docs are updates.

    Thanks again and I suppose we can consider the case closed, right?

    Best regards,
    Adam

    Thread Starter JacobTheDev

    (@revxx14)

    Yes, this is now resolved.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Fails to process images’ is closed to new replies.