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

TypeError: Cannot read property 'send' of undefined #47

Open
ciricc opened this issue Aug 22, 2020 · 2 comments
Open

TypeError: Cannot read property 'send' of undefined #47

ciricc opened this issue Aug 22, 2020 · 2 comments
Assignees
Labels

Comments

@ciricc
Copy link

ciricc commented Aug 22, 2020

When i use forked actors, i got this error (and don't know why and where)

Error occurring at /var/www/scripts/node_modules/comedy/lib/forked-actor.js:476:18

Full error:

TypeError: Cannot read property 'send' of undefined at /var/www/scripts/node_modules/comedy/lib/forked-actor.js:476:18 at Promise._execute (/var/www/scripts/node_modules/comedy/node_modules/bluebird/js/release/debuggability.js:299:9) at Promise._resolveFromExecutor (/var/www/scripts/node_modules/comedy/node_modules/bluebird/js/release/promise.js:481:18) at new Promise (/var/www/scripts/node_modules/comedy/node_modules/bluebird/js/release/promise.js:77:14) at ForkedActorParent._send0 (/var/www/scripts/node_modules/comedy/lib/forked-actor.js:421:12) at ForkedActorParent.transmitBusMessage (/var/www/scripts/node_modules/comedy/lib/forked-actor.js:108:10) at /var/www/scripts/node_modules/comedy/lib/system-bus.js:82:19 at Set.forEach (<anonymous>) at SystemBus._broadcastToForkedRecipients (/var/www/scripts/node_modules/comedy/lib/system-bus.js:80:21) at SystemBus.emitFromActor (/var/www/scripts/node_modules/comedy/lib/system-bus.js:44:10) at ChildProcess.<anonymous> (/var/www/scripts/node_modules/comedy/lib/forked-actor.js:274:25) at ChildProcess.emit (events.js:314:20) at emit (internal/child_process.js:906:12) at processTicksAndRejections (internal/process/task_queues.js:81:21)

My architicture:
Forked actor running children forked actors (4), and each child running own one threaded and one forked actors. I am using bus for messaging between them.

My solution:
If i change this chain Forked -> Forked -> Forked to this Forked -> Forked -> Threaded it will be ok.
But i need only Forked -> Forked -> Forked

@weekens
Copy link
Contributor

weekens commented Aug 24, 2020

Hi @ciricc ! I will have a look at it in near time. Is it happening on attempt to send a message through bus?

@ciricc
Copy link
Author

ciricc commented Aug 31, 2020

Yes It happens only when i use it with many child threaded actors in one. (sendAndReceive)

@weekens weekens added the bug label Dec 7, 2020
@weekens weekens self-assigned this Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants