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

Got error spatie/async/src/Output/ParallelError.php #34

Open
helloeyesimple opened this issue Feb 20, 2023 · 2 comments
Open

Got error spatie/async/src/Output/ParallelError.php #34

helloeyesimple opened this issue Feb 20, 2023 · 2 comments

Comments

@helloeyesimple
Copy link

helloeyesimple commented Feb 20, 2023

Hi,

My code is

for ($i = 1; $i < 20; $i++) {
Async::run(function () use ($i) {
sleep(1);
return $i;
}, [
'error' => function(\Exception $e) {
dump($e);
}
]);
}
var_dump(implode(', ', Async::wait()));

But it is showing the following error:

Spatie\Async\Output\ParallelError {#2221 ▼ #message: "" #code: 0 #file: "/var/www/public/omnichannel/vendor/spatie/async/src/Output/ParallelError.php" #line: 11 trace: {▼ /var/www/public/omnichannel/vendor/spatie/async/src/Output/ParallelError.php:11 {▼ Spatie\Async\Output\ParallelError::fromException($exception): self … › { › return new self($exception); › } } /var/www/public/omnichannel/vendor/spatie/async/src/Process/ParallelProcess.php:125 {▼ Spatie\Async\Process\ParallelProcess->resolveErrorOutput(): Throwable … › if (! $exception instanceof Throwable) { › $exception = ParallelError::fromException($exception); › } arguments: {▶} } /var/www/public/omnichannel/vendor/spatie/async/src/Process/ProcessCallbacks.php:54 {▼ Spatie\Async\Process\ParallelProcess->triggerError() … › { › $exception = $this->resolveErrorOutput(); › } /var/www/public/omnichannel/vendor/spatie/async/src/Pool.php:232 {▶} /var/www/public/omnichannel/vendor/spatie/async/src/Pool.php:328 {▶} /var/www/public/omnichannel/vendor/spatie/async/src/Pool.php:154 {▶} /var/www/public/omnichannel/vendor/vxm/laravel-async/src/Async.php:106 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:239 {▶} /var/www/public/omnichannel/app/Http/Controllers/Omnichannel/NavisionController.php:179 {▼ App\Http\Controllers\Omnichannel\NavisionController->download_products() … › › var_dump(implode(', ', Async::wait())); › die; arguments: {▶} } App\Http\Controllers\Omnichannel\NavisionController->download_products() {} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:45 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Route.php:219 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Route.php:176 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Router.php:680 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 {▶} /var/www/public/omnichannel/app/Http/Middleware/IsInstalled.php:51 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:75 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:49 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:56 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:66 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Router.php:682 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Router.php:657 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Router.php:623 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Router.php:612 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 {▶} /var/www/public/omnichannel/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php:58 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 {▶} /var/www/public/omnichannel/vendor/fideloper/proxy/src/TrustProxies.php:57 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:62 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:151 {▶} /var/www/public/omnichannel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116 {▶} /var/www/public/omnichannel/public/index.php:53 {▼ › $response = $kernel->handle( › $request = Illuminate\Http\Request::capture() › ); arguments: {▶} } } }

I am using nginx, PHP 7.4, and laravel-async version 2.2. (Cannot use 3.0.0 lib because it needs PHP 8)
I have enabled POSIX and PCNTL too.

Please help.

@ijazahmedbhatti
Copy link

Same issue any one found solution for it

@JesperFiltenborg
Copy link

Do you have php extensions (pcntl and posix) active in the php.ini?

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

No branches or pull requests

3 participants