Skip to content

artisan native:serve fails with symfony/console > v7.2.7 #604

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

Open
andreamarelli opened this issue May 29, 2025 · 9 comments · May be fixed by #611 or #612
Open

artisan native:serve fails with symfony/console > v7.2.7 #604

andreamarelli opened this issue May 29, 2025 · 9 comments · May be fixed by #611 or #612
Labels
bug Something isn't working

Comments

@andreamarelli
Copy link

andreamarelli commented May 29, 2025

What were you trying to do?

Update my composer dependencies

What happened?

As soon as I update symfony/console (not direct composer dependency) from v7.2.7 to v7.3.* I am not able anymore to run successfully php artisan native:serve.

How to reproduce the bug

This is my first time using electron, so not really an expert in this domain, but it worked without any issue in the past weeks with symfony/console at 7.2.7. The issue occurs as soon as I update to a newer version.

Debug Output

The console output:


start electron app...

Error: Command failed: /Users/andrea/workspace/vendor/nativephp/electron/resources/js/resources/php/php artisan native:config
[NATIVE_EXCEPTION]: cURL error 7: Failed to connect to localhost port 4000 after 0 ms: Could not connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost:4000/api/debug/log (0) in /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php:939
[NATIVE_EXCEPTION]: cURL error 7: Failed to connect to localhost port 4000 after 0 ms: Could not connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost:4000/api/debug/log (0) in /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php:939

    at genericNodeError (node:internal/errors:984:15)
    at wrappedFn (node:internal/errors:538:14)
    at ChildProcess.exithandler (node:child_process:422:12)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1104:16)
    at ChildProcess._handle.onexit (node:internal/child_process:304:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: '/Users/andrea/workspace/vendor/nativephp/electron/resources/js/resources/php/php artisan native:config',
  stdout: '\n' +
    '   Illuminate\\Http\\Client\\ConnectionException \n' +
    '\n' +
    '  cURL error 7: Failed to connect to localhost port 4000 after 0 ms: Could not connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost:4000/api/debug/log\n' +
    '\n' +
    '  at vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php:939\n' +
    '    935▕                         }\n' +
    '    936▕                     }\n' +
    '    937▕                 });\n' +
    '    938▕             } catch (ConnectException $e) {\n' +
    '  ➜ 939▕                 $exception = new ConnectionException($e->getMessage(), 0, $e);\n' +
    '    940▕                 $request = new Request($e->getRequest());\n' +
    '    941▕ \n' +
    '    942▕                 $this->factory?->recordRequestResponsePair($request, null);\n' +
    '    943▕\n' +
    '\n' +
    '      \x1B[2m+37 vendor frames \x1B[22m\n' +
    '\n' +
    '  38  artisan:16\n' +
    '      Illuminate\\Foundation\\Application::handleCommand(Object(Symfony\\Component\\Console\\Input\\ArgvInput))\n' +
    '\n',
  stderr: '[NATIVE_EXCEPTION]: cURL error 7: Failed to connect to localhost port 4000 after 0 ms: Could not connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost:4000/api/debug/log (0) in /Users/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php:939\n' +
    '[NATIVE_EXCEPTION]: cURL error 7: Failed to connect to localhost port 4000 after 0 ms: Could not connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost:4000/api/debug/log (0) in /Users/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php:939\n'
}
Electron API server started on port 4000
Starting PHP server... /Users/andrea/workspace/vendor/nativephp/electron/resources/js/resources/php/php artisan serve /Users/andrea/workspace { upload_max_filesize: '2048M', post_max_size: '2048M' }
Copying storage folder...
Storage path: /Users/andrea/Library/Application Support/workspace/storage
App path: /Users/andrea/workspace
Making sure app folders are available
Linking storage path...
^CSkipping Database migration while in development.
You may migrate manually by running: php artisan native:migrate
Starting PHP server...

The laravel log:

[2025-05-29 21:12:37] local.ERROR: cURL error 7: Failed to connect to localhost port 4000 after 0 ms: Could not connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost:4000/api/debug/log {"exception":"[object] (Illuminate\\Http\\Client\\ConnectionException(code: 0): cURL error 7: Failed to connect to localhost port 4000 after 0 ms: Could not connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost:4000/api/debug/log at /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php:939)
[stacktrace]
#0 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Support/helpers.php(338): Illuminate\\Http\\Client\\PendingRequest->Illuminate\\Http\\Client\\{closure}(1)
#1 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(903): retry(0, Object(Closure), 100, Object(Closure))
#2 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(802): Illuminate\\Http\\Client\\PendingRequest->send('POST', 'http://localhos...', Array)
#3 /Users/andrea/workspace/vendor/nativephp/laravel/src/Client/Client.php(31): Illuminate\\Http\\Client\\PendingRequest->post('debug/log', Array)
#4 /Users/andrea/workspace/vendor/nativephp/laravel/src/Logging/LogWatcher.php(22): Native\\Laravel\\Client\\Client->post('debug/log', Array)
#5 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(461): Native\\Laravel\\Logging\\LogWatcher->Native\\Laravel\\Logging\\{closure}(Object(Illuminate\\Log\\Events\\MessageLogged))
#6 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(288): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}('Illuminate\\\\Log\\\\...', Array)
#7 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(268): Illuminate\\Events\\Dispatcher->invokeListeners('Illuminate\\\\Log\\\\...', Array, false)
#8 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Log/Logger.php(251): Illuminate\\Events\\Dispatcher->dispatch('Illuminate\\\\Log\\\\...')
#9 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Log/Logger.php(188): Illuminate\\Log\\Logger->fireLogEvent('warning', 'Since symfony/c...', Array)
#10 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Log/Logger.php(108): Illuminate\\Log\\Logger->writeLog('warning', 'Since symfony/c...', Array)
#11 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(107): Illuminate\\Log\\Logger->warning('Since symfony/c...')
#12 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Support/helpers.php(526): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->Illuminate\\Foundation\\Bootstrap\\{closure}(Object(Illuminate\\Log\\Logger))
#13 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(103): with(Object(Illuminate\\Log\\Logger), Object(Closure))
#14 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(72): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleDeprecationError('Since symfony/c...', '/Users/andrea/S...', 25, 16384)
#15 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(256): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(16384, 'Since symfony/c...', '/Users/andrea/S...', 25)
#16 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->Illuminate\\Foundation\\Bootstrap\\{closure}(16384, 'Since symfony/c...', '/Users/andrea/S...', 25)
#17 /Users/andrea/workspace/vendor/symfony/deprecation-contracts/function.php(25): trigger_error('Since symfony/c...', 16384)
#18 /Users/andrea/workspace/vendor/symfony/console/Command/Command.php(76): trigger_deprecation('symfony/console', '7.3', 'Method \"%s()\" i...', 'Symfony\\\\Compone...')
#19 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Console/Command.php(105): Symfony\\Component\\Console\\Command\\Command::getDefaultDescription()
#20 [internal function]: Illuminate\\Console\\Command->__construct()
#21 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Container/Container.php(1062): ReflectionClass->newInstanceArgs(Array)
#22 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Container/Container.php(890): Illuminate\\Container\\Container->build('Native\\\\Laravel\\\\...')
#23 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1077): Illuminate\\Container\\Container->resolve('Native\\\\Laravel\\\\...', Array, true)
#24 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Container/Container.php(821): Illuminate\\Foundation\\Application->resolve('Native\\\\Laravel\\\\...', Array)
#25 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1057): Illuminate\\Container\\Container->make('Native\\\\Laravel\\\\...', Array)
#26 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Console/Application.php(261): Illuminate\\Foundation\\Application->make('Native\\\\Laravel\\\\...')
#27 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Console/Application.php(275): Illuminate\\Console\\Application->resolve('Native\\\\Laravel\\\\...')
#28 /Users/andrea/workspace/vendor/nativephp/laravel/src/NativeServiceProvider.php(95): Illuminate\\Console\\Application->resolveCommands(Array)
#29 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Console/Application.php(133): Native\\Laravel\\NativeServiceProvider->Native\\Laravel\\{closure}(Object(Illuminate\\Console\\Application))
#30 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Console/Application.php(80): Illuminate\\Console\\Application->bootstrap()
#31 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(539): Illuminate\\Console\\Application->__construct(Object(Illuminate\\Foundation\\Application), Object(Illuminate\\Events\\Dispatcher), '12.16.0')
#32 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(197): Illuminate\\Foundation\\Console\\Kernel->getArtisan()
#33 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1234): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#34 /Users/andrea/workspace/artisan(16): Illuminate\\Foundation\\Application->handleCommand(Object(Symfony\\Component\\Console\\Input\\ArgvInput))
#35 {main}

[previous exception] [object] (GuzzleHttp\\Exception\\ConnectException(code: 0): cURL error 7: Failed to connect to localhost port 4000 after 0 ms: Could not connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost:4000/api/debug/log at /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:275)
[stacktrace]
#0 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(205): GuzzleHttp\\Handler\\CurlFactory::createRejection(Object(GuzzleHttp\\Handler\\EasyHandle), Array)
#1 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(157): GuzzleHttp\\Handler\\CurlFactory::finishError(Object(GuzzleHttp\\Handler\\CurlHandler), Object(GuzzleHttp\\Handler\\EasyHandle), Object(GuzzleHttp\\Handler\\CurlFactory))
#2 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(47): GuzzleHttp\\Handler\\CurlFactory::finish(Object(GuzzleHttp\\Handler\\CurlHandler), Object(GuzzleHttp\\Handler\\EasyHandle), Object(GuzzleHttp\\Handler\\CurlFactory))
#3 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(28): GuzzleHttp\\Handler\\CurlHandler->__invoke(Object(GuzzleHttp\\Psr7\\Request), Array)
#4 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(48): GuzzleHttp\\Handler\\Proxy::GuzzleHttp\\Handler\\{closure}(Object(GuzzleHttp\\Psr7\\Request), Array)
#5 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(1343): GuzzleHttp\\Handler\\Proxy::GuzzleHttp\\Handler\\{closure}(Object(GuzzleHttp\\Psr7\\Request), Array)
#6 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(1309): Illuminate\\Http\\Client\\PendingRequest->Illuminate\\Http\\Client\\{closure}(Object(GuzzleHttp\\Psr7\\Request), Array)
#7 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(1295): Illuminate\\Http\\Client\\PendingRequest->Illuminate\\Http\\Client\\{closure}(Object(GuzzleHttp\\Psr7\\Request), Array)
#8 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(64): Illuminate\\Http\\Client\\PendingRequest->Illuminate\\Http\\Client\\{closure}(Object(GuzzleHttp\\Psr7\\Request), Array)
#9 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Middleware.php(38): GuzzleHttp\\PrepareBodyMiddleware->__invoke(Object(GuzzleHttp\\Psr7\\Request), Array)
#10 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php(71): GuzzleHttp\\Middleware::GuzzleHttp\\{closure}(Object(GuzzleHttp\\Psr7\\Request), Array)
#11 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Middleware.php(63): GuzzleHttp\\RedirectMiddleware->__invoke(Object(GuzzleHttp\\Psr7\\Request), Array)
#12 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/HandlerStack.php(75): GuzzleHttp\\Middleware::GuzzleHttp\\{closure}(Object(GuzzleHttp\\Psr7\\Request), Array)
#13 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Client.php(333): GuzzleHttp\\HandlerStack->__invoke(Object(GuzzleHttp\\Psr7\\Request), Array)
#14 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Client.php(169): GuzzleHttp\\Client->transfer(Object(GuzzleHttp\\Psr7\\Request), Array)
#15 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Client.php(189): GuzzleHttp\\Client->requestAsync('POST', Object(GuzzleHttp\\Psr7\\Uri), Array)
#16 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(1141): GuzzleHttp\\Client->request('POST', 'http://localhos...', Array)
#17 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(905): Illuminate\\Http\\Client\\PendingRequest->sendRequest('POST', 'http://localhos...', Array)
#18 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Support/helpers.php(338): Illuminate\\Http\\Client\\PendingRequest->Illuminate\\Http\\Client\\{closure}(1)
#19 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(903): retry(0, Object(Closure), 100, Object(Closure))
#20 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(802): Illuminate\\Http\\Client\\PendingRequest->send('POST', 'http://localhos...', Array)
#21 /Users/andrea/workspace/vendor/nativephp/laravel/src/Client/Client.php(31): Illuminate\\Http\\Client\\PendingRequest->post('debug/log', Array)
#22 /Users/andrea/workspace/vendor/nativephp/laravel/src/Logging/LogWatcher.php(22): Native\\Laravel\\Client\\Client->post('debug/log', Array)
#23 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(461): Native\\Laravel\\Logging\\LogWatcher->Native\\Laravel\\Logging\\{closure}(Object(Illuminate\\Log\\Events\\MessageLogged))
#24 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(288): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}('Illuminate\\\\Log\\\\...', Array)
#25 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(268): Illuminate\\Events\\Dispatcher->invokeListeners('Illuminate\\\\Log\\\\...', Array, false)
#26 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Log/Logger.php(251): Illuminate\\Events\\Dispatcher->dispatch('Illuminate\\\\Log\\\\...')
#27 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Log/Logger.php(188): Illuminate\\Log\\Logger->fireLogEvent('warning', 'Since symfony/c...', Array)
#28 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Log/Logger.php(108): Illuminate\\Log\\Logger->writeLog('warning', 'Since symfony/c...', Array)
#29 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(107): Illuminate\\Log\\Logger->warning('Since symfony/c...')
#30 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Support/helpers.php(526): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->Illuminate\\Foundation\\Bootstrap\\{closure}(Object(Illuminate\\Log\\Logger))
#31 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(103): with(Object(Illuminate\\Log\\Logger), Object(Closure))
#32 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(72): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleDeprecationError('Since symfony/c...', '/Users/andrea/S...', 25, 16384)
#33 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(256): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(16384, 'Since symfony/c...', '/Users/andrea/S...', 25)
#34 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->Illuminate\\Foundation\\Bootstrap\\{closure}(16384, 'Since symfony/c...', '/Users/andrea/S...', 25)
#35 /Users/andrea/workspace/vendor/symfony/deprecation-contracts/function.php(25): trigger_error('Since symfony/c...', 16384)
#36 /Users/andrea/workspace/vendor/symfony/console/Command/Command.php(76): trigger_deprecation('symfony/console', '7.3', 'Method \"%s()\" i...', 'Symfony\\\\Compone...')
#37 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Console/Command.php(105): Symfony\\Component\\Console\\Command\\Command::getDefaultDescription()
#38 [internal function]: Illuminate\\Console\\Command->__construct()
#39 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Container/Container.php(1062): ReflectionClass->newInstanceArgs(Array)
#40 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Container/Container.php(890): Illuminate\\Container\\Container->build('Native\\\\Laravel\\\\...')
#41 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1077): Illuminate\\Container\\Container->resolve('Native\\\\Laravel\\\\...', Array, true)
#42 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Container/Container.php(821): Illuminate\\Foundation\\Application->resolve('Native\\\\Laravel\\\\...', Array)
#43 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1057): Illuminate\\Container\\Container->make('Native\\\\Laravel\\\\...', Array)
#44 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Console/Application.php(261): Illuminate\\Foundation\\Application->make('Native\\\\Laravel\\\\...')
#45 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Console/Application.php(275): Illuminate\\Console\\Application->resolve('Native\\\\Laravel\\\\...')
#46 /Users/andrea/workspace/vendor/nativephp/laravel/src/NativeServiceProvider.php(95): Illuminate\\Console\\Application->resolveCommands(Array)
#47 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Console/Application.php(133): Native\\Laravel\\NativeServiceProvider->Native\\Laravel\\{closure}(Object(Illuminate\\Console\\Application))
#48 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Console/Application.php(80): Illuminate\\Console\\Application->bootstrap()
#49 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(539): Illuminate\\Console\\Application->__construct(Object(Illuminate\\Foundation\\Application), Object(Illuminate\\Events\\Dispatcher), '12.16.0')
#50 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(197): Illuminate\\Foundation\\Console\\Kernel->getArtisan()
#51 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1234): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#52 /Users/andrea/workspace/artisan(16): Illuminate\\Foundation\\Application->handleCommand(Object(Symfony\\Component\\Console\\Input\\ArgvInput))
#53 {main}
"} 
[2025-05-29 21:12:37] local.ERROR: cURL error 7: Failed to connect to localhost port 4000 after 0 ms: Could not connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost:4000/api/debug/log {"exception":"[object] (Illuminate\\Http\\Client\\ConnectionException(code: 0): cURL error 7: Failed to connect to localhost port 4000 after 0 ms: Could not connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost:4000/api/debug/log at /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php:939)
[stacktrace]
#0 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Support/helpers.php(338): Illuminate\\Http\\Client\\PendingRequest->Illuminate\\Http\\Client\\{closure}(1)
#1 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(903): retry(0, Object(Closure), 100, Object(Closure))
#2 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(802): Illuminate\\Http\\Client\\PendingRequest->send('POST', 'http://localhos...', Array)
#3 /Users/andrea/workspace/vendor/nativephp/laravel/src/Client/Client.php(31): Illuminate\\Http\\Client\\PendingRequest->post('debug/log', Array)
#4 /Users/andrea/workspace/vendor/nativephp/laravel/src/Logging/LogWatcher.php(22): Native\\Laravel\\Client\\Client->post('debug/log', Array)
#5 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(461): Native\\Laravel\\Logging\\LogWatcher->Native\\Laravel\\Logging\\{closure}(Object(Illuminate\\Log\\Events\\MessageLogged))
#6 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(288): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}('Illuminate\\\\Log\\\\...', Array)
#7 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(268): Illuminate\\Events\\Dispatcher->invokeListeners('Illuminate\\\\Log\\\\...', Array, false)
#8 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Log/Logger.php(251): Illuminate\\Events\\Dispatcher->dispatch('Illuminate\\\\Log\\\\...')
#9 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Log/Logger.php(188): Illuminate\\Log\\Logger->fireLogEvent('error', 'cURL error 7: F...', Array)
#10 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Log/Logger.php(96): Illuminate\\Log\\Logger->writeLog('error', 'cURL error 7: F...', Array)
#11 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(699): Illuminate\\Log\\Logger->error('cURL error 7: F...', Array)
#12 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(379): Illuminate\\Log\\LogManager->error('cURL error 7: F...', Array)
#13 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(342): Illuminate\\Foundation\\Exceptions\\Handler->reportThrowable(Object(Illuminate\\Http\\Client\\ConnectionException))
#14 /Users/andrea/workspace/vendor/nunomaduro/collision/src/Adapters/Laravel/ExceptionHandler.php(46): Illuminate\\Foundation\\Exceptions\\Handler->report(Object(Illuminate\\Http\\Client\\ConnectionException))
#15 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(620): NunoMaduro\\Collision\\Adapters\\Laravel\\ExceptionHandler->report(Object(Illuminate\\Http\\Client\\ConnectionException))
#16 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(199): Illuminate\\Foundation\\Console\\Kernel->reportException(Object(Illuminate\\Http\\Client\\ConnectionException))
#17 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1234): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#18 /Users/andrea/workspace/artisan(16): Illuminate\\Foundation\\Application->handleCommand(Object(Symfony\\Component\\Console\\Input\\ArgvInput))
#19 {main}

[previous exception] [object] (GuzzleHttp\\Exception\\ConnectException(code: 0): cURL error 7: Failed to connect to localhost port 4000 after 0 ms: Could not connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost:4000/api/debug/log at /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:275)
[stacktrace]
#0 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(205): GuzzleHttp\\Handler\\CurlFactory::createRejection(Object(GuzzleHttp\\Handler\\EasyHandle), Array)
#1 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(157): GuzzleHttp\\Handler\\CurlFactory::finishError(Object(GuzzleHttp\\Handler\\CurlHandler), Object(GuzzleHttp\\Handler\\EasyHandle), Object(GuzzleHttp\\Handler\\CurlFactory))
#2 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(47): GuzzleHttp\\Handler\\CurlFactory::finish(Object(GuzzleHttp\\Handler\\CurlHandler), Object(GuzzleHttp\\Handler\\EasyHandle), Object(GuzzleHttp\\Handler\\CurlFactory))
#3 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(28): GuzzleHttp\\Handler\\CurlHandler->__invoke(Object(GuzzleHttp\\Psr7\\Request), Array)
#4 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(48): GuzzleHttp\\Handler\\Proxy::GuzzleHttp\\Handler\\{closure}(Object(GuzzleHttp\\Psr7\\Request), Array)
#5 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(1343): GuzzleHttp\\Handler\\Proxy::GuzzleHttp\\Handler\\{closure}(Object(GuzzleHttp\\Psr7\\Request), Array)
#6 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(1309): Illuminate\\Http\\Client\\PendingRequest->Illuminate\\Http\\Client\\{closure}(Object(GuzzleHttp\\Psr7\\Request), Array)
#7 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(1295): Illuminate\\Http\\Client\\PendingRequest->Illuminate\\Http\\Client\\{closure}(Object(GuzzleHttp\\Psr7\\Request), Array)
#8 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(64): Illuminate\\Http\\Client\\PendingRequest->Illuminate\\Http\\Client\\{closure}(Object(GuzzleHttp\\Psr7\\Request), Array)
#9 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Middleware.php(38): GuzzleHttp\\PrepareBodyMiddleware->__invoke(Object(GuzzleHttp\\Psr7\\Request), Array)
#10 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php(71): GuzzleHttp\\Middleware::GuzzleHttp\\{closure}(Object(GuzzleHttp\\Psr7\\Request), Array)
#11 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Middleware.php(63): GuzzleHttp\\RedirectMiddleware->__invoke(Object(GuzzleHttp\\Psr7\\Request), Array)
#12 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/HandlerStack.php(75): GuzzleHttp\\Middleware::GuzzleHttp\\{closure}(Object(GuzzleHttp\\Psr7\\Request), Array)
#13 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Client.php(333): GuzzleHttp\\HandlerStack->__invoke(Object(GuzzleHttp\\Psr7\\Request), Array)
#14 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Client.php(169): GuzzleHttp\\Client->transfer(Object(GuzzleHttp\\Psr7\\Request), Array)
#15 /Users/andrea/workspace/vendor/guzzlehttp/guzzle/src/Client.php(189): GuzzleHttp\\Client->requestAsync('POST', Object(GuzzleHttp\\Psr7\\Uri), Array)
#16 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(1141): GuzzleHttp\\Client->request('POST', 'http://localhos...', Array)
#17 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(905): Illuminate\\Http\\Client\\PendingRequest->sendRequest('POST', 'http://localhos...', Array)
#18 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Support/helpers.php(338): Illuminate\\Http\\Client\\PendingRequest->Illuminate\\Http\\Client\\{closure}(1)
#19 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(903): retry(0, Object(Closure), 100, Object(Closure))
#20 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(802): Illuminate\\Http\\Client\\PendingRequest->send('POST', 'http://localhos...', Array)
#21 /Users/andrea/workspace/vendor/nativephp/laravel/src/Client/Client.php(31): Illuminate\\Http\\Client\\PendingRequest->post('debug/log', Array)
#22 /Users/andrea/workspace/vendor/nativephp/laravel/src/Logging/LogWatcher.php(22): Native\\Laravel\\Client\\Client->post('debug/log', Array)
#23 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(461): Native\\Laravel\\Logging\\LogWatcher->Native\\Laravel\\Logging\\{closure}(Object(Illuminate\\Log\\Events\\MessageLogged))
#24 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(288): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}('Illuminate\\\\Log\\\\...', Array)
#25 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(268): Illuminate\\Events\\Dispatcher->invokeListeners('Illuminate\\\\Log\\\\...', Array, false)
#26 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Log/Logger.php(251): Illuminate\\Events\\Dispatcher->dispatch('Illuminate\\\\Log\\\\...')
#27 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Log/Logger.php(188): Illuminate\\Log\\Logger->fireLogEvent('error', 'cURL error 7: F...', Array)
#28 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Log/Logger.php(96): Illuminate\\Log\\Logger->writeLog('error', 'cURL error 7: F...', Array)
#29 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(699): Illuminate\\Log\\Logger->error('cURL error 7: F...', Array)
#30 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(379): Illuminate\\Log\\LogManager->error('cURL error 7: F...', Array)
#31 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(342): Illuminate\\Foundation\\Exceptions\\Handler->reportThrowable(Object(Illuminate\\Http\\Client\\ConnectionException))
#32 /Users/andrea/workspace/vendor/nunomaduro/collision/src/Adapters/Laravel/ExceptionHandler.php(46): Illuminate\\Foundation\\Exceptions\\Handler->report(Object(Illuminate\\Http\\Client\\ConnectionException))
#33 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(620): NunoMaduro\\Collision\\Adapters\\Laravel\\ExceptionHandler->report(Object(Illuminate\\Http\\Client\\ConnectionException))
#34 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(199): Illuminate\\Foundation\\Console\\Kernel->reportException(Object(Illuminate\\Http\\Client\\ConnectionException))
#35 /Users/andrea/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1234): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#36 /Users/andrea/workspace/artisan(16): Illuminate\\Foundation\\Application->handleCommand(Object(Symfony\\Component\\Console\\Input\\ArgvInput))
#37 {main}
"} 

Which operating systems have you seen this occur on?

macOS

@andreamarelli andreamarelli added the bug Something isn't working label May 29, 2025
@muhghazaliakbar
Copy link

@andreamarelli Did you figure it out? Its also happening to me.

@andreamarelli
Copy link
Author

Did you figure it out?

No, @muhghazaliakbar. I forced symfony/console to version 7.2.7 for the moment. Not a big deal, I do not really need to update it, but it is pretty annoying.

@PunchRockgroin
Copy link

PunchRockgroin commented May 30, 2025

I ran into a similar error on Windows 11 after the update to v1.0.7. Downgrading symfony/console to 7.2.7 as mentioned by @andreamarelli fixed it as well for me -- I'm able to at least do composer native:dev

@finchy70
Copy link

finchy70 commented May 30, 2025

Adding
“symfony/console” => “7.2.7”
To my composer.json fixed the issue for me too.

@dvaansiseelr
Copy link

I got same issue after running composer require nativephp/electron and php artisan native:install, but as soon as I tried to add the dependency to composer.json I cannot run php artisan native:install successfully.

@ceejayoz
Copy link

ceejayoz commented Jun 2, 2025

I can confirm the downgrade to symfony/console v7.2.7 worked as well.

@theoreaves
Copy link

I can confirm the downgrade to symfony/console v7.2.7 worked as well.

Where do I add this? I don't see symfony in my compser.json file. At least not in my project. Should I add this somewhere else?

@muhghazaliakbar
Copy link

I can confirm the downgrade to symfony/console v7.2.7 worked as well.

Where do I add this? I don't see symfony in my compser.json file. At least not in my project. Should I add this somewhere else?

You can just install it in your composer.json.

@ceejayoz
Copy link

ceejayoz commented Jun 2, 2025

@theoreaves composer require symfony/console 7.2.7 from the root of your project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
7 participants