ydb-platform/ydb-php-sdk

bug: oauth mixed but stdClass returned

gfh31fgh2 opened this issue · 3 comments

Bug Report

YDB PHP SDK version:
latest (1.5.3)

Environment
ubuntu18 and OAUTH

Current behavior:

production.ERROR: 
Return value of YdbPlatform\Ydb\Auth\IamAuth::requestToken() must be an instance of YdbPlatform\Ydb\Auth\mixed, instance of stdClass returned {"userId":1,"exception":"[object] (TypeError(code: 0): Return value of YdbPlatform\\Ydb\\Auth\\IamAuth::requestToken() must be an instance of YdbPlatform\\Ydb\\Auth\\mixed, instance of stdClass returned at /path/releases/2023.06.03_10-01-19.ea0b574/vendor/ydb-platform/ydb-php-sdk/src/Auth/IamAuth.php:41)
[stacktrace]
#0 /path/releases/2023.06.03_10-01-19.ea0b574/vendor/ydb-platform/ydb-php-sdk/src/Auth/Implement/OAuthTokenAuthentication.php(24): YdbPlatform\\Ydb\\Auth\\IamAuth->requestToken()
#1 /path/releases/2023.06.03_10-01-19.ea0b574/vendor/ydb-platform/ydb-php-sdk/src/Iam.php(101): YdbPlatform\\Ydb\\Auth\\Implement\\OAuthTokenAuthentication->getTokenInfo()
#2 /path/releases/2023.06.03_10-01-19.ea0b574/vendor/ydb-platform/ydb-php-sdk/src/Iam.php(88): YdbPlatform\\Ydb\\Iam->newToken()
#3 /path/releases/2023.06.03_10-01-19.ea0b574/vendor/ydb-platform/ydb-php-sdk/src/Ydb.php(119): YdbPlatform\\Ydb\\Iam->token()
#4 /path/releases/2023.06.03_10-01-19.ea0b574/vendor/ydb-platform/ydb-php-sdk/src/Table.php(59): YdbPlatform\\Ydb\\Ydb->meta()
#5 /path/releases/2023.06.03_10-01-19.ea0b574/vendor/ydb-platform/ydb-php-sdk/src/Ydb.php(217): YdbPlatform\\Ydb\\Table->__construct()
#6 /path/releases/2023.06.03_10-01-19.ea0b574/app/Helpers/x.php(x): YdbPlatform\\Ydb\\Ydb->table()


Expected behavior:

php working more than 12 hours

Steps to reproduce:

php in background with simple select from ydb

Related code:

https://github.com/gfh31fgh2/ydb-php-simple-driver

hotfix: даунгрейд (downgrade) до 1.5.1

PHP Version 7.4.30 с этой ошибкой
фикс выше должен решить проблему

все работает, спасибо!