Skip to content

NativePHP for desktop not working with Filament #679

@nilskretschmer

Description

@nilskretschmer

What were you trying to do?

Starting a fresh Laravel project with Filament v3 or v4 without errors.

What happened?

Starting the Laravel application in the browser works as expected - there are no errors in the console.
When I start the same app with NativePHP using php artisan native:serve I get lots of errors in the console (TypeScript, Alpine, Livewire and Electron-related).

How to reproduce the bug

  1. Start a new Laravel application using Herd (https://laravel.com/docs/12.x/installation#herd-on-windows)
  2. Use the Livewire Starter Kit
  3. Install Filament
  4. Install NativePHP/electron
  5. Access the Filament default login page and watch the console (browser)
  6. Access the same login page and watch the console (electron/nativePHP)
  7. You will see that the UI is broken and that the console shows several errors:
Image

Debug Output

Array
(
    [Environment] => Array
        (
            [PHP] => Array
                (
                    [Version] => 8.4.11
                    [Path] => C:\Users\nk\.config\herd\bin\php84\php.exe
                )

            [Laravel] => Array
                (
                    [Version] => 12.24.0
                    [ConfigCached] =>
                    [RoutesCached] =>
                    [DebugEnabled] => 1
                )

            [Node] => Array
                (
                    [Version] => v24.3.0
                    [Path] => C:\Program Files\nodejs\node.exe
                )

            [NPM] => Array
                (
                    [Version] => 11.4.2
                    [Path] => C:\Program Files\nodejs\npm
C:\Program Files\nodejs\npm.cmd
                )

            [OperatingSystem] => WINNT
        )

    [NativePHP] => Array
        (
            [Versions] => Illuminate\Support\Collection Object
                (
                    [items:protected] => Array
                        (
                            [nativephp/electron] => 1.2.0.0
                            [nativephp/laravel] => 1.2.0.0
                            [nativephp/php-bin] => 1.1.0.0
                        )

                    [escapeWhenCastingToString:protected] =>
                )

            [Configuration] => Array
                (
                    [Provider] => App\Providers\NativeAppServiceProvider
                    [BuildHooks] => Array
                        (
                            [Pre] => Array
                                (
                                )

                            [Post] => Array
                                (
                                )

                        )

                    [NotarizationEnabled] =>
                    [AzureTrustedSigningEnabled] =>
                    [CustomPHPBinary] =>
                )

        )

)

Which operating systems have you seen this occur on?

Windows

Notes

I use Laravel Herd on Windows 11. If I access the application in the web browser using the Laravel Herd provided local domain the app is working just fine.

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