vors
vors3y ago

I m seeing this error when I refresh the

I'm seeing this error, when I refresh the page. I have action prewarm, but I don't see any server side logs for it.
No description
2 Replies
vors
vorsOP3y ago
My code (I tried a lot of different things)
useEffect(() => {
async function runPreWarm() {
const modelNames = getModelNames();
console.log("Call preWarm for " + JSON.stringify(modelNames));
await prewarm(modelNames as any);
}
runPreWarm();
return () => {};
}, [prewarm]);
useEffect(() => {
async function runPreWarm() {
const modelNames = getModelNames();
console.log("Call preWarm for " + JSON.stringify(modelNames));
await prewarm(modelNames as any);
}
runPreWarm();
return () => {};
}, [prewarm]);
const prewarm = useAction("actions/prewarm");
const prewarm = useAction("actions/prewarm");
I made it work with a stupid hack, but would love to fix it properly
useEffect(() => {
async function runPreWarm() {
const modelNames = getModelNames();
console.log("Call preWarm for " + JSON.stringify(modelNames));
await prewarm(modelNames as any);
}
// TODO: figure out how to remove this timeout but still avoid hitting the error
const timer = setTimeout(() => {
runPreWarm().then();
}, 1500);
return () => clearTimeout(timer);
}, []);
useEffect(() => {
async function runPreWarm() {
const modelNames = getModelNames();
console.log("Call preWarm for " + JSON.stringify(modelNames));
await prewarm(modelNames as any);
}
// TODO: figure out how to remove this timeout but still avoid hitting the error
const timer = setTimeout(() => {
runPreWarm().then();
}, 1500);
return () => clearTimeout(timer);
}, []);
ballingt
ballingt3y ago
Thanks for reporting, there'll be a fix in the next release.

Did you find this page helpful?