ydb-platform / ydb-php-sdk

Apache License 2.0
26 stars 15 forks source link

bug: 401 error in obtain new iamToken #64

Closed gfh31fgh2 closed 1 year ago

gfh31fgh2 commented 1 year ago

Bug Report

YDB PHP SDK version: latest

Environment ubuntu18

Current behavior:


PHP Fatal error:  Uncaught YdbPlatform\Ydb\Exception: Failed to obtain new iamToken: response status is 401 in 
/path/vendor/ydb-platform/ydb-php-sdk/src/Iam.php:155#012

Stack trace:
#012#0 /path/vendor/ydb-platform/ydb-php-sdk/src/Iam.php(407): YdbPlatform\Ydb\Iam->newToken()
#012#1 /path/vendor/ydb-platform/ydb-php-sdk/src/Iam.php(79): YdbPlatform\Ydb\Iam->loadToken()
#012#2 /path/vendor/ydb-platform/ydb-php-sdk/src/Traits/RequestTrait.php(44): YdbPlatform\Ydb\Iam->token()
#012#3 /path/vendor/ydb-platform/ydb-php-sdk/src/Session.php(604): YdbPlatform\Ydb\Session->doRequest('Table', 'DeleteSession', Array)
#012#4 /path/vendor/ydb-platform/ydb-php-sdk/src/Session.php(152): YdbPlatform\Ydb\Session->request('DeleteSession', Array)
#012#5 /path/vendor/ydb-platform/ydb-php-sdk/src/Sessions/MemorySessionPool.php(23): YdbPlatform\Ydb\Session->delete()
#012#6 [internal function]: YdbPlatform\Ydb\Sessions\MemorySessionPool->__destruct()
#012#7 {main}
#012  thrown in /path/vendor/ydb-platform/ydb-php-sdk/src/Iam.php on line 155

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

gfh31fgh2 commented 1 year ago

Failed to obtain new iamToken: response status is 401
gfh31fgh2 commented 1 year ago

1.5.0 - та же ошибка 1.5.1 - та же ошибка 1.5.3 - та же ошибка

rekby commented 1 year ago

Ошибку с выписыванием JWT-токена поправили, проверьте пожалуйста версию 1.5.4

gfh31fgh2 commented 1 year ago

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