-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update NextJS 15.1 #241
base: main
Are you sure you want to change the base?
Update NextJS 15.1 #241
Conversation
@sakit0 is attempting to deploy a commit to the Edge Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
package.json
Outdated
"@types/react": "19.0.1", | ||
"@types/react-dom": "19.0.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any problem with turning Override off.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
11a1a8e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sakit0 Could you please check this? It didn't work during the operation check, and an error log was displayed. 🙏
https://vercel.com/r06-edge/giselle/logs?selectedLogId=4qd7j-1734341227963-53adc6408a18
⨯ ReferenceError: agentId is not defined
at S (.next/server/app/(playground)/p/[agentId]/canary/page.js:1:7611) {
digest: '3057732266'
}
https://vercel.com/r06-edge/giselle/logs?selectedLogId=4qd7j-1734341228451-c1ebedbc3a73
⨯ Error: Flow with id flw_yv8pz65uc9e7gtqb98ru5kag not found
at m (.next/server/app/(playground)/p/[agentId]/canary/page.js:99:93398)
at async U (.next/server/app/(playground)/p/[agentId]/canary/page.js:1:8206) {
digest: '2301578653'
}
@shige |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sakit0 Please let me know where I can find the change logs that are relevant to this issue?
Previously, agentId was referenced directly within the server action, which caused issues after upgrading to Next.js 15.1.
I know that defining a Server Action inside a component creates a closure where the action has access to the outer function's scope. And I understand that this behaviour has not changed in Next.js 15.1.
@toyamarinyon |
I see, please give me a moment to try it locally. |
I could reproduce the error on It seems that there is a problem with the way GraphContextProvider is implemented, not with Next15.1. I will investigate the cause a little further. |
Note Of course, it could be 49844e8, but I am inclined to find the cause and understand it, because I believe that it is a potentially bad implementation that does not allow the use of the features provided by the Framework. |
@sakit0 I don't know why I was able to fix it, but this fixed it. I would like this to be used instead of 49844e8 if it is to be corrected in that environment. diff --git a/app/(playground)/p/[agentId]/canary/page.tsx b/app/(playground)/p/[agentId]/canary/page.tsx
index 5220a1f7..1476f5f7 100644
--- a/app/(playground)/p/[agentId]/canary/page.tsx
+++ b/app/(playground)/p/[agentId]/canary/page.tsx
@@ -63,19 +63,18 @@ export default async function Page({
async function persistGraph(graph: Graph) {
"use server";
const { url } = await putGraph(graph);
+ const blobList = await list({
+ prefix: buildGraphFolderPath(graph.id),
+ });
+ const oldBlobUrls = blobList.blobs
+ .filter((b) => b.url !== url)
+ .map((b) => b.url);
await db
.update(agents)
.set({
graphUrl: url,
})
.where(eq(agents.id, agentId));
- const blobList = await list({
- prefix: buildGraphFolderPath(graph.id),
- });
-
- const oldBlobUrls = blobList.blobs
- .filter((blob) => blob.url !== url)
- .map((blob) => blob.url);
if (oldBlobUrls.length > 0) {
await del(oldBlobUrls);
}
|
@toyamarinyon |
First, I created a new Next.js application using // page.tsx
export default function Home() {
const msg = "hello";
async function handleClick() {
"use server";
console.log(msg);
}
return (
<button type="button" onClick={handleClick}>
hello
</button>
);
} The code worked without any issues. At this point, I realized this wasn't a widespread problem with Next 15.1, so I suspected the issue might be with how Closures are being used in Giselle. Next, I checked if the same error occurred with the This meant the issue had to be with either the To narrow it down, I added an Contrary to my expectations that it would fail and lead me to investigate the Provider code, it worked fine. This indicated that the issue was with const oldBlobUrls = blobList.blobs
.filter((b) => b.url !== url)
.map((b) => b.url); When I changed the order of operations, it worked properly. I don't fully understand why this happens, so I plan to create an issue on Next.js once I can create a minimal reproduction of the problem. |
Summary
Update NextJS 15.1
Related Issue
#212
Changes
Testing
Other Information