Skip to content

PHP server exited with code 4294967294 #85

@smartmedHumaida

Description

@smartmedHumaida

What were you trying to do?

I am trying to create a native app for my vue3+vuetify frontend which is already a frontend of my production system. and hopefully make it working on windows at least

What happened?

every time I run either composer run native:dev or php artisan native:run the execution is being halted. I created 5 different laravel projects with:

  • laravel (with laravel new) + vuejs X vuetify (with npm create vuetify)
  • laravel (with laravel new) + veujs (npm install vue@3)
  • laravel (with laravel new)
  • laravel (with composer create-project)
  • laravel (with composer create-project) + vuejs (npm install vue@3)

none of these things resulted in success with running dev mode of php native. Matter fact, last time I checked (last 2 weeks) it were fine then.
right now, going back to my old project, it won't start either!

How to reproduce the bug

laravel new my_app

  • no starter kit
  • sqlite db
  • any testing
  • when done, composer require nativephp/desktop
  • php artisan native:dev or composer run native:dev

Debug Output

all of my outputs are exact same:

~/Documents/laravel_native_projects/test5
$ php artisan native:install -vvv

  Would you like to publish the Electron project? (yes/no) [no]
❯ yes

  Would you like to install the NativePHP NPM dependencies? (yes/no) [yes]
❯ yes

 Installing NPM dependencies (This may take a while)...

 Installing NPM dependencies using the npm package manager...


> laravel-dev@1.0.0 postinstall
> node ./node_modules/electron-builder/cli.js install-app-deps

  • electron-builder  version=25.1.8
  • executing @electron/rebuild  electronVersion=38.7.2 arch=x64 buildFromSource=false appDir=./
  • installing native dependencies  arch=x64
  • completed installing native dependencies

up to date, audited 1020 packages in 3s

211 packages are looking for funding
  run `npm fund` for details

38 vulnerabilities (2 low, 2 moderate, 34 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

  Creating Electron project 

 Created Electron project in `./nativephp/electron`

  Installing composer scripts 

 Installing `composer native:dev` script alias...

 native:dev script already installed... skipping.

 Installing `native:install --publish` post-update-cmd script

 post-update-cmd script installed!

  Publishing NativePHP Service Provider... 

   INFO  Publishing [nativephp-provider] assets.  

  File [C:\Users\PC\Documents\laravel_native_projects\test5\app\Providers\NativeAppServiceProvider.php] already exists ... SKIPPED  

   INFO  Publishing [nativephp-config] assets.  

  File [C:\Users\PC\Documents\laravel_native_projects\test5\config\nativephp.php] already exists ......................... SKIPPED  

  Would you like to start the NativePHP development server: (yes/no) [no]
❯ yes

  Starting NativePHP dev server… 

 Fetching latest dependencies…

 Installing NPM dependencies (This may take a while)...

 Installing NPM dependencies using the npm package manager...


> laravel-dev@1.0.0 postinstall
> node ./node_modules/electron-builder/cli.js install-app-deps

  • electron-builder  version=25.1.8
  • executing @electron/rebuild  electronVersion=38.7.2 arch=x64 buildFromSource=false appDir=./
  • installing native dependencies  arch=x64
  • completed installing native dependencies

up to date, audited 1020 packages in 3s

211 packages are looking for funding
  run `npm fund` for details

38 vulnerabilities (2 low, 2 moderate, 34 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

 Starting NativePHP app

 Running the dev script with npm...


> laravel-dev@1.0.0 dev
> cross-env node php.js && electron-vite dev --watch

Binary Source:  C:\Users\PC\Documents\laravel_native_projects\test5\vendor\nativephp\php-bin\bin\win\x64\php-8.4.zip
Binary Filename:  php.exe
PHP version: 8.4
Unzipping PHP binary from C:\Users\PC\Documents\laravel_native_projects\test5\vendor\nativephp\php-bin\bin\win\x64\php-8.4.zip to C:\Users\PC\Documents\laravel_native_projects\test5\vendor\nativephp\desktop\resources\build\php
Copied PHP binary to  C:\Users\PC\Documents\laravel_native_projects\test5\vendor\nativephp\desktop\resources\build\php\php.exe
vite v7.3.1 building ssr environment for development...

watching for file changes...

build started...
renderer and preload config is missing
transforming...
✓ 37 modules transformed.
rendering chunks...
out/main/index.js  87.52 kB
built in 169ms.

build the electron main process successfully

Binary Source:  C:\Users\PC\Documents\laravel_native_projects\test5\vendor\nativephp\php-bin\bin\win\x64\php-8.4.zip
Binary Filename:  php.exe
PHP version: 8.4
Unzipping PHP binary from C:\Users\PC\Documents\laravel_native_projects\test5\vendor\nativephp\php-bin\bin\win\x64\php-8.4.zip to C:\Users\PC\Documents\laravel_native_projects\test5\vendor\nativephp\desktop\resources\build\php
Copied PHP binary to  C:\Users\PC\Documents\laravel_native_projects\test5\vendor\nativephp\desktop\resources\build\php\php.exe
vite v7.3.1 building ssr environment for development...

watching for file changes...

build started...
renderer and preload config is missing
transforming...
✓ 37 modules transformed.
rendering chunks...
out/main/index.js  87.52 kB
built in 169ms.

build the electron main process successfully
Binary Source:  C:\Users\PC\Documents\laravel_native_projects\test5\vendor\nativephp\php-bin\bin\win\x64\php-8.4.zip
Binary Filename:  php.exe
PHP version: 8.4
Unzipping PHP binary from C:\Users\PC\Documents\laravel_native_projects\test5\vendor\nativephp\php-bin\bin\win\x64\php-8.4.zip to C:\Users\PC\Documents\laravel_native_projects\test5\vendor\nativephp\desktop\resources\build\php
Copied PHP binary to  C:\Users\PC\Documents\laravel_native_projects\test5\vendor\nativephp\desktop\resources\build\php\php.exe
vite v7.3.1 building ssr environment for development...

watching for file changes...

build started...
renderer and preload config is missing
transforming...
✓ 37 modules transformed.
rendering chunks...
out/main/index.js  87.52 kB
built in 169ms.

build the electron main process successfully
Unzipping PHP binary from C:\Users\PC\Documents\laravel_native_projects\test5\vendor\nativephp\php-bin\bin\win\x64\php-8.4.zip to C:\Users\PC\Documents\laravel_native_projects\test5\vendor\nativephp\desktop\resources\build\php
Copied PHP binary to  C:\Users\PC\Documents\laravel_native_projects\test5\vendor\nativephp\desktop\resources\build\php\php.exe
vite v7.3.1 building ssr environment for development...

watching for file changes...

build started...
renderer and preload config is missing
transforming...
✓ 37 modules transformed.
rendering chunks...
out/main/index.js  87.52 kB
built in 169ms.

build the electron main process successfully
Copied PHP binary to  C:\Users\PC\Documents\laravel_native_projects\test5\vendor\nativephp\desktop\resources\build\php\php.exe
vite v7.3.1 building ssr environment for development...

watching for file changes...

build started...
renderer and preload config is missing
transforming...
✓ 37 modules transformed.
rendering chunks...
out/main/index.js  87.52 kB
built in 169ms.

build the electron main process successfully

watching for file changes...

build started...
renderer and preload config is missing
transforming...
✓ 37 modules transformed.
rendering chunks...
out/main/index.js  87.52 kB
built in 169ms.

build the electron main process successfully
build started...
renderer and preload config is missing
transforming...
✓ 37 modules transformed.
rendering chunks...
out/main/index.js  87.52 kB
built in 169ms.

build the electron main process successfully
transforming...
✓ 37 modules transformed.
rendering chunks...
out/main/index.js  87.52 kB
built in 169ms.

build the electron main process successfully
rendering chunks...
out/main/index.js  87.52 kB
built in 169ms.

build the electron main process successfully

build the electron main process successfully

start electron app...

start electron app...


Skip checkForUpdates because application is not packed and dev update config is not forced


Skip checkForUpdates because application is not packed and dev update config is not forced
checkForUpdatesAndNotify called, downloadPromise is null
Electron API server started on port 4001
checkForUpdatesAndNotify called, downloadPromise is null
Electron API server started on port 4001
Starting PHP server... C:\Users\PC\Documents\laravel_native_projects\test5\vendor\nativephp\desktop\resources\build\php\php.exe artisan serve C:\Users\PC\Documents\laravel_native_projects\test5 []
Starting PHP server... C:\Users\PC\Documents\laravel_native_projects\test5\vendor\nativephp\desktop\resources\build\php\php.exe artisan serve C:\Users\PC\Documents\laravel_native_projects\test5 []
Copying storage folder...
Copying storage folder...
Storage path: C:\Users\PC\AppData\Roaming\laravel-dev\storage
App path: C:\Users\PC\Documents\laravel_native_projects\test5
Making sure app folders are available
Skipping Database migration while in development.
You may migrate manually by running: php artisan native:migrate
* * * Running from source * * *
Starting PHP server...
Calling PHP C:\Users\PC\Documents\laravel_native_projects\test5\vendor\nativephp\desktop\resources\build\php\php.exe [
  '-d',
  'openssl.cafile=C:\\Users\\PC\\Documents\\laravel_native_projects\\test5\\vendor\\nativephp\\desktop\\resources\\build\\cacert.pem',
  '-d',
  'curl.cainfo=C:\\Users\\PC\\Documents\\laravel_native_projects\\test5\\vendor\\nativephp\\desktop\\resources\\build\\cacert.pem',
  '-d',
  'memory_limit=512M',
  '-S',
  '127.0.0.1:8101',
  'C:\\Users\\PC\\Documents\\laravel_native_projects\\test5\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\resources\\server.php'
]
PHP server exited with code 4294967294
^CTerminate batch job (Y/N)? 
^C

this part:

* * * Running from source * * *
Starting PHP server...
Calling PHP C:\Users\PC\Documents\laravel_native_projects\test5\vendor\nativephp\desktop\resources\build\php\php.exe [
  '-d',
  'openssl.cafile=C:\\Users\\PC\\Documents\\laravel_native_projects\\test5\\vendor\\nativephp\\desktop\\resources\\build\\cacert.pem',
  '-d',
  'curl.cainfo=C:\\Users\\PC\\Documents\\laravel_native_projects\\test5\\vendor\\nativephp\\desktop\\resources\\build\\cacert.pem',
  '-d',
  'memory_limit=512M',
  '-S',
  '127.0.0.1:8101',
  'C:\\Users\\PC\\Documents\\laravel_native_projects\\test5\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\resources\\server.php'
]
PHP server exited with code 4294967294

is what seems to be the problem

Which operating systems have you seen this occur on?

Windows

Notes

Enviroment:
windows 11 Pro (version 25H2) (build 26200.7840)
php8.4 (using herd)
Composer version 2.9.5
Node 25.x (using herd)
php.ini (not altered, default herd)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions