-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Steps to reproduce
- Set up an environment to scan files with PHP SDK
- Set timeout in VaaS options very low:
$options = new VaasOptions(
useHashLookup: true,
useCache: true,
vaasUrl: getenv("VAAS_URL"),
timeout: 1
);- Scan a file that is a few megabytes big
- Wait for the exception that should be thrown
Expected
- Set a timeout
- A file scan takes too long
- A proper exception is thrown telling me that it was canceled due to a timeout
Actual
PHP Fatal error: Uncaught Amp\CancelledException: The operation was cancelled in /home/lennart/Projects/github.com/vaas/php/examples/VaasExample/vendor/amphp/amp/src/Internal/Cancellable.php:56
Next Amp\Future\UnhandledFutureError: Unhandled future: Amp\CancelledException: "The operation was cancelled"; 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 /home/lennart/Projects/github.com/vaas/php/examples/VaasExample/vendor/amphp/amp/src/Internal/FutureState.php:53
Next Revolt\EventLoop\UncaughtThrowable: Uncaught Amp\Future\UnhandledFutureError thrown in event loop callback Amp\Internal\FutureState::{closure:Amp\Internal\FutureState::__destruct():54} defined in /home/lennart/Projects/github.com/vaas/php/examples/VaasExample/vendor/amphp/amp/src/Internal/FutureState.php:54; use Revolt\EventLoop::setErrorHandler() to gracefully handle such exceptions: Unhandled future: Amp\CancelledException: "The operation was cancelled"; 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 /home/lennart/Projects/github.com/vaas/php/examples/VaasExample/vendor/revolt/event-loop/src/EventLoop/UncaughtThrowable.php:13
PHP Fatal error: Uncaught FiberError: Cannot suspend in a force-closed fiber in /home/lennart/Projects/github.com/vaas/php/examples/VaasExample/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php:625
Nextcloud App
This is very easy to see in the G Data Antivirus app for Nextcloud. Simply pull up an instance or start the devcontainer, set the timeout to 1s in the app settings, and upload a file that is approx. >5MB. At this point, I would expect to see an error as a user, but nothing happens and the file is blocked because it is being “processed” by the scan process like forever.
Metadata
Metadata
Assignees
Labels
No labels