Fork me on GitHub
#re-frame
<
2023-01-13
>
vanelsas08:01:23

I have a Re-frame/Reagent app that uses day8.re-frame.async-flow-fxfor its boot up process. Everything works just fine. We also use day8.re-frame/testto run async tests. All of our tests pass, but I keep getting errors that event handlers are not registered, specifically where we use async-flow. A typical test run log will show this

LOG: 'Boot the app'
LOG: 'log in'
LOG: 'Login successful'
ERROR: 're-frame: no', ':event', 'handler registered for:', {ns: 'async-flow', name: 'id-2', fqn: 'async-flow/id-2', _hash: -761402593, cljs$lang$protocol_mask$partition0$: 2153775105, cljs$lang$protocol_mask$partition1$: 4096}
ERROR: 're-frame: no', ':event', 'handler registered for:', {ns: 'async-flow', name: 'id-6', fqn: 'async-flow/id-6', _hash: -1221756229, cljs$lang$protocol_mask$partition0$: 2153775105, cljs$lang$protocol_mask$partition1$: 4096}
ERROR: 're-frame: no', ':event', 'handler registered for:', {ns: 'async-flow', name: 'id-9', fqn: 'async-flow/id-9', _hash: 634490606, cljs$lang$protocol_mask$partition0$: 2153775105, cljs$lang$protocol_mask$partition1$: 4096}
ERROR: 're-frame: no', ':event', 'handler registered for:', {ns: 'async-flow', name: 'id-13', fqn: 'async-flow/id-13', _hash: -1754678906, cljs$lang$protocol_mask$partition0$: 2153775105, cljs$lang$protocol_mask$partition1$: 4096}
ERROR: 're-frame: no', ':event', 'handler registered for:', {ns: 'async-flow', name: 'id-15', fqn: 'async-flow/id-15', _hash: -228372484, cljs$lang$protocol_mask$partition0$: 2153775105, cljs$lang$protocol_mask$partition1$: 4096}
ERROR: 're-frame: no', ':event', 'handler registered for:', {ns: 'async-flow', name: 'id-19', fqn: 'async-flow/id-19', _hash: 497826807, cljs$lang$protocol_mask$partition0$: 2153775105, cljs$lang$protocol_mask$partition1$: 4096}
LOG: 'logout-no-data-retrieval: logout successful'
I realise it is difficult to debug if you don't have the code, but the particular snippet that we have for async-flow is pretty small, we define a few rules for startup and that's it. The events that it uses are all added as includes to the test files. What's odd is that the tests are all succeeding, which suggests that the code runs correctly, even with these errors. We do not see these errors when the app is running. Does anyone have a setup in which they use these libraries too? Have you seen this behaviour too? How could I go about trying to debug and fix this?

p-himik09:01:53

Do you ever touch event IDs like :async-clow/id-2 yourself?

p-himik09:01:31

> How could I go about trying to debug and fix this? Breakpoints right where that warning is issued.

p-himik09:01:19

Or maybe you have done something to re-frame.core/reg-event-fx for the tests.

vanelsas09:01:29

Yeah, I guess it is the only way. It seems a trivial problem, but so far I haven't found what really causes it. It is also confusing that the tests pass, and they shouldn't pass if the boot process failed

p-himik09:01:18

If you can't figure it out, create an MRE and I'll take a look. Am curious myself as to how this could be happening.

vanelsas09:01:43

I will, thanks so far for your comments 🙂

👍 2
vanelsas09:01:16
replied to a thread:I have a Re-frame/Reagent app that uses `day8.re-frame.async-flow-fx`for its boot up process. Everything works just fine. We also use `day8.re-frame/test`to run async tests. All of our tests pass, but I keep getting errors that event handlers are not registered, specifically where we use async-flow. A typical test run log will show this LOG: 'Boot the app' LOG: 'log in' LOG: 'Login successful' ERROR: 're-frame: no', ':event', 'handler registered for:', {ns: 'async-flow', name: 'id-2', fqn: 'async-flow/id-2', _hash: -761402593, cljs$lang$protocol_mask$partition0$: 2153775105, cljs$lang$protocol_mask$partition1$: 4096} ERROR: 're-frame: no', ':event', 'handler registered for:', {ns: 'async-flow', name: 'id-6', fqn: 'async-flow/id-6', _hash: -1221756229, cljs$lang$protocol_mask$partition0$: 2153775105, cljs$lang$protocol_mask$partition1$: 4096} ERROR: 're-frame: no', ':event', 'handler registered for:', {ns: 'async-flow', name: 'id-9', fqn: 'async-flow/id-9', _hash: 634490606, cljs$lang$protocol_mask$partition0$: 2153775105, cljs$lang$protocol_mask$partition1$: 4096} ERROR: 're-frame: no', ':event', 'handler registered for:', {ns: 'async-flow', name: 'id-13', fqn: 'async-flow/id-13', _hash: -1754678906, cljs$lang$protocol_mask$partition0$: 2153775105, cljs$lang$protocol_mask$partition1$: 4096} ERROR: 're-frame: no', ':event', 'handler registered for:', {ns: 'async-flow', name: 'id-15', fqn: 'async-flow/id-15', _hash: -228372484, cljs$lang$protocol_mask$partition0$: 2153775105, cljs$lang$protocol_mask$partition1$: 4096} ERROR: 're-frame: no', ':event', 'handler registered for:', {ns: 'async-flow', name: 'id-19', fqn: 'async-flow/id-19', _hash: 497826807, cljs$lang$protocol_mask$partition0$: 2153775105, cljs$lang$protocol_mask$partition1$: 4096} LOG: 'logout-no-data-retrieval: logout successful' I realise it is difficult to debug if you don't have the code, but the particular snippet that we have for async-flow is pretty small, we define a few rules for startup and that's it. The events that it uses are all added as includes to the test files. What's odd is that the tests are all succeeding, which suggests that the code runs correctly, even with these errors. We do not see these errors when the app is running. Does anyone have a setup in which they use these libraries too? Have you seen this behaviour too? How could I go about trying to debug and fix this?

Nope, never