-
-
Notifications
You must be signed in to change notification settings - Fork 232
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
Child process not working in packaged app #427
Comments
Hi @kentezrabetita, I managed to include a child process running Python or Rust code via a call from IPC. I'm about to push it tomorrow or Thursday in another branch, then do a PR to the examples folder of Nextron. You will be able to use the analogy in .ts, .js easily, but for Python, you need to have Python or Rust installed on the target machine to ruin your app. As I said, if you only use js/ts, no need, it is already packed in Nextron, you just. |
Hey @bm777, that's awesome news! I appreciate your work on this and thanks for the good heads up. Looking forward to your PR! |
@kentezrabetita Here is the example running Python code via IPC on top of the basic lang javascript example.
Screen.Recording.2023-12-07.at.01.39.08.mov |
you not passed channel when called child.send() |
@JesTery58 can you be more precise please? |
do child.send() function want a channel ? |
@JesTery58 basically when using IPC, I always pass the channel as str, in this case, the channel was : here |
Hello,
I am experiencing an issue related to the execution of a child process in the packaged version of my Nextron application. The child process works as expected in the development environment, but fails to execute when the application is packaged. I am currently testing on an M1 Mac.
The file structure in the main directory is as follows:
In my
ipc.ts
file, I fork a child process fromworker.ts
:In the
worker.ts
file, I handle the 'message' event from the main process:In development, the main process successfully sends the message and the child process performs as expected. However, in the packaged app, the child process doesn't seem to be executing.
Despite adding 'exit' and 'error' event handlers to the child process, no error messages or exit codes have been generated.
Upon examining the built version of the app in the
./app
directory, I noticed the absence of aworker.js
file or other files that i've added. However, references to the worker code exist inbackground.js
. This leads me to suspect that the issue might be related to the way I'm referencing the worker file inconst child = fork('./main/worker.ts')
;.Any guidance on this issue would be greatly appreciated, particularly on getting the child process to work correctly in the packaged app.
Thank you!
The text was updated successfully, but these errors were encountered: