lit / lit.dev

The Lit website
https://lit.dev
BSD 3-Clause "New" or "Revised" License
119 stars 186 forks source link

[playground-elements] "Hello World" Playground page not rendered in Firefox #861

Open hernanmd opened 2 years ago

hernanmd commented 2 years ago

Description

The Playground page does not render the "Hello World" example using Firefox 100.0 (64-bit) in macOS Big Sur. Reproducible with all addons disabled. Does it work correctly in Safari Version 14.1.2 (16611.3.10.1.6). Other browsers not checked.

Steps to Reproduce

Open (https://lit.dev/playground/)[https://lit.dev/playground/]

  1. See this output...

Live Reproduction Link

https://lit-html.stackblitz.io/ stuck with "Starting dev server" and this code:

// Import lit-html functions
import { html, render } from 'lit-html';

// Define a template function
const myTemplate = name =>
  html`
    <h1>Hello ${name}!</h1>
  `;

// Render the template with some data
render(myTemplate('lit-html'), document.body);

Actual Results

Screen Shot 2022-05-04 at 23 29 53

Browsers Affected

veikkoeeva commented 2 years ago

The page https://lit.dev/playground/ renders for me correctly in Firefox 101.0b9 (64-bit, nightly) and 100.0.2 (64-bit).

At the moment the Stackblitz link does not open for me in Edge or Firefox or Chrome. Edge and and Chrome are just stuck failing to load resources. Firefox tells the following (but probably the underlying reason is the same).

kuva

Creating a new Stackblitz TS or some other project seem to work fine. Maybe this has something to do with current https://lit-html.stackblitz.io/ playground?

justinfagnani commented 2 years ago

I wasn't able to reproduce the playground issue on Firefox 101. Can you try again and check console logs? It's possible the service worker got stuck on an old version, though we've tried to detect that situation and reload the service worker.

hernanmd commented 2 years ago

Hi Justin. I checked with up to date FF 101.0.1 (64-bit). I didn't checked yet disabling all plugins but so far the problem still persists, this is the output of about:config with serviceworker parameters (none was modified)

![Screen Shot 2022-06-17 at 01 13 18](https://user-images.githubusercontent.com/4825959/174193160-50cd40da-f79d-4329-b9eb-2afcfd4cc9bb.png

about:serviceworkers output is "No Service Workers Registered"

Console output is empty.

Let me know if I could check something else.

muratcorlu commented 2 years ago

I'm not sure if this is same problem but Playground Result part is not working also in Safari 15.5 in MacOS Monterey 12.4

image

Apparently, it tries to open this URL: https://playground.lit.dev/__playground_swfs_f56081d9/spot0v/index.html But this URL returns 404 for me.

image
AndrewJakubowicz commented 2 years ago

@muratcorlu From your images, is it possible that your Grammarly extension is causing the issue? Could you try temporarily disabling it to verify?

Found a possibly related issue, as well as https://github.com/ianstormtaylor/slate/issues/733

muratcorlu commented 2 years ago

@AndrewJakubowicz Disabling all extensions, including Grammarly, didn't fix the issue. But then I tried "Develop -> Empty Caches" menu, and it started working again. After that, I enabled Grammarly again, and there was no issue.

I assume somehow playground service worker was not updated correctly.