solidjs / solid-router

A universal router for Solid inspired by Ember and React Router
MIT License
1.1k stars 137 forks source link

Router fails to work properly on navigation #451

Open LynithDev opened 3 weeks ago

LynithDev commented 3 weeks ago

Describe the bug

On some of the environments my app is being run on, the entire routing system fails to work, throwing an error in console:

Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'match().path')

Seems to be coming from routing.ts

Thanks in advance

Your Example Website or App

.

Steps to Reproduce the Bug or Issue

  1. Attempt to navigate to a different route
  2. Error gets thrown

Expected behavior

Expected to navigate to a different route, however got an error and the entire router stopped working.

Screenshots or Videos

No response

Platform

Additional context

No response

ryansolid commented 3 weeks ago

Yeah seems odd to happen intermittently or platform specific. It should be retrieving matches that exist. I haven't seen this before but a reproduction could probably help narrow this down quickly.

LynithDev commented 3 weeks ago

That's the problem, I can't really reproduce it on my end either and a co-worker with a very similar setup (macOS + Safari/webkit as well) can't either.

MarkLeMerise commented 2 days ago

I think I was able to create a reproducible example. I do apologize as it's not perfectly minimal as it was adapted from a real-world usage that I've been troubleshooting for a few days, but I think it illustrates the problem well, which seems to stem from nested routes in combination with signals/computations run in the <Router> root component.

issue-451-solidjs-router