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

5.x: Call to a member function getFuture() on null #331

Open
PNixx opened this issue May 23, 2023 · 3 comments
Open

5.x: Call to a member function getFuture() on null #331

PNixx opened this issue May 23, 2023 · 3 comments
Milestone

Comments

@PNixx
Copy link
Contributor

PNixx commented May 23, 2023

I use latest dev commit https://github.com/amphp/http-client/tree/bb4d51bc746d70da12835708f69a9d7426eab94e
Error message: Failed to write request (stream 15) to socket: Call to a member function getFuture() on null
Trace:

#0 vendor/amphp/http-client/src/Connection/Internal/Http2ConnectionProcessor.php(1056): Amp\Http\Client\Connection\Internal\Http2ConnectionProcessor->wrapException()
#1 vendor/amphp/http-client/src/Connection/Http2Connection.php(97): Amp\Http\Client\Connection\Internal\Http2ConnectionProcessor->request()
#2 vendor/amphp/http-client/src/Connection/HttpStream.php(88): Amp\Http\Client\Connection\Http2Connection->request()
#3 vendor/amphp/http-client/src/Connection/ConnectionLimitingPool.php(126): Amp\Http\Client\Connection\HttpStream->request()
#4 vendor/amphp/http-client/src/Connection/HttpStream.php(88): Amp\Http\Client\Connection\ConnectionLimitingPool->Amp\Http\Client\Connection\{closure}()
#5 vendor/amphp/http-client/src/Interceptor/DecompressResponse.php(43): Amp\Http\Client\Connection\HttpStream->request()
#6 vendor/amphp/http-client/src/Connection/InterceptedStream.php(43): Amp\Http\Client\Interceptor\DecompressResponse->requestViaNetwork()
#7 vendor/amphp/http-client/src/Interceptor/ModifyRequest.php(40): Amp\Http\Client\Connection\InterceptedStream->request()
#8 vendor/amphp/http-client/src/Connection/InterceptedStream.php(43): Amp\Http\Client\Interceptor\ModifyRequest->requestViaNetwork()
#9 vendor/amphp/http-client/src/Interceptor/ModifyRequest.php(40): Amp\Http\Client\Connection\InterceptedStream->request()
#10 vendor/amphp/http-client/src/Connection/InterceptedStream.php(43): Amp\Http\Client\Interceptor\ModifyRequest->requestViaNetwork()
#11 vendor/amphp/http-client/src/PooledHttpClient.php(37): Amp\Http\Client\Connection\InterceptedStream->request()
#12 vendor/amphp/http-client/src/Interceptor/FollowRedirects.php(129): Amp\Http\Client\PooledHttpClient->request()
#13 vendor/amphp/http-client/src/InterceptedHttpClient.php(30): Amp\Http\Client\Interceptor\FollowRedirects->request()
#14 vendor/amphp/http-client/src/Interceptor/ModifyRequest.php(52): Amp\Http\Client\InterceptedHttpClient->request()
#15 vendor/amphp/http-client/src/InterceptedHttpClient.php(30): Amp\Http\Client\Interceptor\ModifyRequest->request()
#16 vendor/amphp/http-client/src/HttpClient.php(26): Amp\Http\Client\InterceptedHttpClient->request()
@xpader
Copy link
Contributor

xpader commented May 29, 2023

This looks same as #319

@PNixx PNixx changed the title Call to a member function getFuture() on null 5.x: Call to a member function getFuture() on null May 31, 2023
@kelunik kelunik added this to the 5.x milestone Jul 8, 2023
@PNixx
Copy link
Contributor Author

PNixx commented Sep 8, 2023

the same thing is repeated on 5.0.0 beta-17.

Error:

Amp\Future\UnhandledFutureError
Unhandled future: Amp\Http\Client\HttpException: "Failed to write request (stream 87) to socket: Call to a member function getFuture() on null"; Await the Future with Future::await() before the future is destroyed or use Future::ignore() to suppress this exception. Enable assertions and set AMP_DEBUG=true in the process environment to track its origin. in vendor/amphp/amp/src/Internal/FutureState.php:53
Previous: Amp\Http\Client\HttpException: Failed to write request (stream 87) to socket: Call to a member function getFuture() on null

Trace:

#0 vendor/amphp/http-client/src/Connection/Http2Connection.php(105): Amp\Internal\FutureState->__destruct()
#1 vendor/amphp/http-client/src/Connection/HttpStream.php(89): Amp\Http\Client\Connection\Http2Connection->request()
#2 vendor/amphp/http-client/src/functions.php(20): Amp\Http\Client\Connection\HttpStream->Amp\Http\Client\Connection\{closure}()
#3 vendor/amphp/http-client/src/Connection/HttpStream.php(89): Amp\Http\Client\processRequest()
#4 vendor/amphp/http-client/src/Connection/ConnectionLimitingPool.php(126): Amp\Http\Client\Connection\HttpStream->request()
#5 vendor/amphp/http-client/src/Connection/HttpStream.php(89): Amp\Http\Client\Connection\ConnectionLimitingPool->Amp\Http\Client\Connection\{closure}()
#6 vendor/amphp/http-client/src/functions.php(20): Amp\Http\Client\Connection\HttpStream->Amp\Http\Client\Connection\{closure}()
#7 vendor/amphp/http-client/src/Connection/HttpStream.php(89): Amp\Http\Client\processRequest()
#8 vendor/amphp/http-client/src/Interceptor/DecompressResponse.php(43): Amp\Http\Client\Connection\HttpStream->request()
#9 vendor/amphp/http-client/src/Connection/InterceptedStream.php(56): Amp\Http\Client\Interceptor\DecompressResponse->requestViaNetwork()
#10 vendor/amphp/http-client/src/functions.php(20): Amp\Http\Client\Connection\InterceptedStream->Amp\Http\Client\Connection\{closure}()
#11 vendor/amphp/http-client/src/Connection/InterceptedStream.php(61): Amp\Http\Client\processRequest()
#12 vendor/amphp/http-client/src/Interceptor/ModifyRequest.php(40): Amp\Http\Client\Connection\InterceptedStream->request()
#13 vendor/amphp/http-client/src/Connection/InterceptedStream.php(56): Amp\Http\Client\Interceptor\ModifyRequest->requestViaNetwork()
#14 vendor/amphp/http-client/src/functions.php(20): Amp\Http\Client\Connection\InterceptedStream->Amp\Http\Client\Connection\{closure}()
#15 vendor/amphp/http-client/src/Connection/InterceptedStream.php(61): Amp\Http\Client\processRequest()
#16 vendor/amphp/http-client/src/PooledHttpClient.php(36): Amp\Http\Client\Connection\InterceptedStream->request()
#17 vendor/amphp/http-client/src/functions.php(20): Amp\Http\Client\PooledHttpClient->Amp\Http\Client\{closure}()
#18 vendor/amphp/http-client/src/PooledHttpClient.php(37): Amp\Http\Client\processRequest()
#19 vendor/amphp/http-client/src/Interceptor/FollowRedirects.php(131): Amp\Http\Client\PooledHttpClient->request()
#20 vendor/amphp/http-client/src/InterceptedHttpClient.php(44): Amp\Http\Client\Interceptor\FollowRedirects->request()
#21 vendor/amphp/http-client/src/functions.php(20): Amp\Http\Client\InterceptedHttpClient->Amp\Http\Client\{closure}()
#22 vendor/amphp/http-client/src/InterceptedHttpClient.php(49): Amp\Http\Client\processRequest()
#23 vendor/amphp/http-client/src/Interceptor/ModifyRequest.php(52): Amp\Http\Client\InterceptedHttpClient->request()
#24 vendor/amphp/http-client/src/InterceptedHttpClient.php(44): Amp\Http\Client\Interceptor\ModifyRequest->request()
#25 vendor/amphp/http-client/src/functions.php(20): Amp\Http\Client\InterceptedHttpClient->Amp\Http\Client\{closure}()
#26 vendor/amphp/http-client/src/InterceptedHttpClient.php(49): Amp\Http\Client\processRequest()
#27 vendor/amphp/http-client/src/HttpClient.php(35): Amp\Http\Client\InterceptedHttpClient->request()
#28 vendor/amphp/http-client/src/functions.php(30): Amp\Http\Client\HttpClient->Amp\Http\Client\{closure}()
#29 vendor/amphp/http-client/src/HttpClient.php(36): Amp\Http\Client\processRequest()
#30 src/Processor.php(221): Amp\Http\Client\HttpClient->request()

@kelunik
Copy link
Member

kelunik commented Sep 8, 2023

Can you provide a trace with AMP_DEBUG=true?

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

No branches or pull requests

3 participants