Function crashes on SvelteKit static website when accessed via TikTok

We deployed a static website using the SvelteKit framework with SSG. The site works fine, but when accessed through TikTok on a mobile it trows a “This function has crashed” error.

It’s a bit weird because we haven’t deployed a function, only a website. Here are the error screenshot and details:

The transcript for the error is:

TypeError - Cannot convert argument to a ByteString because the character at index 191 has a value of 65533 which is greater than 255.

The Netlify internal id is:

01GZFNNP5RNSTY9XQ91HT42VQD

We rolled back to a previous version using Vue that doesn’t crash, but we need the new version up. Not sure if it’s something on netlify’s side or something we can fix ourselves.

From what I know of SvelteKit, it uses adapters such as @sveltejs/adapter-netlify which renders the site using SSR which utilises Netlify Functions.

Quite likely this is an issue with the adapter itself.

1 Like

Thanks for your answer @jasiqli! You’re right, I have deployed using that adapter and it seem to use SSR with a function. I guess I missed that detail since I’ve been deploying to other places and just assumed that it would be the same as other places.