Closed eneroth closed 2 years ago
@eneroth I am having trouble reproducing this issue with the data I pass to devtools.
I suspect this is as a result of an issue in the json-ml
returned by devtools
and not in re-frame-10x
rendering of the json-ml. I however can not get devtools
to return a table
as the json-ml data.
Could you please share the original data that was passed to devtools and specifically around where devtools returned the table or the structure of the data in the form {:key [int {:another-key #{int char}}]
.
This will be very helpful in reproducing the issue.
@eneroth I am having trouble reproducing this issue with the data I pass to devtools. I suspect this is as a result of an issue in the
json-ml
returned bydevtools
and not inre-frame-10x
rendering of the json-ml. I however can not getdevtools
to return atable
as the json-ml data. Could you please share the original data that was passed to devtools and specifically around where devtools returned the table or the structure of the data in the form{:key [int {:another-key #{int char}}]
. This will be very helpful in reproducing the issue.
I'd be happy to! Could you point me in the correct direction to extract this data? After fiddling around with breakpoints for an hour or so, I got pretty much nowhere.
My next shot was to log all calls to jsonml->hiccup
, for which I tried to translate the project.clj
to deps.edn
in order to add it as a :local/root
in our project, but I'm getting stuck at day8.re-frame-10x.inlined-deps.reagent.v1v0v0.reagent.core
being a dependency that it can't find.
Thank you. If you can see the jsonml->hiccup function, find the first function to call jsonml->hiccup
which should be simple-render-with-path-annotations if you are watching the app-db
panel.
The first argument to simple-render-with-path-annotations
(alias data
) would be very helpful.
EDIT:
If you have not installed re-frame-10x locally, you can get this data as db
and log it in any subscription that you add as follows.
(reframe.core/reg-sub
::example
(fn [db _]
db))
or in an event:
(reframe.core/reg-event-db
::example
[]
(fn [db _]
(println db)
db))
I'm also hitting this error. If there's anything I can do to help fix it, please let me know.
@paulbutcher can you please share the data you used to get this error? I am having issues reproducing this issue with the data I pass to devtools. I have commented on how to get the target data here https://github.com/day8/re-frame-10x/issues/331#issuecomment-970124485 . Thanks.
This is an app-db
which reproduces the problem:
{:layout :Driver, :loading true, :current-route #reitit.core.Match{:template "/", :data {:coercion #object[reitit.coercion.spec.t_reitit$coercion$spec22365], :name :root, :view #object[race_and_improve$views$splash$splash]}, :result nil, :path-params {}, :path "/", :query-params {}, :parameters {:path {}, :query {}}, :controllers []}}
Shout if there's anything else that would help.
This will be very helpful. I will proceed with reproducing the issue again. Thank you.
I can probably create a cut-down version of my app which reproduces it if you can't get there with just the app-db
. Let me know if you would like me to do this.
@paulbutcher just confirming if this is the data that is sent to devtools. I have managed to run the code, though without the sections in #
like #reitit.core.Match
, #object[reitit.coercion.spec.t_reitit$coercion$spec22365]
and #object[race_and_improve$views$splash$splash]
i.e
{:layout :Driver, :loading true, :current-route {:template "/", :data {:name :root}, :result nil, :path-params {}, :path "/", :query-params {}, :parameters {:path {}, :query {}}, :controllers []}}
Are these excluded sections supposed to evaluate to other objects like sequences, maps, numbers or strings?
They're related to the https://github.com/metosin/reitit routing library.
I guess the easiest thing would be for me to create a cut-down version of my app for you to play with. I'll try to get something together 👍
Okay, sounds great. Thanks.
Here you go, this seems to do the trick:
https://github.com/paulbutcher/rf10x-bug
This is a project built from the re-frame template with enough of the project I'm working on added to reproduce. Shout if you have any problems.
Okay, I am reproducing this now.
I can now reproduce this issue as well. That should be helpful. Thank you.
Welcome 👍. Let me know if there's anything I can do to help.
I shall edit this issue soon because after investigating further, it seems that the error that causes the website to crash is about an issue on the 10x
rendering and not because of tr
not being a child of tbody
. Infact, <tr> cannot appear as a child of <table>
is also printed in re-frame version 1.1.13.
The error <tr> cannot appear as a child of <table>
is thrown because the object we get from devtools has the following structure;
Note that the
table
does not have a tbody
.
The exact error that causes this must be in the rendering of jsonml that devtools sends back and specifically within reitit
tables.
Thanks @MawiraIke 👍
Does this imply that it's a bug in Clojure DevTools? In which case I guess we should raise a ticket there?
Thanks for your perseverance with this!
@paulbutcher I'm not sure yet. I'm yet to find where in the code the functionality breaks.
Seems like this issue was due to relying on devtools path to be unique while it seems like its not so correct within reitit objects like Coercion
- #object[reitit.coercion.spec.t_reitit$coercion$spec22365]
I am attaching a PR that fixes this issue below.
What happened?
As of 1.2.0, I'm getting this error when trying to inspect the DB:
10x disappears/fails to render when this happens.
All cache has been cleared.
10x Version
1.2.0
Reagent Version
1.1.0
React Version
17.0.2
re-frame Version
1.2.0
What browsers are you seeing the problem on?
Firefox, Chrome
Relevant console output