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

The windows built app shows nothing, (using nativphp/electron v0.6.3 and higher) #314

Open
mohamedds-12 opened this issue May 22, 2024 · 13 comments
Labels
bug Something isn't working windows

Comments

@mohamedds-12
Copy link

mohamedds-12 commented May 22, 2024

What were you trying to do?

I tried to build the app using php artisan native:build

What happened?

The build completed, but whenI run the app nothing happens, it stays in hte background, and for some how there is a lot of occurrences :
image

How to reproduce the bug

build the app and run it

Package Versions

nativephp/electron 0.6.3 | 0.6.5

PHP Version

8.1.10

Laravel Version

10.48.10

Node Version

20.1.0

Which operating systems have you seen this occur on?

Windows

OS version

10.0.19045 N/A Build 19045

Notes

No response

@mohamedds-12 mohamedds-12 added the bug Something isn't working label May 22, 2024
@mohamedds-12 mohamedds-12 changed the title The windows built app shows nothing The windows built app shows nothing, (using v0.6.3) May 28, 2024
@mohamedds-12 mohamedds-12 changed the title The windows built app shows nothing, (using v0.6.3) The windows built app shows nothing, (using nativphp/electron v0.6.3) May 28, 2024
@Rudeisnice
Copy link

Whats the Error it reports when you start the laravel.exe with CMD?

@mohamedds-12
Copy link
Author

Whats the Error it reports when you start the laravel.exe with CMD?

(node:16500) UnhandledPromiseRejectionWarning: TypeError: Error processing argument at index 0, conversion failure from null
    at Object.setAppUserModelId (C:\Users\Mohammed\AppData\Local\Programs\laravel\resources\app.asar\node_modules\@electron-toolkit\utils\dist\index.js:215:26)
    at NativePHP.<anonymous> (C:\Users\Mohammed\AppData\Local\Programs\laravel\resources\app.asar\node_modules\@nativephp\electron-plugin\dist\index.js:108:33)
    at Generator.next (<anonymous>)
    at fulfilled (C:\Users\Mohammed\AppData\Local\Programs\laravel\resources\app.asar\node_modules\@nativephp\electron-plugin\dist\index.js:5:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
(Use `laravel --trace-warnings ...` to show where the warning was created)
(node:16500) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

@mohamedds-12
Copy link
Author

After updating to electro v 0.6.5, The output when I lunch the app using terminal :

Error: spawn C:\Users\Mohamed DS\AppData\Local\Programs\inspirational-quote\resources\app.asar.unpacked\resources\php\php.exe ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn C:\\Users\\Mohamed DS\\AppData\\Local\\Programs\\inspirational-quote\\resources\\app.asar.unpacked\\resources\\php\\php.exe',
  path: 'C:\\Users\\Mohamed DS\\AppData\\Local\\Programs\\inspirational-quote\\resources\\app.asar.unpacked\\resources\\php\\php.exe',
  spawnargs: [ 'artisan', 'native:config' ],
  cmd: 'C:\\Users\\Mohamed DS\\AppData\\Local\\Programs\\inspirational-quote\\resources\\app.asar.unpacked\\resources\\php\\php.exe artisan native:config',
  stdout: '',
  stderr: ''
}
Error: spawn C:\Users\Mohamed DS\AppData\Local\Programs\inspirational-quote\resources\app.asar.unpacked\resources\php\php.exe ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn C:\\Users\\Mohamed DS\\AppData\\Local\\Programs\\inspirational-quote\\resources\\app.asar.unpacked\\resources\\php\\php.exe',
  path: 'C:\\Users\\Mohamed DS\\AppData\\Local\\Programs\\inspirational-quote\\resources\\app.asar.unpacked\\resources\\php\\php.exe',
  spawnargs: [ 'artisan', 'native:php-ini' ],
  cmd: 'C:\\Users\\Mohamed DS\\AppData\\Local\\Programs\\inspirational-quote\\resources\\app.asar.unpacked\\resources\\php\\php.exe artisan native:php-ini',
  stdout: '',
  stderr: ''
}
(node:8900) UnhandledPromiseRejectionWarning: TypeError: Error processing argument at index 0, conversion failure from undefined
    at Object.setAppUserModelId (C:\Users\Mohamed DS\AppData\Local\Programs\inspirational-quote\resources\app.asar\node_modules\@electron-toolkit\utils\dist\index.js:215:26)
    at NativePHP.<anonymous> (C:\Users\Mohamed DS\AppData\Local\Programs\inspirational-quote\resources\app.asar\node_modules\@nativephp\electron-plugin\dist\index.js:108:33)
    at Generator.throw (<anonymous>)
    at rejected (C:\Users\Mohamed DS\AppData\Local\Programs\inspirational-quote\resources\app.asar\node_modules\@nativephp\electron-plugin\dist\index.js:6:65)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at emitUnhandledRejectionWarning (node:internal/process/promises:200:15)
    at processPromiseRejections (node:internal/process/promises:296:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:32)
(node:8900) TypeError: Error processing argument at index 0, conversion failure from undefined
    at Object.setAppUserModelId (C:\Users\Mohamed DS\AppData\Local\Programs\inspirational-quote\resources\app.asar\node_modules\@electron-toolkit\utils\dist\index.js:215:26)
    at NativePHP.<anonymous> (C:\Users\Mohamed DS\AppData\Local\Programs\inspirational-quote\resources\app.asar\node_modules\@nativephp\electron-plugin\dist\index.js:108:33)
    at Generator.throw (<anonymous>)
    at rejected (C:\Users\Mohamed DS\AppData\Local\Programs\inspirational-quote\resources\app.asar\node_modules\@nativephp\electron-plugin\dist\index.js:6:65)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

@Dalovec
Copy link

Dalovec commented Aug 4, 2024

I have the same problem as @mohamedds-12. The windows built app doesn't launch. Building on windows or mac doesn't change this behaviour. I am on v0.6.5.

@umair982
Copy link

I am also having same problem. same error when tried to run app on terminal. @mohamedds-12 did you get solution or did you fixed it ? if yes kindly share

@mohamedds-12
Copy link
Author

I am also having same problem. same error when tried to run app on terminal. @mohamedds-12 did you get solution or did you fixed it ? if yes kindly share

Nope no solution so far

@mohamedds-12 mohamedds-12 changed the title The windows built app shows nothing, (using nativphp/electron v0.6.3) The windows built app shows nothing, (using nativphp/electron v0.6.3 and higher) Sep 24, 2024
@kdrmlhcn
Copy link

kdrmlhcn commented Sep 26, 2024

Is there any solution? I have same problem on Windows. @mohamedds-12 @simonhamp

@kdrmlhcn
Copy link

I have the same problem as @mohamedds-12. The windows built app doesn't launch. Building on windows or mac doesn't change this behaviour. I am on v0.6.5.

Did you find any solution?

@mohamedds-12
Copy link
Author

Sadly still no luck

I have the same problem as @mohamedds-12. The windows built app doesn't launch. Building on windows or mac doesn't change this behaviour. I am on v0.6.5.

Did you find any solution?

Sadly still no luck

@discoverlance-com
Copy link

discoverlance-com commented Sep 29, 2024

I also have a similar problem and I debugged for a very long time, over the past 2 days thinking that I am doing something wrong because the same app when I build it for linux, it launches but when I build it for windows, it just shows up in the task manager as a task but no window shows up...

@simonhamp
Copy link
Member

Could someone please test a Windows build with the latest releases, nativephp/laravel v0.6.2 and nativephp/electron v0.8.5 and report back here?

@mohamedds-12
Copy link
Author

Could someone please test a Windows build with the latest releases, nativephp/laravel v0.6.2 and nativephp/electron v0.8.5 and report back here?

@simonhamp, Same thing, Error message when excuting using terminal :

(node:12092) UnhandledPromiseRejectionWarning: TypeError: Error processing argument at index 0, conversion failure from null
    at Object.setAppUserModelId (C:\Users\Mohammed\AppData\Local\Programs\wisdom\resources\app.asar\node_modules\@electron-toolkit\utils\dist\index.cjs:18:20)
    at NativePHP.setAppUserModelId (C:\Users\Mohammed\AppData\Local\Programs\wisdom\resources\app.asar\out\main\index.js:1726:23)
    at NativePHP.<anonymous> (C:\Users\Mohammed\AppData\Local\Programs\wisdom\resources\app.asar\out\main\index.js:1697:12)
    at Generator.next (<anonymous>)
    at fulfilled (C:\Users\Mohammed\AppData\Local\Programs\wisdom\resources\app.asar\out\main\index.js:1626:24)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
(Use `wisdom --trace-warnings ...` to show where the warning was created)
(node:12092) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

@marcanthonysurmont
Copy link

I have this exact same problem, still no updates on this?

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

No branches or pull requests

8 participants