sveltejs / kit

web development, streamlined
https://kit.svelte.dev
MIT License
18.44k stars 1.89k forks source link

App throws 500 internal error (happens after v1.15.x) #9792

Closed Devr-pro closed 1 year ago

Devr-pro commented 1 year ago

Describe the bug

My app successfully deploys (on netlify) without any errors logging, on visiting the site it shows 500 internal error, Can't figure out the root cause but its roughly happening with me after v1.15.x

Reproduction

Github repo Website

Logs

No response

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (16) x64 AMD EPYC 7B13
    Memory: 47.95 GB / 62.80 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.15.0/bin/yarn
    npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm
  npmPackages:
    @sveltejs/adapter-auto: ^2.0.1 => 2.0.1 
    @sveltejs/adapter-netlify: ^2.0.7 => 2.0.7 
    @sveltejs/kit: ^1.15.9 => 1.15.9 
    svelte: ^3.58.0 => 3.58.0 
    vite: ^4.3.3 => 4.3.3

Severity

blocking an upgrade

Additional Information

Well, I have apps with older versions (<1.15) it works just fine .

gtm-nayan commented 1 year ago

Provide a proper reproduction for the issue as instructed by the issue template otherwise:

A link to a repository, or a fork of https://node.new/sveltekit, that reproduces the issue. Reproductions must be short, self-contained and correct and must not contain files or code that aren't relevant to the issue — please do NOT just paste a link to your project. Explaining how to reproduce is generally not enough. It pushes the burden of creating a reproduction project onto a small set of volunteer maintainers and isn't scalable. If no reproduction is provided, the issue will be closed.

Devr-pro commented 1 year ago

Provide a proper reproduction for the issue as instructed by the issue template otherwise:

A link to a repository, or a fork of https://node.new/sveltekit, that reproduces the issue. Reproductions must be short, self-contained and correct and must not contain files or code that aren't relevant to the issue — please do NOT just paste a link to your project. Explaining how to reproduce is generally not enough. It pushes the burden of creating a reproduction project onto a small set of volunteer maintainers and isn't scalable. If no reproduction is provided, the issue will be closed.

Well my app works perfect during dev, problem only arises after deployment So reproducing it might not have any effect, I thing its just the code? or still I need to reproduce?

dummdidumm commented 1 year ago

Yes we still need a minimum reproducible, one with clear instructions in that case since it's only reproducible when deployed.

Try ripping out code from your app (for example removing entire pages) until you can't reproduce the error anymore, that way you get a minimum reproducible (and maybe also more info about a possible cause).

Devr-pro commented 1 year ago

Ok, I'll try doing that 👍 (might take little time as there is some boiler-plate and server code)

Devr-pro commented 1 year ago

Well, it seems a supabase helper function

const {
        data: { session }
    } = await supabase.auth.getSession();

caused this issue Works fine after removing it Thanks!

engageintellect commented 1 year ago

I have this same issue, only with Vercel and Pocketbase. It's over at #9967

Maybe someone here can take a look at it and provide some expertise? I would really like to get it to start working. Works perfectly in dev, so I'm assuming I'm missing some deploy config magic?

TIA