Skip to content

Unable to run multiple NativePHP apps simultaneously on Windows #651

@simonhamp

Description

@simonhamp

Discussed in https://github.com/orgs/NativePHP/discussions/650

Originally posted by NOGUD626 July 17, 2025

Unable to run multiple NativePHP apps simultaneously on Windows

Environment

  • OS: Windows 11
  • Laravel: 12.20.0
  • NativePHP/Electron: 1.1.1
  • NativePHP/Laravel: 1.1.2

Project Setup

To reproduce this issue, I created a minimal project with almost default configuration:

  1. Create Laravel project

    composer create-project laravel/laravel native_php
  2. Install NativePHP package

    cd native_php
    composer require nativephp/electron
  3. Initialize NativePHP

    php artisan native:install

Note: The project was kept as close to the default state as possible with minimal customization.

Issue Description

When attempting to run multiple NativePHP applications simultaneously on Windows, the second application fails to start with the following error:

* * * Running from source * * *
PHP server exited with code 4294967294

Error Details

Console output shows these errors:

  • Error: Error: net::ERR_NAME_NOT_RESOLVED
  • UnhandledPromiseRejectionWarning: Error: net::ERR_NAME_NOT_RESOLVED

Steps to Reproduce

  1. Build two separate NativePHP applications with different app IDs

    App 1 environment variables (.env):

    APP_NAME=nativephp_1
    
    NATIVEPHP_APP_NAME="${APP_NAME}"
    NATIVEPHP_APP_ID="com.nogu-lab.${APP_NAME}"
    NATIVEPHP_APP_VERSION=1.0.0

    App 2 environment variables (.env):

    APP_NAME=nativephp_2
    
    NATIVEPHP_APP_NAME="${APP_NAME}"
    NATIVEPHP_APP_ID="com.nogu-lab.${APP_NAME}"
    NATIVEPHP_APP_VERSION=1.0.0
  2. After building both apps, launch the first application → Starts successfully

  3. Launch the second application → Fails with the above error

Expected Behavior

Both applications should run simultaneously without any conflicts.

Actual Behavior

The second application fails to start.

image image (1) image (2)

Questions

  1. Is it possible to run multiple NativePHP applications simultaneously?
  2. If yes, what configuration is required to achieve this?
  3. What might be causing this issue and how can it be resolved?

Additional Context

Running multiple NativePHP applications simultaneously is a common requirement in both development and production environments. Finding a solution to this issue would be greatly beneficial for many use cases.

If anyone has encountered this issue or knows a workaround, your help would be greatly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwindows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions