question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fallthrough routes (2 routes with slugs on same level) Regression issue .137

See original GitHub issue

Describe the bug

I cannot make a route fallthough when in SSR, this works as expected when client is navigating

This also affects when I export with static-adapter as all these routes return 500

Reproduction

This issue only appears in SSR mode, I reproduce by going to the route in question and refreshing (F5)

I have 2 routes:

src/routes/[legal]/index.svelte src/routes/[page]/index.svelte

I manually check in my load function inside src/routes/[legal]/index.svelte if (!validRoute) return

But this never reaches the load function in src/routes/[page]/index.svelte I see a 500 Internal server error in my console and the page shows the following message:

Bad request in load function: “failed to fetch undefined”

Logs

No response

System Info

System:
    OS: macOS 11.5.1
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Memory: 4.60 GB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.5.0 - ~/.n/bin/node
    Yarn: 1.22.10 - ~/.n/bin/yarn
    npm: 7.19.1 - ~/.n/bin/npm
  Browsers:
    Brave Browser: 91.1.26.77
    Chrome: 92.0.4515.107
    Firefox: 89.0.2
    Safari: 14.1.2
    Safari Technology Preview: 15.0
  npmPackages:
    @sveltejs/adapter-static: ^1.0.0-next.7 => 1.0.0-next.13 
    @sveltejs/kit: ^1.0.0-next.109 => 1.0.0-next.138 
    svelte: ^3.40.1 => 3.41.0 
    vite: ^2.1.0 => 2.4.4

Severity

blocking an upgrade

Additional Information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
JulienPradetcommented, Jul 31, 2021

Hi @benmccann,

Here is a reproduction repo that contains two issues I’ve noticed: https://github.com/JulienPradet/sveltekit-2041

  • index.svelte + index.js conflict : previously, if an endpoint had no get method, it was using the index.svelte file as a fallback. http://localhost:3000/ displays no handler in the newer versions.
  • between [legal].svelte and [page].svelte, if the load function of the [legal].svelte didn’t return anything, it should fallback to the [page].svelte (so in the case of the repository, http://localhost:3000/valid should display “Legal” but http://localhost:3000/invalid should display “Page”

I couldn’t reproduce @UltraCakeBakery’s issue though but I guess it’s close to the endpoint issue.

0reactions
harvey-kcommented, Aug 3, 2021

@benmccann Not sure if this is helpful, but the more complicated test seems to have broken in the commit below: https://github.com/sveltejs/kit/commit/bce1d76aad9533c1fd6db99c05526c3566fecaee#diff-f8956b07fb67847bf592e4b63a47d10053d7bdd1b484a4897eb385aab567dd2d

The specific file linked is part of what you changed in https://github.com/sveltejs/kit/pull/2072

Your efforts are appreciated!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Development and Validation of an Instrument to Evaluate ...
2. ) Using Hierarchical Linear. Regression Analyses for Teachers' ... science teachers teaching at middle and high school levels in the State of...
Read more >
1 CAST BULLETS FOR BEGINNER AND EXPERT SECOND
Bullets with the same BC, fired at the same velocity, follow the same path from muzzle to target. So, for instance, if we...
Read more >
Hockey Guide | PDF - Scribd
FANTASYHOCKEY. COM – DRAFT GUIDE 2006-07. Table of Contents. 1-2 Table of Contents. 3-4 Ice Kings: Who Should You Build Your Team Around?...
Read more >
Full text of "Ceylon : an account of the island, physical ...
Full text of "Ceylon : an account of the island, physical, historical, and topographical with notices of its natural history, antiquities and productions"....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found