denoland / deploy_feedback

For reporting issues with Deno Deploy
https://deno.com/deploy
74 stars 5 forks source link

[Bug]: deno_blog - 502 Gateway Error #724

Closed aryan02420 closed 1 month ago

aryan02420 commented 1 month ago

Problem description

projects using https://deno.land/x/blog@0.7.0/blog.tsx are returning 502 Gateway Error since October 4. Ryan's blog is affected too.

tinyclouds.org - 502 Gateway Error

There has been no deployment or configuration change from my end. Locally the project is running just fine.

deno deploy logs

Steps to reproduce

  1. This simple starter code
    $ deno run -r --allow-read --allow-write https://deno.land/x/blog/init.ts ./directory/for/blog/
  2. Host on Deno Deploy

Expected behavior

It should work on deno deploy too, just like it was working some days ago

Environment

My local environment which works fine

$ deno --version
deno 1.44.2 (release, x86_64-unknown-linux-gnu)
v8 12.6.228.9
typescript 5.4.5
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian

Possible solution

No response

Additional context

No response

aryan02420 commented 1 month ago

I upgraded my local deno installation to 1.46, and now my project is broken. So it is not an actual bug with deno deploy.

vscode ➜ /workspaces/blog (main) $ deno --version
deno 1.46.3 (stable, release, x86_64-unknown-linux-gnu)
v8 12.9.202.5-rusty
typescript 5.5.2
vscode ➜ /workspaces/blog (main) $ deno task dev
Task dev deno run --allow-net --allow-read --allow-env --watch main.tsx --dev
Watcher Process started.
⚠️  Import assertions are deprecated. Use `with` keyword, instead of 'assert' keyword.

import emojis from "./all.json" assert { type: "json" };

  at https://deno.land/x/emoji@0.3.0/emoji.ts:2:1

TypeError: Invalid URL: '/workspaces/blog/main.tsx'
    at getSerialization (ext:deno_url/00_url.js:98:11)
    at new URL (ext:deno_url/00_url.js:405:27)
    at fromFileUrl (https://deno.land/std@0.193.0/path/posix.ts:460:36)
    at configureBlog (https://deno.land/x/blog@0.7.0/blog.tsx:176:22)
    at blog (https://deno.land/x/blog@0.7.0/blog.tsx:110:27)
    at file:///workspaces/blog/main.tsx:6:1
error: Uncaught (in promise) Error: Cannot run blog from a remote URL.
    throw new Error("Cannot run blog from a remote URL.");
          ^
    at configureBlog (https://deno.land/x/blog@0.7.0/blog.tsx:180:11)
    at blog (https://deno.land/x/blog@0.7.0/blog.tsx:110:27)
    at file:///workspaces/blog/main.tsx:6:1
Watcher Process failed. Restarting on file change...
aryan02420 commented 1 month ago

Does deno deploy let you choose what version of deno to use per project? If not, I think this is an oversight, since deploy always seems to use the latest version, which might have breaking changes causing projects using an older version to just stop working without any notice.

aryan02420 commented 1 month ago

closing since this is not a direct bug in deno deploy

suggestion moved to #725

ry commented 1 month ago

Hi thanks for opening this. We've rolled back the change that introduced this bug.