fresh icon indicating copy to clipboard operation
fresh copied to clipboard

Website infinitely reloads

Open yurtemre7 opened this issue 2 years ago • 9 comments

I was actively developing my new website with fresh and suddenly after some unrelated changes the production website stopped loading. I looked into the console of my server and saw this: Deno requests run access to "/root/.cache/esbuild/bin/[email protected]" Run again with --allow-run to bypass this prompt. Allow? [y/n (y = yes allow, n = no deny)]

After allowing 3 times the website started to glitch, reload forever, website wasnt useable anymore. What could be the issue? Just installed deno and fresh today, no extra dependencies besides tailwind.

My task, that I run is: deno run --allow-env --allow-read --allow-net main.ts

My code is also publically available here on github: yurtemre_deno.

Thanks and hopefully we will find a fix!

yurtemre7 avatar Jun 30 '22 22:06 yurtemre7

What is your Deno version?

bartlomieju avatar Jun 30 '22 22:06 bartlomieju

Newest version, v1.23.2.

yurtemre7 avatar Jun 30 '22 22:06 yurtemre7

I'll let @lucacasonato respond then, I've encountered similar problems but on older versions of Deno.

bartlomieju avatar Jun 30 '22 22:06 bartlomieju

@yurtemre7 To run fresh in production mode you need to set the DENO_DEPLOYMENT_ID environment variable. It needs to be set to a value that uniquely identifies the version of your source code (for example the current git hash).

lucacasonato avatar Jun 30 '22 23:06 lucacasonato

This still doesnt solve my issue. Can someone please look into my source code and tell me what may be wrong ? Sadly this cool new web framework doesnt have much documentation or tutorial itself :)

yurtemre7 avatar Jul 02 '22 22:07 yurtemre7

The website in question: https://www.yurtemre.de/

yurtemre7 avatar Jul 05 '22 20:07 yurtemre7

The website in question: https://www.yurtemre.de/

It opens and loads fine for me. Do you still have the issue?

synalice avatar Jul 05 '22 22:07 synalice

its really strange, its like, whenever I restart the server this reloading takes place but after a while it goes away. Might that be an external issue? Something like cloudflare?

yurtemre7 avatar Jul 06 '22 08:07 yurtemre7

Issue still occurs when I rebuild my website after some changes, please look into it. My repo is here: yurtemre_deno Only has reload issue after pushing to production ? idk how that works to be honest.

run via deno task run

yurtemre7 avatar Sep 06 '22 21:09 yurtemre7

I can not reproduce this issue.

lucacasonato avatar Jan 12 '23 20:01 lucacasonato