Simulating client offline is tricky during development
thezjy opened this issue · comments
thezjy commented
- Using Chrome Devtools' "offline" does not work, because it doesn't work on WebSocket and now everything runs through WebSocket
- Accessing localhost from another device one the network does not work, because SubtleCrypto thinks it's insecure and will return
undefined
for all its fields.
For now the only way I can think of is to turn off and then turn on the Miniflare dev server. But it's not the same situation as some client going offline.
Is there a better way?
Aaron Boodman commented
Killing the dev server would have been my suggestion. I realize it's not
exactly the same but pretty close.
…On Thu, May 26, 2022 at 6:16 PM thezjy ***@***.***> wrote:
- Using Chrome Devtools' "offline" does not work, because it doesn't
work on WebSocket and now everything runs through WebSocket
- Accessing localhost from another device one the network does not
work, because SubtleCrypto thinks it's insecure and will return
undefined for all its fields.
For now the only way I can think of is to turn off and then turn on the
Miniflare dev server. But it's not the same situation as some client going
offline.
Is there a better way?
—
Reply to this email directly, view it on GitHub
<#49>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAATUBFA2FXJLC5OGG7QBPDVMBECHANCNFSM5XDBXCBQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>