LivelyKernel / lively4-core

A Self-supporting, Web-based Development Environment
https://lively-kernel.org/lively4/lively4-core/start.html
MIT License
77 stars 25 forks source link

PUT Request to http://lively4/* fails when service worker is not started #33

Closed JensLincke closed 8 years ago

JensLincke commented 8 years ago

DOMException: Failed to execute 'respondWith' on 'FetchEvent': The fetch event has already been responded to. at Error (native) at ServiceWorker.fetch (https://lively-kernel.org/lively4-jens/src/swx/swx.jsx!transpiled:110:31) at Module.fetch (https://lively-kernel.org/lively4-jens/src/swx/swx.jsx!transpiled:38:27) at https://lively-kernel.org/lively4-jens/swx-loader.js:59:19

Since the first request will start it, a second request will succeed.

JensLincke commented 8 years ago

@jgraichen, any ideas why the request was already answered?

jgraichen commented 8 years ago

@JensLincke Same as for #32. PUT is also idempotent.

jgraichen commented 8 years ago

I have not yet found a way to force the browser to wait for the service worker and really do pass every request to it. It's still trying to optimized things.

JensLincke commented 8 years ago

Could I figure out in the answer, if the browser did answer me prematurely and do myself wait for the service worker? So distinguishing it from actual fails handed me down from the service worker?

jgraichen commented 8 years ago

The request should raise an error as the domain name usually cannot be resolved.