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

The request was not processed and can be safely retried #43

Open
RoodFruit opened this issue Nov 22, 2022 · 1 comment
Open

The request was not processed and can be safely retried #43

RoodFruit opened this issue Nov 22, 2022 · 1 comment
Labels

Comments

@RoodFruit
Copy link

Hi,

All of a sudden we're receiving the error "The request was not processed and can be safely retried.". Until now, everything worked perfectly.

Anybody got an idea of what the error means?

Info

  • Php 8.1.10
  • Apache/2.4.54
  • OpenSSL 1.1.1s

Code:

\Amp\Loop::run(
    function () {
        $handshake = new \Amp\Websocket\Client\Handshake('wss://...');

        while (true) {
            try {
                $connection = yield connect($handshake);

                yield $connection->send(json_encode([...subscription_info...]));

                while ($message = yield $connection->receive()) {
                    // ...
                }
            } catch (Exception $e) {
                // ...
            }
        }
    }
);

Stack trace:

Error reads: The request was not processed and can be safely retried.
 
Trace: #0 [internal function]: Amp\Http\Client\Connection\DefaultConnectionFactory->Amp\Http\Client\Connection\{closure}()
#1 ../vendor/amphp/amp/lib/Coroutine.php(115): Generator->throw(Object(Amp\Socket\TlsException))
#2 ../vendor/amphp/amp/lib/Failure.php(33): Amp\Coroutine->Amp\{closure}(Object(Amp\Socket\TlsException), NULL)
#3 ../vendor/amphp/amp/lib/Internal/Placeholder.php(143): Amp\Failure->onResolve(Object(Closure))
#4 ../vendor/amphp/amp/lib/Internal/Placeholder.php(177): Amp\Coroutine->resolve(Object(Amp\Failure))
#5 ../vendor/amphp/amp/lib/Coroutine.php(137): Amp\Coroutine->fail(Object(Amp\Socket\TlsException))
#6 ../vendor/amphp/amp/lib/Failure.php(33): Amp\Coroutine->Amp\{closure}(Object(Amp\Socket\TlsException), NULL)
#7 ../vendor/amphp/amp/lib/Internal/Placeholder.php(143): Amp\Failure->onResolve(Object(Closure))
#8 ../vendor/amphp/amp/lib/Internal/Placeholder.php(177): Amp\Promise@anonymous->resolve(Object(Amp\Failure))
#9 ../vendor/amphp/amp/lib/Deferred.php(66): Amp\Promise@anonymous->fail(Object(Amp\Socket\TlsException))
#10 ../vendor/amphp/socket/src/Internal/functions.php(148): Amp\Deferred->fail(Object(Amp\Socket\TlsException))
#11 ../vendor/amphp/amp/lib/Loop/NativeDriver.php(327): Amp\Socket\Internal\{closure}('ac', Resource id #1219, Object(Amp\Deferred))
#12 ../vendor/amphp/amp/lib/Loop/NativeDriver.php(127): Amp\Loop\NativeDriver->selectStreams(Array, Array, 4.625)
#13 ../vendor/amphp/amp/lib/Loop/Driver.php(138): Amp\Loop\NativeDriver->dispatch(true)
#14 ../vendor/amphp/amp/lib/Loop/Driver.php(72): Amp\Loop\Driver->tick()
#15 ../vendor/amphp/amp/lib/Loop.php(95): Amp\Loop\Driver->run()
...
@trowski
Copy link
Member

trowski commented Feb 13, 2023

Based on the exception stack containing a TlsException there may be an error with the server you're connecting to. Use UnprocessedRequestException::getPrevious() to get the previous exception.

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

No branches or pull requests

2 participants