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

🐛 Bug Report: sync with meilisearch in php does not work #327

Open
2 tasks done
barart opened this issue Feb 8, 2025 · 0 comments
Open
2 tasks done

🐛 Bug Report: sync with meilisearch in php does not work #327

barart opened this issue Feb 8, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@barart
Copy link

barart commented Feb 8, 2025

👟 Reproduction steps

Just clone the repo and create a new function, execute it and you got error curl error on the execution logs, and inspecting the executor container it throw this error:

`
Fatal error: Uncaught Http\Discovery\Exception\DiscoveryFailedException: Could not find resource using any discovery strategy. Find more information at http://docs.php-http.org/en/latest/discovery.html#common-errors

  • No valid candidate found using strategy "Http\Discovery\Strategy\CommonClassesStrategy". We tested the following candidates: Http\Discovery\Strategy\CommonClassesStrategy::symfonyPsr18Instantiate, GuzzleHttp\Client, Http\Discovery\Strategy\CommonClassesStrategy::buzzInstantiate.
  • No valid candidate found using strategy "Http\Discovery\Strategy\CommonPsr17ClassesStrategy". We tested the following candidates: .
    in /usr/local/server/src/function/vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php:41
    Stack trace:
    0 /usr/local/server/src/function/vendor/php-http/discovery/src/ClassDiscovery.php(94): Http\Discovery\Exception\DiscoveryFailedException::create(Array)
    1 /usr/local/server/src/function/vendor/php-http/discovery/src/Psr18ClientDiscovery.php(26): Http\Discovery\ClassDiscovery::findOneByType('Psr\Http\Client...')
    2 /usr/local/server/src/function/vendor/meilisearch/meilisearch-php/src/Http/Client.php(47): Http\Discovery\Psr18ClientDiscovery::find()
    3 /usr/local/server/src/function/vendor/meilisearch/meilisearch-php/src/Client.php(52): Meilisearch\Http\Client->__construct('xxxxxxxxxxxxxx', 'zzzzzzzzzzzzz', NULL, NULL, Array, NULL)
    4 /usr/local/server/src/function/src/index.php(42): Meilisearch\Client->__construct('xxxxx', 'zzzz')
    5 /usr/local/server/src/server.php(194): {closure}(Object(RuntimeContext))
    6 /usr/local/server/src/server.php(203): {closure}()
    7 @swoole-src/library/core/Coroutine/functions.php(43): {closure}()
    }
    Next Http\Discovery\Exception\NotFoundException: No PSR-18 clients found. Make sure to install a package providing "psr/http-client-implementation". Example: "php-http/guzzle7-adapter". in /usr/local/server/src/function/vendor/php-http/discovery/src/Psr18ClientDiscovery.php:28
    Stack trace:
    0 /usr/local/server/src/function/vendor/meilisearch/meilisearch-php/src/Http/Client.php(47): Http\Discovery\Psr18ClientDiscovery::find()
    1 /usr/local/server/src/function/vendor/meilisearch/meilisearch-php/src/Client.php(52): Meilisearch\Http\Client->__construct('xxxx', 'zzzzzzzzzzzz', NULL, NULL, Array, NULL)
    2 /usr/local/server/src/function/src/index.php(42): Meilisearch\Client->__construct('xxxxx', 'zzzzzzzzzzz')
    3 /usr/local/server/src/server.php(194): {closure}(Object(RuntimeContext))
    4 /usr/local/server/src/server.php(203): {closure}()
    5 @swoole-src/library/core/Coroutine/functions.php(43): {closure}()
    }
    thrown in /usr/local/server/src/function/vendor/php-http/discovery/src/Psr18ClientDiscovery.php on line 28
    `

👍 Expected behavior

should sync with meilisearch

👎 Actual Behavior

it throw error

🎲 Appwrite version

Version 1.5.x

💻 Operating system

Linux

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@barart barart added the bug Something isn't working label Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant