Closed TheDojoSamurai closed 1 year ago
That's super weird... in particular, the error, because at that stage, no group names exist... it's actually building them (group names exist as the regex that's returned from that regex).
Btw, it probably won't fix your issue, but you can certainly try itty-router@next
(the upcoming full TS rewrite) and see what you get...
@kwhitley Thanks for the quick response.
In my context itty-router
is a dependent of https://github.com/graphprotocol/graph-client, so not sure how to force it to use itty-router@next
(Crosspost here: https://github.com/graphprotocol/graph-client/issues/326)
Also oddly enough it only happens on mobile browsers, desktop all works as expected.
I’ll set up a couple experiments tomorrow with the main branch and next on mobile. Quick question… how are you even seeing errors on mobile in the first place?
Great.
Catching errors on mobile was new to me also, this helped: https://www.lifewire.com/activate-the-debug-console-in-safari-445798
Then used ngrok to access my site. local IP was blocked and didn't want to open up my firewall.
@kwhitley Any progress on this? thanks
Facing this issue as well.
I’ll set up a couple experiments tomorrow with the main branch and next on mobile. Quick question… how are you even seeing errors on mobile in the first place?
In our case this only happens on iOS Safari, Installing Playwright and running npx playwright wk http://localhost:3001
should allow you to see something like this:
I temporarily fixed the issue by manually editing yarn.lock
by pinning to an older version of itty-router
(2.6.1)
"@graphql-mesh/http@0.2.6":
version "0.2.12"
resolved "https://registry.yarnpkg.com/@graphql-mesh/http/-/http-0.2.12.tgz#b029d8a39a3594f710526e9974da3fc281b54e98"
integrity sha512-tR7semZ6S0SCJSualsjP/4AESdXPPaZM7ZnWoU39ls2vMePIKKZSv8YwG7nM667k5lnPpMAC0ohPnfunS/j4+g==
dependencies:
"@graphql-mesh/cross-helpers" "0.2.9"
"@graphql-mesh/runtime" "0.44.31"
"@graphql-mesh/types" "0.85.7"
"@graphql-mesh/utils" "0.42.6"
"@whatwg-node/fetch" "^0.5.0"
"@whatwg-node/server" "^0.4.10"
graphql-yoga "3.0.0-next.10"
itty-router "2.6.1" // instead of 2.6.6
itty-router-extras "0.4.2"
tslib "^2.4.0"
I temporarily fixed the issue by manually editing
yarn.lock
by pinning to an older version ofitty-router
(2.6.1)
This is helpful, thanks!
Actually I have a question here... is there any way you can find the matching route path (most important) and request URL that was fed to this when it failed? Curious if the generated group name has anything to do with this...
Aside from unlikely build differences between 2.6.1 and the latest on main
is this line:
v2.6.1
v2.6.6
To see how/why the generated group name (occurs after this step), it would really help to know what's being fed to it! :)
No one saw that...
To introspect, find out wherever the router is being implemented, and after the routes are registered, if you log the router.routes
, you should see an array of routes, each with 3 items: the 2nd being the generated regex for the route (what I need)
Marking this as closed for now, because itty-router@next is releasing with some changes to the Regex that may fix this issue.
If it doesn't, please reopen and let's investigate further!
I am getting this error, but only when running my ReactJS app in a mobile browsers.
Any idea on how to solve this?