NativePHP / laravel

Laravel wrapper for the NativePHP framework
https://nativephp.com
MIT License
2.96k stars 152 forks source link

[Bug]: Won't load the app in dev #66

Closed cloudwales closed 11 months ago

cloudwales commented 12 months ago

What happened?

When working on app and saving it was restarting the window. Then after a fair few times, it stopped loading. Stoped the server and re-run php artisan native:serve and gets stuck on:

start electron app...

API server started on port 4000

Starting PHP server... /Users/User/Projects/WebDevelopment/Dash/vendor/nativephp/electron/resources/js/resources/php artisan serve /Users/User/Projects/WebDevelopment/Dash

Making sure app folders are available

Migrating database...

Migrations are fine and app is all good as i'm able to serve via php artisan serve. If i restart the laptop, it will work again.

How to reproduce the bug

So far seems to be random, but think it is linked to when I save and it refreshes the electron app.

Package Version

0.1.1

PHP Version

8.2.8

Laravel Version

10.15.0

Node Version

v20.5.0

Which operating systems does with happen with?

macOS

Notes

Macbook Pro M1

mpociot commented 12 months ago

Huh weird, Ian ran into this today as well. Hopefully we can find a way to successfully reproduce this.

cloudwales commented 12 months ago

@mpociot Ah glad its not just me :) ... Thought it was a bit weird. If i find the issue I'll post back.

Many thanks

mpociot commented 12 months ago

I ran into this yesterday as well and noticed that there were some stray php processes that didn't properly finish/end? Killing them manually fixed the bug, but I still need to figure out how I can properly reproduce this.

riddla commented 9 months ago

Happened to me as well. I ended up with an empty Electron app respectively an app without a window. Killing the mentioned php processes via killall php did help.