S
SolidJS•2mo ago
snorbi

Navigation error

I get a weird cleanNode() exception when navigating to another page. The stack trace is useless (see in separate comment). The navigation is performed by a <button>, it is trivial, nothing extra happens there: <button onClick={() => navigate(...)} ... Do you have any recommendation how to find the root of the error? Thanks.
3 Replies
snorbi
snorbiOP•2mo ago
Stack trace:
dev.js:1074 Uncaught (in promise) TypeError: Cannot read properties of null (reading '1')
at cleanNode (dev.js:1074:65)
at cleanNode (dev.js:1074:50)
at cleanNode (dev.js:1074:50)
at cleanNode (dev.js:1074:50)
at cleanNode (dev.js:1074:50)
at cleanNode (dev.js:1074:50)
at cleanNode (dev.js:1074:50)
at cleanNode (dev.js:1074:50)
at cleanNode (dev.js:1074:50)
at cleanNode (dev.js:1074:50)
cleanNode @ dev.js:1074
cleanNode @ dev.js:1074
cleanNode @ dev.js:1074
cleanNode @ dev.js:1074
cleanNode @ dev.js:1074
cleanNode @ dev.js:1074
cleanNode @ dev.js:1074
cleanNode @ dev.js:1074
cleanNode @ dev.js:1074
cleanNode @ dev.js:1074
updateComputation @ dev.js:786
runTop @ dev.js:905
runQueue @ dev.js:979
completeUpdates @ dev.js:934
runUpdates @ dev.js:923
(anonymous) @ dev.js:622
Promise.then
startTransition @ dev.js:604
transition @ routing.js:365
(anonymous) @ routing.js:472
untrack @ dev.js:519
navigateFromRoute @ routing.js:434
(anonymous) @ routing.js:483
ActionBarToolbar2._el$283.$$click @ index.tsx:636
handleNode @ dev.js:890
eventHandler @ dev.js:915
dev.js:1074 Uncaught (in promise) TypeError: Cannot read properties of null (reading '1')
at cleanNode (dev.js:1074:65)
at cleanNode (dev.js:1074:50)
at cleanNode (dev.js:1074:50)
at cleanNode (dev.js:1074:50)
at cleanNode (dev.js:1074:50)
at cleanNode (dev.js:1074:50)
at cleanNode (dev.js:1074:50)
at cleanNode (dev.js:1074:50)
at cleanNode (dev.js:1074:50)
at cleanNode (dev.js:1074:50)
cleanNode @ dev.js:1074
cleanNode @ dev.js:1074
cleanNode @ dev.js:1074
cleanNode @ dev.js:1074
cleanNode @ dev.js:1074
cleanNode @ dev.js:1074
cleanNode @ dev.js:1074
cleanNode @ dev.js:1074
cleanNode @ dev.js:1074
cleanNode @ dev.js:1074
updateComputation @ dev.js:786
runTop @ dev.js:905
runQueue @ dev.js:979
completeUpdates @ dev.js:934
runUpdates @ dev.js:923
(anonymous) @ dev.js:622
Promise.then
startTransition @ dev.js:604
transition @ routing.js:365
(anonymous) @ routing.js:472
untrack @ dev.js:519
navigateFromRoute @ routing.js:434
(anonymous) @ routing.js:483
ActionBarToolbar2._el$283.$$click @ index.tsx:636
handleNode @ dev.js:890
eventHandler @ dev.js:915
It is caused by a solidjs/meta <Title> component but I still don't understand how and why 🤔 If I replace <Title>{title()}</Title> with
createEffect(() => {
document.title = title()
})
createEffect(() => {
document.title = title()
})
then the error is gone 😮
Madaxen86
Madaxen86•2mo ago
Is title async? Then wrapping title in Suspense might help
snorbi
snorbiOP•2mo ago
It is not async, it is a normal function.

Did you find this page helpful?