Git Product home page Git Product logo

Comments (12)

lilnasy avatar lilnasy commented on June 10, 2024 2

Thanks, I see it with "Slow 3G".

from astro.

hrmcdonald avatar hrmcdonald commented on June 10, 2024 1

You can probably up the number of times it loops to trigger it on faster connections too. It's some combination of:

  • amount of content on the page to be hydrated
  • amount of JS being loaded
  • connection speed

that all account into whatever race condition is happening here.

from astro.

lilnasy avatar lilnasy commented on June 10, 2024

Could share a project instead of the compiled result of a project?

from astro.

github-actions avatar github-actions commented on June 10, 2024

Hello @hrmcdonald. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs repro will be closed if they have no activity within 3 days.

from astro.

hrmcdonald avatar hrmcdonald commented on June 10, 2024

Alright @lilnasy, I've updated the reproduction repo to include src code. Our version of our internal package is included locally temporarily as we cannot publish it to a public repo. Because of this, NPM handles the deps funky, so you need to use PNPM to install. If you do though you can actually see this issue present here even in dev mode.

from astro.

lilnasy avatar lilnasy commented on June 10, 2024

Is the involvement of those internal packages necessary for the bug to appear?

from astro.

hrmcdonald avatar hrmcdonald commented on June 10, 2024

No, this will occur with any SSR'd Lit web component. Even ones declared within the Astro project. Because it only seems to occur after a certain amount of JS is being loaded I bundled our components to make recreation easier (and because I'm not positive what portions of more public Lit libraries like Shoelace are SSR compatible yet).

I have updated the recreation project with a local web component that also highlights why this issue matters and shows you live on the DOM where the components stop hydrating from their DSD properly as the page is loading.

image

from astro.

lilnasy avatar lilnasy commented on June 10, 2024

Do you see the error in dev, or only in production?

I cant reproduce the error in either.

from astro.

hrmcdonald avatar hrmcdonald commented on June 10, 2024

Sorry about that, I updated the included build to just bundle in those other internal deps instead of trying to configure NPM to scope the registries properly. If you clear your node_modules and try again it should install fine now.

The issue only happens when some level of network latency is introduced, so please make sure you've enabled simulated "Fast 3G" throttling to hit it reliably locally. In our real deployments it happens on much faster connections, but this extreme triggers it very consistently in our testing of the recreation at least.

from astro.

lilnasy avatar lilnasy commented on June 10, 2024

I was able to install after updating the package.json to refer to mortar/style and one other library by file:, and I was able to run dev and build. I did not see an error in the browser console. All the components rendered "true".

from astro.

hrmcdonald avatar hrmcdonald commented on June 10, 2024

Even with network throttling enabled in the dev console? It will almost never hit the issue locally in dev mode without throttling.

Sorry, to answer your earlier question, we do see it in production on a lot of pages. We don't typically see it in dev, but extreme cases can be triggered locally in dev mode if you enable network throttling to simulate a slower connection so the timing hits whatever is causing this.

from astro.

hrmcdonald avatar hrmcdonald commented on June 10, 2024

Is there any chance someone could point me in a direction to start looking into this one? This is still affecting nearly all of our pages in production. I likely won't be able to identify a fix alone, but would like to take a stab and hunting for some more insights and potential issues.

from astro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.