-
Notifications
You must be signed in to change notification settings - Fork 54
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
Potential Bug In Local By Flywheel Lightning on Windows #87
Comments
Following, thanks Richard! |
This is looking more and more like a server configuration issue
|
@richaber thanks for looking deeper. Still strange to me though, version 1.3.0 of this plugin works fine, but 1.4.0 breaks. Could there be some resiliency added in 1.4.0 to account for this difference? |
The biggest difference between version 1.3.0 and 1.4.0 of the plugin, is that we upgraded the bundled official Algolia PHP API Client from 1.23.0 to 2.7.0. From what I have read in the code, other than API changes, and some method replacements, the biggest difference that could have an impact on this particular issue, that I can determine, is that they removed their own certificate bundle from the client. I think we might be able get around that by implementing our own cURL options, but I need to test that. |
@dingman are you able to modify the php.ini in your local environment? |
@richaber yes |
Hello @dingman, I've been troubleshooting this with @richaber and we have a workaround for now. We've discovered that the issue seems to be something specific to Local Lightning on Windows, and that the plugin does work under Xampp. If we use the certificate provided with Xampp in a Local site's setup, then we can successfully connect to Algolia's server using v1.4 of the plugin. Here's a copy of the certificate provided with xampp: curl-ca-bundle.zip Just for the record the Xampp version I used is 7.4.1 and it's available here, if you'd like to get it directly from Xampp's maintainers: https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/7.4.1/ I edited my Local site's
Note that your paths will be different. I've added mine for context. You can place the After that, just restart your Local site, and you should be in business. Windows 10 Pro v2004, Local v5.7.2+408, Site: PHP 7.3.5, Nginx, MySQL 5.7.28 |
@daveromsey I have done what you suggested, however the issue still persists. TIA for any next steps. |
Actually, I was mistaken. My update hadn't saved properly. Upon updating it, it seems like I'm making progress. I'll confirm once I have more updates. |
Looks like that solved it! Great, thank you. I'll file a bug with LocalWP on this. |
I am leaving this ticket open for my own reference, while I work through a potential "out-of-the-box" solution in a try branch. |
We should document this in the wiki in #90 (if we get that in progress before the "try" branch I've been looking into for including our own cURL cert). |
I can confirm that following the steps from #87 (comment) I got it working |
Describe the bug
WordPress Support Thread: https://wordpress.org/support/topic/impossible-to-connect-please-check-your-algolia-application-id/
It appears that WP Search with Algolia version 1.4.0, running on Local By Flywheel Lightning, in a Windows Host machine, has difficulty connecting to Algolia's servers, and displays the following message on the settings screen...
Screenshots
Additional context
Downgrading WP Search with Algolia to version 1.3.0, appears to work for the two Windows/Local Lightning users that have tested that so far.
I do not have Windows to test with, and am relying on user reports (2 that I am aware of) to help diagnose/debug.
I am considering writing a new CLI command for testing issues such as this. I have done some legwork in another branch that may prove useful for that.
I have seen reports of Algolia PHP Search Client and Laravel Scout (which uses the Algolia PHP Search Client) users overcoming an issue that sounds identical by installing a certificate on their server and updating their php.ini to include it. This is the least noisy and most concise explanation that I have seen for that: https://onlaravel.com/83-quickfix-for-impossible-to-connect-please-check-your-algolia-application-id
I have not been able to confirm if installing the certificate in Local Lightning and updating the php.ini solves the issue, and I do not fully understand how Local Lightning works on Windows, so providing support for that may be difficult.
It appears that the Algolia PHP Search Client removed
resources/ca-bundle.crt
in version 2.0.0, and my primary hypothesis at the moment is that the removal of the cert file from the Client may be causing Client cURL requests to fail SSL verification.This might end up being a server configuration issue, if we can't identify some other obvious code issue. Downgrading the Algolia PHP Search Client within the plugin does not seem like a good idea, since we would lose any bugfixes and improvements.
The text was updated successfully, but these errors were encountered: