Skip to content

(node:7289) UnhandledPromiseRejectionWarning: TypeError: Cannot read properties of undefined (reading 'setIcon') #41

@git-e-001

Description

@git-e-001

What happened?

When i run php artisan native:install
it's show this

Publishing NativePHP Service Provider...

 Would you like to install the NativePHP NPM dependencies? (yes/no) [yes]:
 > 


> [email protected] postinstall
> electron-builder install-app-deps

  • electron-builder  version=24.5.1
  • loaded configuration  file=/home/hiya/personal/desk-app/vendor/nativephp/electron/resources/js/electron-builder.js
  • executing @electron/rebuild  arch=x64 platform=linux version=25.2.0 appDir=/home/hiya/personal/desk-app/vendor/nativephp/electron/resources/js

added 80 packages, removed 26 packages, changed 16 packages, and audited 649 packages in 2m

98 packages are looking for funding
  run `npm fund` for details

4 moderate severity vulnerabilities

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

 Would you like to start the NativePHP development server (yes/no) [no]:
 > 

NativePHP scaffolding installed successfully.

After run this php artisan native:serve

Starting NativePHP dev server…
Fetching latest dependencies…
Starting NativePHP app…
yarn run v1.22.19
warning package.json: No license field
$ electron-vite dev --watch
vite v4.3.9 building for development...

watching for file changes...

build started...
✓ 4 modules transformed.
out/main/index.js  0.54 kB
built in 109ms.

build the electron main process successfully

-----

vite v4.3.9 building for development...

watching for file changes...

build started...
transforming (1) src/preload/index.js"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 17ms.

build the electron preload files successfully

-----

dev server running for the electron renderer process at:

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose

start electron app...

(node:6405) UnhandledPromiseRejectionWarning: TypeError: Cannot read properties of undefined (reading 'setIcon')
    at NativePHP.<anonymous> (/home/hiya/personal/desk-app/vendor/nativephp/electron/resources/js/node_modules/nativephp-electron/dist/index.js:81:26)
    at Generator.next (<anonymous>)
    at /home/hiya/personal/desk-app/vendor/nativephp/electron/resources/js/node_modules/nativephp-electron/dist/index.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/home/hiya/personal/desk-app/vendor/nativephp/electron/resources/js/node_modules/nativephp-electron/dist/index.js:4:12)
    at /home/hiya/personal/desk-app/vendor/nativephp/electron/resources/js/node_modules/nativephp-electron/dist/index.js:78:36
(Use `electron --trace-warnings ...` to show where the warning was created)

(node:6405) 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: 2)

MESA-INTEL: warning: Haswell Vulkan support is incomplete

libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed

How to reproduce the bug

(node:7289) UnhandledPromiseRejectionWarning: TypeError: Cannot read properties of undefined (reading 'setIcon')
    at NativePHP.<anonymous> (/home/hiya/personal/desk-app/vendor/nativephp/electron/resources/js/node_modules/nativephp-electron/dist/index.js:81:26)
    at Generator.next (<anonymous>)
    at /home/hiya/personal/desk-app/vendor/nativephp/electron/resources/js/node_modules/nativephp-electron/dist/index.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/home/hiya/personal/desk-app/vendor/nativephp/electron/resources/js/node_modules/nativephp-electron/dist/index.js:4:12)
    at /home/hiya/personal/desk-app/vendor/nativephp/electron/resources/js/node_modules/nativephp-electron/dist/index.js:78:36
(Use `electron --trace-warnings ...` to show where the warning was created)

(node:7289) 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: 2)

MESA-INTEL: warning: Haswell Vulkan support is incomplete

libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed

Package Version

"nativephp/electron": "^0.1.0", "nativephp/laravel": "^0.1.0"

PHP Version

PHP 8.1.21 (cli) (built: Jul 8 2023 07:09:57) (NTS)

Laravel Version

"laravel/framework": "^10.10",

Which operating systems does with happen with?

Linux

Notes

Node: v16.18.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglinux

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions