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

Weird random error: Cannot create an instance of "RavenDB\Http\LoadBalanceBehavior" #59

Open
Geolim4 opened this issue Jan 11, 2024 · 5 comments

Comments

@Geolim4
Copy link

Geolim4 commented Jan 11, 2024

Morning !

Today I noticed to get some random error I can't really explain on my CI/CD:

Do you have any ideas what could cause this error ?

It does not happens often, but only randomly.

[FAIL] Uncaught exception "\RuntimeException" in "~E:/projets/ravendb-extension/vendor/ravendb/ravendb-php-client/src/Http/RavenCommand.php" line 234 with message: "Symfony\Component\Serializer\Exception\MissingConstructorArgumentsException: Cannot create an instance of "RavenDB\Http\LoadBalanceBehavior" from serialized data because its constructor requires the following parameters to be present : "$value". in E:\projets\ravendb-extension\vendor\symfony\serializer\Normalizer\AbstractNormalizer.php:427
Stack trace:
#0 E:\projets\ravendb-extension\vendor\symfony\serializer\Normalizer\AbstractObjectNormalizer.php(295): Symfony\Component\Serializer\Normalizer\AbstractNormalizer->instantiateObject()
#1 E:\projets\ravendb-extension\vendor\symfony\serializer\Normalizer\AbstractObjectNormalizer.php(377): Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer->instantiateObject()
#2 E:\projets\ravendb-extension\vendor\symfony\serializer\Serializer.php(251): Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer->denormalize()
#3 E:\projets\ravendb-extension\vendor\symfony\serializer\Normalizer\AbstractObjectNormalizer.php(602): Symfony\Component\Serializer\Serializer->denormalize()
#4 E:\projets\ravendb-extension\vendor\symfony\serializer\Normalizer\AbstractObjectNormalizer.php(421): Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer->validateAndDenormalize()
#5 E:\projets\ravendb-extension\vendor\symfony\serializer\Serializer.php(251): Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer->denormalize()
#6 E:\projets\ravendb-extension\vendor\symfony\serializer\Normalizer\AbstractObjectNormalizer.php(602): Symfony\Component\Serializer\Serializer->denormalize()
#7 E:\projets\ravendb-extension\vendor\symfony\serializer\Normalizer\AbstractObjectNormalizer.php(421): Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer->validateAndDenormalize()
#8 E:\projets\ravendb-extension\vendor\symfony\serializer\Serializer.php(251): Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer->denormalize()
#9 E:\projets\ravendb-extension\vendor\symfony\serializer\Serializer.php(151): Symfony\Component\Serializer\Serializer->denormalize()
#10 E:\projets\ravendb-extension\vendor\ravendb\ravendb-php-client\src\Documents\Operations\Configuration\GetClientConfigurationCommand.php(38): Symfony\Component\Serializer\Serializer->deserialize()
#11 E:\projets\ravendb-extension\vendor\ravendb\ravendb-php-client\src\Http\RavenCommand.php(228): RavenDB\Documents\Operations\Configuration\GetClientConfigurationCommand->setResponse()
#12 E:\projets\ravendb-extension\vendor\ravendb\ravendb-php-client\src\Http\RequestExecutor.php(695): RavenDB\Http\RavenCommand->processResponse()
#13 E:\projets\ravendb-extension\vendor\ravendb\ravendb-php-client\src\Http\RequestExecutor.php(556): RavenDB\Http\RequestExecutor->executeOnSpecificNode()
#14 E:\projets\ravendb-extension\vendor\ravendb\ravendb-php-client\src\Http\RequestExecutor.php(459): RavenDB\Http\RequestExecutor->execute()
#15 E:\projets\ravendb-extension\vendor\ravendb\ravendb-php-client\src\Http\RefreshTask.php(22): RavenDB\Http\RequestExecutor->RavenDB\Http\{closure}()
#16 E:\projets\ravendb-extension\vendor\ravendb\ravendb-php-client\src\Http\RequestExecutor.php(1129): RavenDB\Http\RefreshTask->add()
#17 E:\projets\ravendb-extension\vendor\ravendb\ravendb-php-client\src\Http\RequestExecutor.php(649): RavenDB\Http\RequestExecutor->refreshIfNeeded()
#18 E:\projets\ravendb-extension\vendor\ravendb\ravendb-php-client\src\Http\RequestExecutor.php(567): RavenDB\Http\RequestExecutor->executeOnSpecificNode()
#19 E:\projets\ravendb-extension\vendor\ravendb\ravendb-php-client\src\Documents\Session\DocumentSession.php(463): RavenDB\Http\RequestExecutor->execute()
#20 E:\projets\ravendb-extension\vendor\ravendb\ravendb-php-client\src\Documents\Session\DocumentSession.php(385): RavenDB\Documents\Session\DocumentSession->loadById()
#21 E:\projets\ravendb-extension\lib\Phpfastcache\Extensions\Drivers\Ravendb\Driver.php(125): RavenDB\Documents\Session\DocumentSession->load()
#22 E:\projets\ravendb-extension\lib\Phpfastcache\Extensions\Drivers\Ravendb\Driver.php(118): Phpfastcache\Extensions\Drivers\Ravendb\Driver->getRavenDocument()
#23 E:\projets\ravendb-extension\vendor\phpfastcache\phpfastcache\lib\Phpfastcache\Core\Pool\CacheItemPoolTrait.php(217): Phpfastcache\Extensions\Drivers\Ravendb\Driver->driverRead()
#24 E:\projets\ravendb-extension\vendor\phpfastcache\phpfastcache\lib\Phpfastcache\Core\Pool\CacheItemPoolTrait.php(268): Phpfastcache\Extensions\Drivers\Ravendb\Driver->Phpfastcache\Core\Pool\{closure}()
#25 E:\projets\ravendb-extension\vendor\phpfastcache\phpfastcache-devtools\lib\Phpfastcache\Tests\Helper\TestHelper.php(401): Phpfastcache\Extensions\Drivers\Ravendb\Driver->getItem()
#26 E:\projets\ravendb-extension\tests\Ravendb.test.php(29): Phpfastcache\Tests\Helper\TestHelper->runCRUDTests()
#27 {main}"
@alxsabo
Copy link
Contributor

alxsabo commented Jan 11, 2024

What kind of document you are trying to load from RavenDB?

@Geolim4
Copy link
Author

Geolim4 commented Jan 11, 2024

I get this error randomly on any type of request. Mostly small strings from my tests.

@alxsabo
Copy link
Contributor

alxsabo commented Jan 11, 2024

Do you maybe store RavenDB ClientConfiguration or some similar RavenDB config files as documents?

If this is the case it could be the issue. Can you paste the Document JSON from your DB?

@alxsabo
Copy link
Contributor

alxsabo commented Jan 11, 2024

In next bug fix, I'll add default value for LoadBalanceBehavior, and it should solve this issue.

@Geolim4
Copy link
Author

Geolim4 commented Jan 11, 2024

I have better for you:
https://github.com/PHPSocialNetwork/ravendb-extension/actions/runs/7485523507/job/20374135540

I'm not even particularly fetching document, all store operations are impacted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants