Skip to content
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

Open
Tacks9 opened this issue Dec 8, 2024 · 14 comments
Labels
bug Something isn't working

Comments

@Tacks9
Copy link

Tacks9 commented Dec 8, 2024

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

# Clone this repository
git clone https://github.com/electron/electron-quick-start
# Go into the repository
cd electron-quick-start
# Install dependencies
npm install
# Run the app
npm start
image

Package Versions

 composer show "nativephp/*" --format=json
{
    "installed": [
        {
            "name": "nativephp/electron",
            "direct-dependency": true,
            "homepage": "https://github.com/nativephp/electron",
            "source": "https://github.com/NativePHP/electron/tree/0.6.5",
            "version": "0.6.5",
            "description": "Electron wrapper for the NativePHP framework.",
            "abandoned": false
        },
        {
            "name": "nativephp/laravel",
            "direct-dependency": false,
            "homepage": "https://github.com/nativephp/laravel",
            "source": "https://github.com/NativePHP/laravel/tree/0.6.4",
            "version": "0.6.4",
            "description": "Laravel wrapper for the NativePHP framework.",
            "abandoned": false
        },
        {
            "name": "nativephp/php-bin",
            "direct-dependency": false,
            "homepage": "https://nativephp.com",
            "source": "https://github.com/NativePHP/php-bin/tree/0.4.0",
            "version": "0.4.0",
            "description": "PHP binaries used by the NativePHP framework",
            "abandoned": false
        }
    ]
}

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

@Tacks9 Tacks9 added the bug Something isn't working label Dec 8, 2024
@simonhamp
Copy link
Member

Please upgrade to the latest NativePHP dependencies and try again:

composer require nativephp/electron -W

@Tacks9
Copy link
Author

Tacks9 commented Dec 23, 2024

Please upgrade to the latest NativePHP dependencies and try again:请升级到最新的 NativePHP 依赖项并重试:

composer require nativephp/electron -W

  • 🤯 It's the same problem. No windows available after startup
image image
  • this is my composer.json

nativephp has been upgraded to 0.9 , "nativephp/electron": "^0.9.0"

"require": {
        "php": "^8.2",
        "laravel/framework": "^11.31",
        "laravel/tinker": "^2.9",
        "livewire/livewire": "^3.5",
        "nativephp/electron": "^0.9.0"
    },
    "require-dev": {
        "fakerphp/faker": "^1.23",
        "laravel/pail": "^1.1",
        "laravel/pint": "^1.13",
        "laravel/sail": "^1.26",
        "mockery/mockery": "^1.6",
        "nunomaduro/collision": "^8.1",
        "pestphp/pest": "^3.5",
        "pestphp/pest-plugin-laravel": "^3.0"
    },
  • code NativeAppServiceProvider.php
class NativeAppServiceProvider implements ProvidesPhpIni
{
    /**
     * Executed once the native application has been booted.
     * Use this method to open windows, register global shortcuts, etc.
     */
    public function boot(): void
    {
        Window::open()
        ->width(800)
        ->height(800)
        ->showDevTools();
    }

    /**
     * Return an array of php.ini directives to be set.
     */
    public function phpIni(): array
    {
        return [
        ];
    }
}

@Fludem
Copy link

Fludem commented Jan 1, 2025

@Tacks9 Can you provide a link to a repo where I can reproduce this?

@simonhamp
Copy link
Member

@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 storage/logs/laravel.log, and when you're running native:serve it should appear in the terminal output too.

@Fludem
Copy link

Fludem commented Jan 2, 2025

@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 storage/logs/laravel.log, and when you're running native:serve it should also appear in the terminal output.

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.

@Tacks9
Copy link
Author

Tacks9 commented Jan 2, 2025

@Tacks9 If a window doesn't show, this is usually because of an error in your PHP code.如果没有显示窗口,这通常是因为 PHP 代码中存在错误。

There will most likely be a log of the error in storage/logs/laravel.log, and when you're running native:serve it should appear in the terminal output too.storage/logs/laravel.log中很可能会有错误日志,当您运行native:serve时,它​​也应该出现在终端输出中。

  • php No logs available
$ cat storage/logs/*
zsh: no matches found: storage/logs/*
  • php artisan native:server
 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

@Tacks9
Copy link
Author

Tacks9 commented Jan 2, 2025

@Tacks9 If a window doesn't show, this is usually because of an error in your PHP code.如果没有显示窗口,这通常是因为 PHP 代码中存在错误。
There will most likely be a log of the error in storage/logs/laravel.log, and when you're running native:serve it should also appear in the terminal output.storage/logs/laravel.log中很可能有错误日志,当您运行native:serve时,它​​也应该出现在终端输出中。

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.主要是因为 Laravel 开发人员的大部分(包括我自己)都在 Mac 上工作。如果 Mac 不起作用,我们得到的就不仅仅是这份报告,而且我也无法启动一个有效的示例。

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. 😵‍💫

@Fludem
Copy link

Fludem commented Jan 2, 2025

image I think it's something specific to your environment. Maybe something affecting a dependency or similar. @Tacks9

@Fludem
Copy link

Fludem commented Jan 2, 2025

@Tacks9 I haven't looked into anything so might be expected but

I have

You may migrate manually by running: php artisan native:migrate
PHP Server started on port:  8100

Yours is starting on port 8104.

Again, not sure if expected or something.

EDIT:

PHP Server started on port:  8103
PHP Server started on port:  8103

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.

@Fludem
Copy link

Fludem commented Jan 2, 2025

@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?

@simonhamp
Copy link
Member

@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 .env file?

Make sure the directories that Laravel expects to be able to write to in storage (storage/framework and storage/logs) are writable by your user. If they're not, this can cause issues.

A good way to check is to try running your app in a web browser: Run php artisan serve and open the URL in your browser and see if it loads the default route.

@Tacks9
Copy link
Author

Tacks9 commented Jan 5, 2025

@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 .env file?如果没有日志文件,这可能是 Laravel 启动过程早期的权限问题或其他问题。也许您的.env文件中有错误?

Make sure the directories that Laravel expects to be able to write to in storage (storage/framework and storage/logs) are writable by your user. If they're not, this can cause issues.确保 Laravel 期望能够写入storage目录( storage/frameworkstorage/logs )可供您的用户写入。如果不是,这可能会导致问题。

A good way to check is to try running your app in a web browser: Run php artisan serve and open the URL in your browser and see if it loads the default route.一个很好的检查方法是尝试在 Web 浏览器中运行您的应用程序:运行php artisan serve并在浏览器中打开 URL,看看它是否加载默认路由。

  • Index Routing is normal access
$ 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');
});
image

@Tacks9
Copy link
Author

Tacks9 commented Jan 5, 2025

@Tacks9 I haven't looked into anything so might be expected but我还没有调查过任何事情,所以可能是预料之中的,但是

I have  我有

You may migrate manually by running: php artisan native:migrate
PHP Server started on port:  8100

Yours is starting on port 8104.您的启动端口为 8104。

Again, not sure if expected or something.再次,不确定是否符合预期或其他什么。

EDIT:  编辑:

PHP Server started on port:  8103
PHP Server started on port:  8103

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.Nvm,每次重启后都会迭代上升。如果您关闭该应用程序,它看起来并没有真正关闭该进程。这意味着该端口仍然绑定。

  • Yes, you suddenly noticed a port issue.
  • I also checked and found that there were many ports such as 8100, 8101, 8102, etc. So I killed them and restarted nativephp, but found that the window still couldn't be opened
$ 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...

@Tacks9
Copy link
Author

Tacks9 commented Jan 5, 2025

@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?也许通过更快的媒体,如 Discord 或任何您可以访问的媒体?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants