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

Carnet Breaks Elasticsearch #218

Open
FlattusBlastus opened this issue Apr 1, 2024 · 0 comments
Open

Carnet Breaks Elasticsearch #218

FlattusBlastus opened this issue Apr 1, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@FlattusBlastus
Copy link

Describe the bug
A clear and concise description of what the bug is.
Documented here: nextcloud/fulltextsearch_elasticsearch#341

PHP Fatal error: Declaration of Elastic\Elasticsearch\Response\Elasticsearch::withStatus(int $code, string $reasonPhrase = ''): Psr\Http\Message\ResponseInterface must be compatible with Psr\Http\Message\ResponseInterface::withStatus($code, $reasonPhrase = '') in /var/www/nextcloud/apps/fulltextsearch_elasticsearch/vendor/elasticsearch/elasticsearch/src/Traits/MessageResponseTrait.php on line 87

SanMichele commented on Feb 19
Hi,
found it: With the app Carnet also comes ./apps/carnet/vendor/psr/http-message/src/ResponseInterface.php with the wrong declaration. Delete Carnet and the error is gone.
Kind regards, Michael

@s90570
s90570 commented on Feb 29
Hi, found it: With the app Carnet also comes ./apps/carnet/vendor/psr/http-message/src/ResponseInterface.php with the wrong declaration. Delete Carnet and the error is gone. Kind regards, Michael

Incomprehensible. Yes. It was enough to turn off the Carnet. But what is the problem? Carnet or Elasticsearch?

@random6150
random6150 commented on Feb 29 via email
I guess the problem was caused by Carnet. I removed Carnet and reinstalled
elasticsearch without any modification, everything works well.

From my previous modification, this might because Carnet incorporated and
old version of psr components, which loaded first.

TomS @.***> 於 2024年2月29日 週四 17:28 寫道:

@s90570
s90570 commented on Feb 29
I guess the problem was caused by Carnet. I removed Carnet and reinstalled elasticsearch without any modification, everything works well. From my previous modification, this might because Carnet incorporated and old version of psr components, which loaded first.

Exactly! I renamed /nextcloud/apps/carnet/vendor/psr/http-message to /nextcloud/apps/carnet/vendor/psr/http-messageOLD and made a symlink to /nextcloud/apps/fulltextsearch_elasticsearch/vendor/psr/http-message.
Carnet still uses psr/http-message version 1.x while elasticsearch uses version 2.0 already.

And it seems to be working. Many thanks gentlemen!!!

@PhieF PhieF added the bug Something isn't working label Aug 1, 2024
@PhieF PhieF self-assigned this Aug 1, 2024
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

2 participants