#Deploying changes to SolidStart app then navigating the application throws strange error

81 messages · Page 1 of 1 (latest)

kind estuary
#

Before I file this as an official issue or start nagging the rest of the team I want to make sure I'm not deploying or thinking about the issue incorrectly. Basically I'm deploying a SolidStart app on Cloudflare Workers, loading it on my browser, pushing a deploy and noticing that when I navigate between pages an error is thrown.

I could be wrong but it seems to happen mostly with Outlets. When I navigate to a page with one, the application loads the nested chunked script that was compiled newly while the one currently cached in browser is older. Hence the child trips up and throws an error because the function it depends on no longer exists. So I see a lot of red errors as a result.

How should I be deploying this to ensure that the function names between versions remain consistent and my deployments don't break? or is this a bug with Start's default config.

subtle heath
#

seems like that error is tied to some use of for (..of He(...))

kind estuary
#

I think the solution here is to ensure that the parent and children of an Outlet are packaged together...?

subtle heath
#

Do you mind if I try to RE the output files?

#

I'm seeing [$,_]=He(!0) near const{clearSession:D,breakpoints:Q}

#

weird

#

He turns out to be createSignal

kind estuary
#

Ok maybe it's not related to the outlets :p

#

clearSession, breakpoints are pulling from a site-wide context

#

Perhaps the new chunk that's being pulled is out of sync with the context value?

#

or am I just totally not comprehending the issue lol

subtle heath
kind estuary
subtle heath
kind estuary
subtle heath
#

Interesting...

kind estuary
#

I really need to resolve this tmrw. Any ideas, send them my way. I'm blocked from updating a project without solve it lol

subtle heath
#

Maybe the main guy @native hemlock

side mention: @torpid cypress

native hemlock
#

we cant do much if files from across versions of the app are coexisting

#

I thought the hashing in the filenames would assure that there's no conflict when the new version is asked for.. it should never be cached

#

the first time

kind estuary
kind estuary
#

Re-reading it, are you suggesting that all the hashed assets be maintained in the dist folder? Cloudflare Worker has a habit of purging everything not in dist so when I build the old hashed assets are removed....

native hemlock
#

normally old hashed assets shouldnt be fetched

#

I wanted to add a feaeture for this inbuilt

native hemlock
#

and maybe the client should handle not finding an asset

#

and cause a reload for that

kind estuary
#

Sounds similar to Service Worker reload strategy

native hemlock
#

Yeah I havent implemented this before .. just had an idea

kind estuary
#

I need to figure out a stopgap solution for the time being

native hemlock
#

I think the issue im seeing is that the .js file names dont have hashes in them

#

I would have assumed all the client side javascript would be with hashed filenames

#

even entry-client and stuff

kind estuary
#

I had the hashes in them at one point, had the same issue

#

As I'm understanding the issue, I think I need to deploy with the hashes but ensure that they remain in the Cloudflare Worker instead of purging the entire codebase on build

#

Basically accumulate the build dir not override it so that it maintains the old hash locations

native hemlock
#

hmm im so confused lol.. how do people not face this all the time?

kind estuary
#

I'm so confused too tbh

native hemlock
#

dont all services make older assets unavailable

kind estuary
#

Major cloudflare pages does this automagically?

#

I using a raw worker

native hemlock
#

a newer page shouldnt ask for an older page Im goes

kind estuary
#

true

#

maybe I introduced a new issue when I removed the hashes. let me try with it

#

and I need the build dir to keep all the hashed scripts in cache

#

need to solve that too

native hemlock
kind estuary
#

Good question.

#

So I suppose just using Pages is my solution

subtle heath
#

@kind estuary also I forgot to mention, does this happen on all pages?

kind estuary
#

No just the ones with chunks that are fetched

#

I think

kind estuary
#

Hmmmm Cloudflare Pages seems to be much better when I redeploy...

kind estuary
#

Did hit a minor and SUPER strange issue just now...

#

It's the same worker...the only thing that's changed is the custom domain is pointing to it via a CNAME

#

Very likely a userland problem but it's plaguing me. lol. I'll conclude the issue because this seems the right path

whole moss
#

(Not particularly related to this problem, but just wanted to point out that clicking on the "favorite" icon under products shows an error if you haven't selected any products before)

native hemlock
kind estuary
kind estuary
native hemlock
#

ohh didnt notice lol

kind estuary
#

Ugh it's so annoying. Why the hell is there a difference between the custom domain and not?

#

cries lol

native hemlock
#

this errors always like fucking kill me right now

subtle heath
#

Nikhil lost it 🤣

kind estuary
subtle heath
kind estuary
#

1 day apart actually lol

#

Tanner, Ryan and the real talent share the same day haha

subtle heath
#

the oldies have talents

#

jk

kind estuary