Bug #95940
closedError on random urls which should show 404 page
100%
Description
When requesting an address which should return 404, sometimes instead another error is displayed.
I've found no consistency on when this happens. I can request an address and the 404 is shown, but next time the same page will give the other error instead:
1/1) TypeError
fseek() expects parameter 1 to be resource, int given
in /var/www/html/vendor/guzzlehttp/psr7/src/Stream.php line 210
}
if (!$this->seekable) {
throw new \RuntimeException('Stream is not seekable');
}
if (fseek($this->stream, $offset, $whence) === -1) {
throw new \RuntimeException('Unable to seek to stream position '
. $offset . ' with whence ' . var_export($whence, true));
}
}
at fseek()
in /var/www/html/vendor/guzzlehttp/psr7/src/Stream.php line 210
}
if (!$this->seekable) {
throw new \RuntimeException('Stream is not seekable');
}
if (fseek($this->stream, $offset, $whence) === -1) {
throw new \RuntimeException('Unable to seek to stream position '
. $offset . ' with whence ' . var_export($whence, true));
}
}
at GuzzleHttp\Psr7\Stream->seek()
in /var/www/html/vendor/guzzlehttp/psr7/src/Stream.php line 81
public function __toString(): string
{
try {
if ($this->isSeekable()) {
$this->seek(0);
}
return $this->getContents();
} catch (\Throwable $e) {
if (\PHP_VERSION_ID >= 70400) {
at GuzzleHttp\Psr7\Stream->__toString()
in /var/www/html/public/typo3/sysext/core/Classes/Http/AbstractApplication.php line 75
if ($body instanceof SelfEmittableStreamInterface) {
// Optimization for streams that use php functions like readfile() as fastpath for serving files.
$body->emit();
} else {
echo $body->__toString();
}
}
/**
at TYPO3\CMS\Core\Http\AbstractApplication->sendResponse()
in /var/www/html/public/typo3/sysext/core/Classes/Http/AbstractApplication.php line 107
} catch (ImmediateResponseException $exception) {
$response = $exception->getResponse();
}
$this->sendResponse($response);
}
}
at TYPO3\CMS\Core\Http\AbstractApplication->run()
in /var/www/html/public/index.php line 20
// Set up the application for the frontend
call_user_func(static function () {
$classLoader = require dirname(__DIR__).'/vendor/autoload.php';
\TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(0, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_FE);
\TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Frontend\Http\Application::class)->run();
});
at {closure}()
in /var/www/html/public/index.php line 21
call_user_func(static function () {
$classLoader = require dirname(__DIR__).'/vendor/autoload.php';
\TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(0, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_FE);
\TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Frontend\Http\Application::class)->run();
});