next-shared-cache: Using redis-stack & lru makes static assets 404

Brief Description of the Bug

When using

import createLruHandler from '@neshca/cache-handler/local-lru'
import createRedisHandler from '@neshca/cache-handler/redis-stack'

We see that our static assets like JS and CSS files sometimes 404.

Screenshot 2024-08-17 at 18 37 35

Screenshot 2024-08-17 at 18 36 03

So not all, but some.

Severity Maybe Major?

Frequency of Occurrence Always

Environment:

It happens on CircleCI and local on M3 and M1.

Dependencies and Versions next@14.2.3 @neshca/cache-handler@1.5.1

Attempted Solutions or Workarounds None so far, we removed the package and continuing using our own redis cache handler.

Impact of the Bug Critical, we cannot get Next.JS assets loaded.

Additional context None, but happy to provide more!

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 16 (4 by maintainers)

Most upvoted comments

oh interesting, that was actually my next thing to attempt to look into! when i manage to implement the outputFileTracingRoot and see it’s affect, i will let you know. thanks

We tried the example cacheHandler from the repo and running in the same problem. What we have done is disable the cache handler on our CI environments and locally, which is where the problem was. When we build on Vercel or inside a Dockerfile, curiously this issue is not there. I don’t have much more time to debug it since I’ve spent maybe 8 hrs trying different combinations and debugging. And since we can disable them on CI and locally, we fingers crossed no longer see the issue. If it comes up i’ll look into NEXT_PRIVATE_DEBUG_CACHE 🥳 thanks for the tip!