eibens / edcb

A build tool and task runner for Deno.
MIT License
0 stars 0 forks source link

Server sometimes throws "Http: connection closed before message completed" #31

Open eibens opened 2 years ago

eibens commented 2 years ago

Error:

error: Uncaught (in promise) Http: connection closed before message completed
    at deno:core/01_core.js:106:46
    at unwrapOpResult (deno:core/01_core.js:126:13)
    at async Object.respondWith (deno:ext/http/01_http.js:202:27)

Here is some discussion: https://github.com/denoland/deno/issues/11595

eibens commented 2 years ago

The aforementioned discussion mentions that one must correctly await promises. Testing with using await event.respondWith seems promising.

eibens commented 2 years ago

Still occurs. At lesat now with a better stacktrace. It often seems to happen when the server is freshly started and the tab opened from the link in edcb's output.

error: Uncaught (in promise) Http: connection closed before message completed
          await event.respondWith(response);
          ^
    at async Object.respondWith (deno:ext/http/01_http.js:202:27)
    at async https://deno.land/x/edcb@v1.0.0-alpha.2/utils/actions/listen.ts:29:11