-
-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Too distressed, why doesn't have a startup window on Mac [php artist native:serve] #442
Comments
Please upgrade to the latest NativePHP dependencies and try again:
|
@Tacks9 Can you provide a link to a repo where I can reproduce this? |
@Tacks9 If a window doesn't show, this is usually because of an error in your PHP code. There will most likely be a log of the error in |
My thoughts too. Primarily because an extensive portion of Laravel Devs, myself included, work on Macs. If Macs didn't work, we'd have more than this report, and I wouldn't be able to fire up a working example either. |
$ cat storage/logs/*
zsh: no matches found: storage/logs/*
php artisan native:serve
Starting NativePHP dev server…
Fetching latest dependencies…
Installing NPM dependencies (This may take a while)...
Installing NPM dependencies using the npm package manager...
Fetching latest dependencies…
> Laravel@1.0.0 postinstall
> node ./node_modules/electron-builder/cli.js install-app-deps
• electron-builder version=24.13.3
Arch: arm64
Platform: darwin
• loaded configuration file=/Users/stellonde/Code/MoChi-Coder/nativephp-demo/vendor/nativephp/electron/resources/js/electron-builder.js
up to date, audited 1091 packages in 4s
138 packages are looking for funding
run `npm fund` for details
4 vulnerabilities (3 moderate, 1 high)
To address all issues, run:
npm audit fix
Run `npm audit` for details.
Starting NativePHP app
Copying app icons...
App icons copied
Running the dev script with npm...
Fetching latest dependencies…
> Laravel@1.0.0 dev
> cross-env node php.js && electron-vite dev --watch
Binary Source: /Users/stellonde/Code/MoChi-Coder/nativephp-demo/vendor/nativephp/php-bin/bin/mac/arm64/php-8.3.zip
Binary Filename: php
PHP version: 8.3
Unzipping PHP binary from /Users/stellonde/Code/MoChi-Coder/nativephp-demo/vendor/nativephp/php-bin/bin/mac/arm64/php-8.3.zip to /Users/stellonde/Code/MoChi-Coder/nativephp-demo/vendor/nativephp/electron/resources/js/resources/php
Copied certificate file to /Users/stellonde/Code/MoChi-Coder/nativephp-demo/vendor/nativephp/electron/resources/js/resources/cacert.pem
Copied PHP binary to /Users/stellonde/Code/MoChi-Coder/nativephp-demo/vendor/nativephp/electron/resources/js/resources/php/php
renderer config is missing
vite v4.5.5 building SSR bundle for development...
watching for file changes...
build started...
✓ 31 modules transformed.
out/main/index.js 58.66 kB
built in 222ms.
build the electron main process successfully
-----
vite v4.5.5 building SSR bundle for development...
watching for file changes...
build started...
"contextBridge" and "ipcRenderer" are imported from external module "electron" but never used in "src/preload/index.js".
✓ 1 modules transformed.
out/preload/index.js 0.70 kB
built in 4ms.
build the electron preload files successfully
start electron app...
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 4000
Starting PHP server... /Users/stellonde/Code/MoChi-Coder/nativephp-demo/vendor/nativephp/electron/resources/js/resources/php/php artisan serve /Users/stellonde/Code/MoChi-Coder/nativephp-demo []
Making sure app folders are available
Skipping Database migration while in development.
You may migrate manually by running: php artisan native:migrate
PHP Server started on port: 8104
PHP Server started on port: 8104 |
Yes, in fact, I have run native PHP before and a corresponding window appeared, which was in nativephp v0.6. To illustrate my question, I opened a repository containing an empty nativaphp project. I hope you can refer to my demo to help locate the problem. Thank you very much. Is it possible that it's a problem with my computer? I'm too confused. 😵💫 |
I think it's something specific to your environment. Maybe something affecting a dependency or similar. @Tacks9 |
@Tacks9 I haven't looked into anything so might be expected but I have
Yours is starting on port 8104. Again, not sure if expected or something. EDIT:
Nvm, it goes up in iterations after each restart. If you close the app, it doesn't look like it actually closes the process. Meaning the port is still bound to. |
@Tacks9 It is related to your environment, but there isn't enough logging in place for me to identify any issues. Would you mind if we talked one time and debugged this together? Maybe over a quicker medium like Discord or whatever you have access to? |
@Tacks9 If there are no log files, this may be a permissions issue or some other issue early in the Laravel bootup process. Perhaps an error in your Make sure the directories that Laravel expects to be able to write to in A good way to check is to try running your app in a web browser: Run |
$ php artisan serve
INFO Server running on [http://127.0.0.1:8000].
Press Ctrl+C to stop the server Route::get('/', function () {
return "nativephp-demo";
// return view('welcome');
}); |
$ ps -ef | grep php
501 7527 53694 0 10:33AM ?? 0:00.04 php-fpm: master process (/Users/stellonde/Library/Application Support/Herd/config/fpm/8.3-fpm.conf)
501 7529 7527 0 10:33AM ?? 0:00.21 php-fpm: pool herd
501 7530 7527 0 10:33AM ?? 0:00.07 php-fpm: pool herd
501 8409 1 0 10:38AM ?? 0:00.06 php-fpm: master process (/opt/homebrew/etc/php/8.3/php-fpm.conf)
501 8424 8409 0 10:38AM ?? 0:00.00 php-fpm: pool www
501 8425 8409 0 10:38AM ?? 0:00.00 php-fpm: pool www
501 11589 1 0 8Dec24 ?? 0:06.40 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/php/php -d max_input_time=0 -d max_execution_time=0 -d error_reporting=E_ALL -d display_errors=1 -d openssl.cafile=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d curl.cainfo=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d memory_limit=512M -S 127.0.0.1:8100 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php
501 11590 1 0 8Dec24 ?? 0:06.47 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/php/php -d max_input_time=0 -d max_execution_time=0 -d error_reporting=E_ALL -d display_errors=1 -d openssl.cafile=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d curl.cainfo=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d memory_limit=512M -S 127.0.0.1:8100 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php
501 11591 1 0 8Dec24 ?? 0:06.15 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/php/php -d max_input_time=0 -d max_execution_time=0 -d error_reporting=E_ALL -d display_errors=1 -d openssl.cafile=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d curl.cainfo=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d memory_limit=512M -S 127.0.0.1:8100 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php
501 11592 1 0 8Dec24 ?? 0:06.55 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/php/php -d max_input_time=0 -d max_execution_time=0 -d error_reporting=E_ALL -d display_errors=1 -d openssl.cafile=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d curl.cainfo=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d memory_limit=512M -S 127.0.0.1:8100 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php
501 17365 1 0 8Dec24 ?? 0:06.38 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/php/php -d max_input_time=0 -d max_execution_time=0 -d error_reporting=E_ALL -d display_errors=0 -d openssl.cafile=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d curl.cainfo=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d memory_limit=512M -S 127.0.0.1:8101 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php
501 17366 1 0 8Dec24 ?? 0:06.54 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/php/php -d max_input_time=0 -d max_execution_time=0 -d error_reporting=E_ALL -d display_errors=0 -d openssl.cafile=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d curl.cainfo=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d memory_limit=512M -S 127.0.0.1:8101 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php
501 17367 1 0 8Dec24 ?? 0:06.44 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/php/php -d max_input_time=0 -d max_execution_time=0 -d error_reporting=E_ALL -d display_errors=0 -d openssl.cafile=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d curl.cainfo=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d memory_limit=512M -S 127.0.0.1:8101 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php
501 17368 1 0 8Dec24 ?? 0:06.25 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/php/php -d max_input_time=0 -d max_execution_time=0 -d error_reporting=E_ALL -d display_errors=0 -d openssl.cafile=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d curl.cainfo=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d memory_limit=512M -S 127.0.0.1:8101 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php
501 18411 1 0 8Dec24 ?? 0:07.27 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/php/php -d max_input_time=0 -d max_execution_time=0 -d error_reporting=E_ALL -d display_errors=0 -d openssl.cafile=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d curl.cainfo=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d memory_limit=512M -S 127.0.0.1:8102 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php
501 18412 1 0 8Dec24 ?? 0:07.29 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/php/php -d max_input_time=0 -d max_execution_time=0 -d error_reporting=E_ALL -d display_errors=0 -d openssl.cafile=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d curl.cainfo=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d memory_limit=512M -S 127.0.0.1:8102 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php
501 18413 1 0 8Dec24 ?? 0:07.51 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/php/php -d max_input_time=0 -d max_execution_time=0 -d error_reporting=E_ALL -d display_errors=0 -d openssl.cafile=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d curl.cainfo=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d memory_limit=512M -S 127.0.0.1:8102 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php
501 18415 1 0 8Dec24 ?? 0:07.11 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/php/php -d max_input_time=0 -d max_execution_time=0 -d error_reporting=E_ALL -d display_errors=0 -d openssl.cafile=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d curl.cainfo=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d memory_limit=512M -S 127.0.0.1:8102 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php
501 19331 1 0 8Dec24 ?? 0:07.68 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/php/php -d openssl.cafile=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d curl.cainfo=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d memory_limit=512M -S 127.0.0.1:8103 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php
501 19332 1 0 8Dec24 ?? 0:07.45 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/php/php -d openssl.cafile=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d curl.cainfo=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d memory_limit=512M -S 127.0.0.1:8103 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php
501 19334 1 0 8Dec24 ?? 0:07.31 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/php/php -d openssl.cafile=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d curl.cainfo=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d memory_limit=512M -S 127.0.0.1:8103 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php
501 19335 1 0 8Dec24 ?? 0:07.41 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/php/php -d openssl.cafile=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d curl.cainfo=/Users/stellonde/Code/MoChi-Coder/todo-app/vendor/nativephp/electron/resources/js/resources/cacert.pem -d memory_limit=512M -S 127.0.0.1:8103 /Users/stellonde/Code/MoChi-Coder/todo-app/vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php
501 8465 58254 0 10:39AM ttys000 0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox php
$ php artisan native:serve
Starting NativePHP dev server…
Fetching latest dependencies…
Installing NPM dependencies (This may take a while)...
Installing NPM dependencies using the npm package manager...
Fetching latest dependencies…
> Laravel@1.0.0 postinstall
> node ./node_modules/electron-builder/cli.js install-app-deps
• electron-builder version=24.13.3
Arch: arm64
Platform: darwin
• loaded configuration file=/Users/stellonde/Code/MoChi-Coder/nativephp-demo/vendor/nativephp/electron/resources/js/electron-builder.js
up to date, audited 1091 packages in 4s
138 packages are looking for funding
run `npm fund` for details
4 vulnerabilities (3 moderate, 1 high)
To address all issues, run:
npm audit fix
Run `npm audit` for details.
Starting NativePHP app
Copying app icons...
App icons copied
Running the dev script with npm...
Fetching latest dependencies…
> Laravel@1.0.0 dev
> cross-env node php.js && electron-vite dev --watch
Binary Source: /Users/stellonde/Code/MoChi-Coder/nativephp-demo/vendor/nativephp/php-bin/bin/mac/arm64/php-8.3.zip
Binary Filename: php
PHP version: 8.3
Unzipping PHP binary from /Users/stellonde/Code/MoChi-Coder/nativephp-demo/vendor/nativephp/php-bin/bin/mac/arm64/php-8.3.zip to /Users/stellonde/Code/MoChi-Coder/nativephp-demo/vendor/nativephp/electron/resources/js/resources/php
Copied certificate file to /Users/stellonde/Code/MoChi-Coder/nativephp-demo/vendor/nativephp/electron/resources/js/resources/cacert.pem
Copied PHP binary to /Users/stellonde/Code/MoChi-Coder/nativephp-demo/vendor/nativephp/electron/resources/js/resources/php/php
renderer config is missing
vite v4.5.5 building SSR bundle for development...
watching for file changes...
build started...
✓ 31 modules transformed.
out/main/index.js 58.66 kB
built in 337ms.
build the electron main process successfully
-----
vite v4.5.5 building SSR bundle for development...
watching for file changes...
build started...
"contextBridge" and "ipcRenderer" are imported from external module "electron" but never used in "src/preload/index.js".
✓ 1 modules transformed.
out/preload/index.js 0.70 kB
built in 4ms.
build the electron preload files successfully
start electron app...
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 4000
Starting PHP server... /Users/stellonde/Code/MoChi-Coder/nativephp-demo/vendor/nativephp/electron/resources/js/resources/php/php artisan serve /Users/stellonde/Code/MoChi-Coder/nativephp-demo []
Making sure app folders are available
Skipping Database migration while in development.
You may migrate manually by running: php artisan native:migrate
PHP Server started on port: 8100
PHP Server started on port: 8100
2025-01-05 10:42:48.715 Electron[8821:3448276] +[IMKClient subclass]: chose IMKClient_Legacy
2025-01-05 10:42:48.715 Electron[8821:3448276] +[IMKInputSession subclass]: chose IMKInputSession_Legacy
Running scheduler...
|
|
What were you trying to do?
Expected to start The NativePHP normally
What happened?
Expected to start The NativePHP normally , Initialize Open Window
How to reproduce the bug
NativePHP is not work. How PHP personnel debug electrons ?
There are no errors, but the application cannot be launched normally. Although the electron is working properly, the window cannot be opened and there are no available windows,. It's too painful. I've been following this project for a long time and planned to start running it today, but it didn't succeed.
For this, I tried the Electron project and was able to open windows normally on my computer
Just a few steps to start
Package Versions
PHP Version
8.3.14
Laravel Version
11.34.2
Node Version
v22.10.0
Which operating systems have you seen this occur on?
macOS
OS version
MacOs Sequoia 15.0.1
Notes
No response
The text was updated successfully, but these errors were encountered: