Support » Plugin: OMGF | Host Google Fonts Locally » http does not work – even in 4.3.2

  • In the changelog for 4.3.2: “When site is not using SSL, SSL verification (sslverify) is disabled while contacting the Download API.”

    But my local no SSL site (= http:) shows this error, as before: “OMGF ist beim Herunterladen von Google Fonts auf einen Fehler gestoßen: http_request_failed – cURL error 7: Failed to connect to awp.test port 443: Connection refused”

    And no fonts are downloaded.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Well, that sucks… I’ll do some more testing and see if I can come up with a different approach!

    Honestly, now that most hosting providers include free SSL certificates, and HTTPS enables the superior performance of HTTP/2 (and even HTTP/3), I’m not sure why anyone is still on HTTP.

    If switching was ever an issue, the latest version of WordPress made it a non-issue, so even this shouldn’t prevent sites from running on HTTPS.

    Thread Starter burnuser

    (@burnuser)

    Yes, Gal Baras, you are right, HTTPS is a standard in WordPress hosting.

    But local test environments on local computers, broadly used for development and training of WordPress newbies, rely already on HTTP! Because HTTPS is not necessary for local usage on your own computer and – in a lot of cases – a big source of local problems too.

    So, being able to work also with HTTP is an important feature for every plugin!
    And Daan van den Bergh, as the great great guy he is, will do a great job in resolving this special problem 🙂

    Is it possible Google is trying to confirm your hostname and/or public IP address via DNS and failing?

    Thread Starter burnuser

    (@burnuser)

    Thank You for Your ongoing efforts to solve this problem!
    But I hardly dare to say it. Unfortunately, version 4.4 did not provide a solution either.

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Well, at this point you should’ve just lied to me and tell me it worked!

    No, I’m kidding. I tested it on my local dev environment (without SSL) and it worked!

    What’s your local dev URL? Because then I’ll replicate it and see what happens.

    Also, do you use a specific platform to setup your environment?

    Thread Starter burnuser

    (@burnuser)

    Test 1: Windows with Laragon: https://laragon.org/
    with up to date components:
    Apache 2.4.46
    MySQL 5.7.32
    PHP 7.4.16
    Result: OMGF ist beim Herunterladen von Google Fonts auf einen Fehler gestoßen: http_request_failed – cURL error 7: Failed to connect to wordpress.test port 443: Connection refused

    Test 2: Windows with https://localwp.com/
    bzw. Download: https://localwp.com/releases/
    Apache or nginx
    Result: OMGF ist beim Herunterladen von Google Fonts auf einen Fehler gestoßen: http_request_failed – cURL error 28: Operation timed out after 30001 milliseconds with 0 bytes received

    + tested Laragon with another computer:
    OMGF ist beim Herunterladen von Google Fonts auf einen Fehler gestoßen: http_request_failed – cURL error 35: error:1408F10B:SSL routines:ssl3_get_record:wrong version number

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    I don’t know what to tell you. Sorry. I’ve never had issues with my local environments and I thought this would fix it.

    If you are absolutely sure that you have your local self-signed certificates properly set up, then I have no clue why this would happen.

    I’ve worked on MAMP, Docker and a bunch of other VM’s. Never had issues.

    I’ll leave this issue on my to-do list. If I ever run into something that I think might fix it, I’ll implement it immediately. But for now, I’m sorry, I simply don’t know how to help you with this.

    I don’t see a full plugin and theme isolation in this thread. Maybe @burnuser can start with that, as this seems like a specific issue?

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Definitely! I think it’s worth a try.

    Thread Starter burnuser

    (@burnuser)

    New test with WP 5.7.2, Theme “Twenty Sixteen”, installed in new environment with OMGF plugin installed (and nothing else):

    A) Local 5.10.5 https://localwp.com/releases/
    Apache 2.4.43
    PHP 7.4.1
    MariaDB 10.4.10
    => http_request_failed – cURL error 28: Operation timed out after 30001 milliseconds with 0 bytes received

    digging a bit deeper, Tools => site health => REST API error
    cURL error 28: Operation timed out after 10014 milliseconds with 0 bytes received (http_request_failed)

    Changing server to nginx, the REST API error disappears (=> maybe a problem with Apache server?!)
    OMGF: “Save & Optimize” => same error message as with Apache; no fonts in list
    BUT: after reloading the browser page, the fonts are there AND it works with http

    B) Laragon https://laragon.org/
    Apache 2.4.48
    PHP 7.4.19
    MySQL 5.7.33
    => http_request_failed – cURL error 7: Failed to connect to wordpress.test port 443: Connection refused
    No REST API error is shown, but OMGF does not work anyway

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Ah, look at that. Progress! 🙂

    Happy to see that at least LocalWP sort of works. I’ve seen the fonts appearing after reload happen on other hosts, too. I always assumed that it had something to do with some type of object or php caching. But I don’t suppose LocalWP has something like preinstalled, right?

    Why Laragon doesn’t work, I wouldn’t know. But for development on Windows I would suggest using a combination of Docker and Ubuntu through WSL2. It’s blazing fast, like you’re actually on Ubuntu.

    I’ll add it to my todo list, though. I’d like to figure out why Laragon and OMGF don’t play along nicely.

    Thanks for getting back to me!

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.