• Resolved futureyoon

    (@futureyoon)


    Hi

    I am getting the error as below.

    when I was tyring to re-generate all the images.
    An error occurred while connecting to REST API. Please try again
    https://prnt.sc/1t7nj7v

    I have gone through all other enquiries about this error but didnt get the final solution how to fix this issue. clearing cache didnt seem to fix the issue.

    with my limited knowledge, it appears to be something to do with permission.
    can you help list down file path of all the files involved for API to run and what is the author / user name to call this API?
    might need to approve the rightful permission..? it might be happening due to server author and wp author difference?

    Anyway do you have any support docs or checklist so far that you have collected? so we can go through it?

    Thank you

    • This topic was modified 3 years, 2 months ago by futureyoon.
    • This topic was modified 3 years, 2 months ago by futureyoon.
    • This topic was modified 3 years, 2 months ago by futureyoon.
    • This topic was modified 3 years, 2 months ago by futureyoon.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter futureyoon

    (@futureyoon)

    This is interesting… while preparing the screenshot of debug.log.. when i turned on define( ‘WP_DEBUG’, true );
    then the issue is gone…
    Do you have any idea? I am re-generating the images.
    i will turn off wp_debug after that and will see what will come out.

    Same problem (An error occurred while connecting to REST API.) with no errors in debug

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @vaikis Open Dev Tools in your browser before starting the image conversion process. What is in the Network tab in Dev Tools when a convert error occurs?

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @futureyoon, @vaikis Please download this plugin version and start again images conversion:
    https://gbiorczyk.pl/webp-converter-for-media-beta1.zip

    What error are you seeing now?

    An error occurred while connecting to REST API. Please try again.
    
    {"message":"Request failed with status code 524","name":"Error","stack":"Error: Request failed with status code 524\n at createError (https://****/wp-content/plugins/webp-converter-for-media/assets/build/js/scripts.js?ver=20210923131834.3.2.1:672:15)\n at settle (https://****/wp-content/plugins/webp-converter-for-media/assets/build/js/scripts.js?ver=20210923131834.3.2.1:946:12)\n at XMLHttpRequest.onloadend (https://****/wp-content/plugins/webp-converter-for-media/assets/build/js/scripts.js?ver=20210923131834.3.2.1:74:7)","config":{"url":"https://****/wp-json/webp-converter/v1/paths?_wpnonce=ad61e3f1b6","method":"post","data":{},"headers":{"Accept":"application/json, text/plain, */*"},"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false}}}
    
    {"data":"\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n \n\n
    \n
    \n
    \n \n Error\n 524\n
    \n Ray ID: **** •\n 2021-09-23 13:20:16 UTC\n
    A timeout occurred
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n \n \n
    \n You\n
    Browser
    \n Working\n
    \n\n
    \n
    \n \n \n
    \n Hamburg\n
    Cloudflare
    \n Working\n
    \n\n
    \n
    \n \n \n
    \n ****\n
    Host
    \n Error\n
    \n\n
    \n \n
    \n
    \n\n
    \n
    \n
    \n
    What happened?
    \n
    The origin web server timed out responding to this request.
    
    \n
    \n \n
    \n
    What can I do?
    \n
    If you're a visitor of this website:
    \n
    Please try again in a few minutes.
    
    \n\n
    If you're the owner of this website:
    \n
    The connection to the origin web server was made, but the origin web server timed out before responding. The likely cause is an overloaded background task, database or application, stressing the resources on your web server. To resolve, please work with your hosting provider or web development team to free up resources for your database or overloaded application. Additional troubleshooting information here.
    
    \n
    \n
    \n \n
    \n\n
    \n
    \n Cloudflare Ray ID: ****\n •\n Your IP: ****\n •\n Performance & security by Cloudflare\n \n
    
    \n
    \n\n\n
    \n
    \n\n\n\n","status":524,"statusText":"","headers":{"cache-control":"private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0","cf-ray":"****-HAM","content-type":"text/html; charset=UTF-8","date":"Thu, 23 Sep 2021 13:20:16 GMT","expires":"Thu, 01 Jan 1970 00:00:01 GMT","referrer-policy":"same-origin","server":"cloudflare","x-frame-options":"SAMEORIGIN"},"config":{"url":"https://****/wp-json/webp-converter/v1/paths?_wpnonce=ad61e3f1b6","method":"post","data":{},"headers":{"Accept":"application/json, text/plain, */*"},"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false}},"request":{}}
    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @vaikis It looks like your server starts blocking connections after a while. The plugin has no influence on this.

    In this case, convert the images again until you succeed. Do not select “Force convert all images again” option when restarting image conversion. Then only the images that have not been converted before will be converted.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘An error occurred while connecting to REST API’ is closed to new replies.