Skip to content

Carnet Breaks Elasticsearch #218

@FlattusBlastus

Description

@FlattusBlastus

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!!!

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions