You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems to have regressed from a version that I'm yet to identify. Last known good for me was 0.7.0 - I'll run some tests.
When hitting Command+C on the terminal after running composer native:dev, the app used to close immediately. Now, it halts until a javascript alert is acknowledged:
Uncaught Exception:
Error: write EPIPE
at afterWriteDispatched (node:internal/stream_base_commons:161:15)
at writeGeneric (node:internal/stream_base_commons:152:3)
at Socket._writeGeneric (node:net:958:11)
at Socket._write (node:net:970:8)
at writeOrBuffer (node:internal/streams/writable:572:12)
at _write (node:internal/streams/writable:501:10)
at Writable.write (node:internal/streams/writable:510:10)
at execSync (node:child_process:976:20)
at node:electron/js2c/node_init:2:16318
at getAllPids (/Users/pete/Code/NativePHP/vendor/nativephp/electron/resources/js/node_modules/kill-sync/dist/cjs/treekill.js:16:55)
It appears related to the process of killing processes when SIGTERM is received.
Note: This does not seem to affect closing the app normally (using the menubar) on Mac (Where tested)
What happened?
Currently, every time you close the native:dev process via Command + C, the error provided appears.
How to reproduce the bug
Run composer create-project laravel/laravel nativephp-demo-test
Run cd nativephp-demo-test
Prepare your laravel installation as usual via npm i
Run composer require nativephp/electron (Make sure you're allowing beta versions) and assert 1.0.0-beta.1 is installed.
Run php artisan native:install - Agree to build NPM deps and then to run the dev server
Hit Command + C
ASSERT: The app throws an error (It may not on this run)
For consistency, run composer native:dev
Hit Command + C
ASSERT: The app does not die, an alert is displayed with a JS error about the tree_kill package.
Package Versions
{
"installed": [
{
"name": "nativephp/electron",
"direct-dependency": true,
"homepage": "https://github.com/nativephp/electron",
"source": "https://github.com/NativePHP/electron/tree/1.0.0-beta.1",
"version": "1.0.0-beta.1",
"description": "Electron wrapper for the NativePHP framework.",
"abandoned": false
},
{
"name": "nativephp/laravel",
"direct-dependency": true,
"homepage": "https://github.com/nativephp/laravel",
"source": "https://github.com/NativePHP/laravel/tree/1.0.0-beta.1",
"version": "1.0.0-beta.1",
"description": "Laravel wrapper for the NativePHP framework.",
"abandoned": false
},
{
"name": "nativephp/php-bin",
"direct-dependency": false,
"homepage": "https://nativephp.com",
"source": "https://github.com/NativePHP/php-bin/tree/0.5.6",
"version": "0.5.6",
"description": "PHP binaries used by the NativePHP framework",
"abandoned": false
}
]
}
PHP Version
8.3.16
Laravel Version
11.39.1
Node Version
22.11.0
Which operating systems have you seen this occur on?
macOS
OS version
MacOS Sequioa 15.2
Notes
No response
The text was updated successfully, but these errors were encountered:
I considered that my recent changes might be the cause, but after reverting them, I encountered the same error.
From my research, npx concurrently uses the tree-kill method to terminate all child processes, which is likely causing the issue. Some streams are cut off before the main process can close them properly. I received several alerts each time, and they are inconsistent.
The new way NativePHP handles the queue workers via ChildProcess keeps popping up in my mind...
I'm wondering if that's having an effect here. Maybe not. I haven't tested anything. If it is though, I'd propose capturing the SIGTERM request and sending an event which pulls them down perhaps 🤔
What were you trying to do?
Seems to have regressed from a version that I'm yet to identify. Last known good for me was 0.7.0 - I'll run some tests.
When hitting Command+C on the terminal after running
composer native:dev
, the app used to close immediately. Now, it halts until a javascript alert is acknowledged:It appears related to the process of killing processes when SIGTERM is received.
Note: This does not seem to affect closing the app normally (using the menubar) on Mac (Where tested)
What happened?
Currently, every time you close the native:dev process via Command + C, the error provided appears.
How to reproduce the bug
composer create-project laravel/laravel nativephp-demo-test
cd nativephp-demo-test
npm i
composer require nativephp/electron
(Make sure you're allowing beta versions) and assert1.0.0-beta.1
is installed.php artisan native:install
- Agree to build NPM deps and then to run the dev servercomposer native:dev
Package Versions
PHP Version
8.3.16
Laravel Version
11.39.1
Node Version
22.11.0
Which operating systems have you seen this occur on?
macOS
OS version
MacOS Sequioa 15.2
Notes
No response
The text was updated successfully, but these errors were encountered: