Open lauriii opened 2 years ago
Is this resulting into multiple tokens creating when running yarn dev
?
I've been looking for a solution for a while now. We implemented an in-memory cache + a larger value for the token expiry. This seems to be working for production.
On dev/build however, Next runs getStaticPaths
and getStaticProps
on different workers. The memory cache solution does not work here.
I'll continue looking into this and see if we can refactor the getPathsFromContext/getResourceCollection
calls.
Just adding some thoughts here...
I'm wondering if we even need authenticated requests for getStaticPaths
? Static pages are always non-authenticated.
Authenticated calls are used for rendering unpublished content and revisions in the preview which is a server-side call in getStaticProps
with fallback: blocking
.
So do we need to make auth'd call for getStaticPaths
? 🤔
\cc @robdecker ^^
Is this resulting into multiple tokens creating when running
yarn dev
?
I've been running into this error when running yarn build
as well
@harumijang Are you using the DrupalClient
? How big is your site (as in how many content types or pages?)
Using DrupalClient and very small demo site with 5 pages. But I was able to get around the error by reinstalling my backend with mySQL instead of SQlite.
OK. Good to know. Let me know if you hit this issue again.
I'm getting following exception fairly consistently when visiting any of the node pages:
This seems to be caused by how
getPathsFromContext()
is callinggetResourceCollection()
multiple times when multiple types are provided, leading into multiple calls forbuildHeaders()
. I haven't been able to reproduce this when callinggetPathsFromContext()
with a single type.Reporting here instead of Simple OAuth since I haven't had a chance to research the root cause for this.