Skip to content
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

[Bug] Vercel自动更新至v0.142.2失败,选择重新部署仍然失败 #1734

Closed
Godoword opened this issue Mar 25, 2024 · 13 comments · Fixed by #1739
Closed

[Bug] Vercel自动更新至v0.142.2失败,选择重新部署仍然失败 #1734

Godoword opened this issue Mar 25, 2024 · 13 comments · Fixed by #1739
Labels
🐛 Bug Something isn't working | 缺陷 released

Comments

@Godoword
Copy link

Godoword commented Mar 25, 2024

💻 系统环境

Windows

📦 部署环境

Vercel / Zeabur / Sealos

🌐 浏览器

Chrome

🐛 问题描述

晚上发布v0.142.2后,Vercel显示Error,回退到在几小时前的v0.142.0(这个版本是正常自动更新的)。尝试重新部署,仍然提示Error。在此期间我没有对Github和Vercel进行过任何操作,刚看了下Fork里的Upstream Sync也是正常的,收到Failed production deployment的邮件才发现的。

【自动同步更新】:
[23:14:41.350] Running build in Washington, D.C., USA (East) – iad1
[23:14:41.509] Cloning github.com/Godoword/lobe-chat (Branch: main, Commit: ac72a34)
[23:14:42.105] Cloning completed: 595.952ms
[23:15:03.855] Restored build cache
[23:15:03.957] Running "vercel build"
[23:15:05.548] Vercel CLI 33.6.1
[23:15:07.284] Running "install" command: npx [email protected] install...
[23:15:12.953] npm WARN exec The following package was not found and will be installed: [email protected]
[23:15:15.353] bun install v1.0.30 (1424a196)
[23:15:15.356] Resolving dependencies
[23:15:29.318] Resolved, downloaded and extracted [8746]
[23:15:29.319] warn: incorrect peer dependency "[email protected]"
[23:15:29.319]
[23:15:29.319] warn: incorrect peer dependency "[email protected]"
[23:15:29.319]
[23:15:29.320] warn: incorrect peer dependency "@octokit/[email protected]"
[23:15:29.320]
[23:15:29.320] warn: incorrect peer dependency "@octokit/[email protected]"
[23:15:29.320]
[23:15:29.321] warn: incorrect peer dependency "@octokit/[email protected]"
[23:15:29.418] Saved lockfile
[23:15:30.177]
[23:15:30.177] + @auth/[email protected]
[23:15:30.177] + [email protected]
[23:15:30.177]
[23:15:30.177] 21 packages installed [14.83s]
[23:15:30.230] Detected Next.js version: 14.1.4
[23:15:30.242] Running "bun run build"
[23:15:30.677] $ next build
[23:15:32.926] ▲ Next.js 14.1.4
[23:15:32.927]
[23:15:33.044] Creating an optimized production build ...
[23:15:33.799] ✓ (pwa) Compiling for server...
[23:15:33.808] ✓ (pwa) Compiling for server...
[23:15:33.808] ✓ (pwa) Compiling for client (static)...
[23:15:33.808] ○ (pwa) Service worker: /vercel/path0/public/sw.js
[23:15:33.808] ○ (pwa) URL: /sw.js
[23:15:33.808] ○ (pwa) Scope: /
[23:18:22.343] ✓ Compiled successfully
[23:18:22.345] Linting and checking validity of types ...
[23:19:00.494]
[23:19:00.495] ./src/app/chat/(desktop)/features/ChatInput/Footer/index.tsx
[23:19:00.495] 59:36 Warning: 'expand' is defined but never used. Allowed unused args must match /^/u. unused-imports/no-unused-vars
[23:19:00.495]
[23:19:00.495] ./src/app/chat/(desktop)/features/ChatInput/TextArea.tsx
[23:19:00.495] 34:39 Warning: 'expand' is defined but never used. Allowed unused args must match /^
/u. unused-imports/no-unused-vars
[23:19:00.495]
[23:19:00.495] ./src/store/chat/slices/plugin/action.ts
[23:19:00.495] 90:13 Warning: Empty block statement. no-empty
[23:19:00.495]
[23:19:00.495] info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
[23:19:04.049] Collecting page data ...
[23:19:04.695] /vercel/path0/.next/server/app/api/auth/[...nextauth]/route.js:357
[23:19:04.696] `}}),tT("div",{className:"card",children:[n?.logo&&tT("img",{src:n?.logo,alt:"Logo",className:"logo"}),tT("h1",{children:s}),tT("div",{className:"message",children:l}),c]})]})}}({url:t,theme:r,error:e}),title:"Error"})}}function tP(e,t=Date.now()){return new Date(t+1e3*e)}async function tL(e,t,r,n){if(!r?.providerAccountId||!r.type)throw Error("Missing or invalid provider account");if(!["email","oauth","oidc","webauthn"].includes(r.type))throw Error("Provider not supported");let{adapter:i,jwt:o,events:a,session:{strategy:s,generateSessionToken:l}}=n;if(!i)return{user:t,account:r};let c=r,{createUser:u,updateUser:d,getUser:p,getUserByAccount:h,getUserByEmail:f,linkAccount:m,createSession:w,getSessionAndUser:b,deleteSession:g}=i,y=null,=null,v=!1,k="jwt"===s;if(e){if(k)try{let t=n.cookies.sessionToken.name;(y=await o.decode({...o,token:e,salt:t}))&&"sub"in y&&y.sub&&(=await p(y.sub))}catch{}else{let t=await b(e);t&&(y=t.session,=t.user)}}if("email"===c.type){let r=await f(t.email);return r?(?.id!==r.id&&!k&&e&&await g(e),=await d({id:r.id,emailVerified:new Date}),await a.updateUser?.({user:})):(=await u({...t,emailVerified:new Date}),await a.createUser?.({user:}),v=!0),{session:y=k?{}:await w({sessionToken:l(),userId:.id,expires:tP(n.session.maxAge)}),user:,isNewUser:v}}if("webauthn"===c.type){let e=await h({providerAccountId:c.providerAccountId,provider:c.provider});if(e){if(){if(e.id===.id){let e={...c,userId:.id};return{session:y,user:,isNewUser:v,account:e}}throw new V("The account is already associated with another user",{provider:c.provider})}y=k?{}:await w({sessionToken:l(),userId:e.id,expires:tP(n.session.maxAge)});let t={...c,userId:e.id};return{session:y,user:e,isNewUser:v,account:t}}{if(){await m({...c,userId:.id}),await a.linkAccount?.({user:,account:c,profile:t});let e={...c,userId:.id};return{session:y,user:,isNewUser:v,account:e}}if(t.email?await f(t.email):null)throw new V("Another account already exists with the same e-mail address",{provider:c.provider});=await u({...t}),await a.createUser?.({user:}),await m({...c,userId:.id}),await a.linkAccount?.({user:,account:c,profile:t}),y=k?{}:await w({sessionToken:l(),userId:.id,expires:tP(n.session.maxAge)});let e={...c,userId:.id};return{session:y,user:,isNewUser:!0,account:e}}}let S=await h({providerAccountId:c.providerAccountId,provider:c.provider});if(S){if(){if(S.id===.id)return{session:y,user:,isNewUser:v};throw new R("The account is already associated with another user",{provider:c.provider})}return{session:y=k?{}:await w({sessionToken:l(),userId:S.id,expires:tP(n.session.maxAge)}),user:S,isNewUser:v}}{let{provider:e}=n,{type:r,provider:i,providerAccountId:o,userId:s,...d}=c;if(c=Object.assign(e.account(d)??{},{providerAccountId:o,provider:i,type:r,userId:s}),)return await m({...c,userId:.id}),await a.linkAccount?.({user:,account:c,profile:t}),{session:y,user:,isNewUser:v};let p=t.email?await f(t.email):null;if(p){let e=n.provider;if(e?.allowDangerousEmailAccountLinking)=p;else throw new R("Another account already exists with the same e-mail address",{provider:c.provider})}else =await u({...t,emailVerified:null});return await a.createUser?.({user:}),await m({...c,userId:.id}),await a.linkAccount?.({user:,account:c,profile:t}),{session:y=k?{}:await w({sessionToken:l(),userId:.id,expires:tP(n.session.maxAge)}),user:,isNewUser:!0}}}function tN(e,t){if(null==e)return!1;try{return e instanceof t||Object.getPrototypeOf(e)[Symbol.toStringTag]===t.prototype[Symbol.toStringTag]}catch{return!1}}"undefined"!=typeof navigator&&navigator.userAgent?.startsWith?.("Mozilla/5.0 ")||(n="oauth4webapi/v2.10.3");let t$=Symbol(),tD=Symbol(),tj=Symbol(),tH=Symbol(),tM=new TextEncoder,tW=new TextDecoder;function tq(e){return"string"==typeof e?tM.encode(e):tW.decode(e)}function tz(e){return"string"==typeof e?function(e){try{let t=atob(e.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"")),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r}catch(e){throw new tK("The input to be decoded is not correctly
[23:19:04.700]
[23:19:04.700]
[23:19:04.700] I: Missing secret, please set AUTH_SECRET or config.secret. Read more at https://errors.authjs.dev#missingsecret
[23:19:04.700] at /vercel/path0/.next/server/app/api/auth/[...nextauth]/route.js:357:51566
[23:19:04.706] at nw (/vercel/path0/.next/server/app/api/auth/[...nextauth]/route.js:357:52162)
[23:19:04.706] at /vercel/path0/.next/server/app/api/auth/[...nextauth]/route.js:357:58072
[23:19:04.706] at 6143 (/vercel/path0/.next/server/app/api/auth/[...nextauth]/route.js:357:58216)
[23:19:04.706] at t (/vercel/path0/.next/server/edge-runtime-webpack.js:1:143)
[23:19:04.706] at t (/vercel/path0/.next/server/app/api/auth/[...nextauth]/route.js:362:22961)
[23:19:04.706] at /vercel/path0/.next/server/app/api/auth/[...nextauth]/route.js:362:22990
[23:19:04.706] at t.O (/vercel/path0/.next/server/edge-runtime-webpack.js:1:548)
[23:19:04.706] at /vercel/path0/.next/server/app/api/auth/[...nextauth]/route.js:362:23007
[23:19:04.706] at r (/vercel/path0/.next/server/edge-runtime-webpack.js:1:1539) {
[23:19:04.706] type: 'MissingSecret',
[23:19:04.706] kind: 'error'
[23:19:04.706] }
[23:19:04.710]
[23:19:04.710] > Build error occurred
[23:19:04.716] Error: Failed to collect page data for /api/auth/[...nextauth]
[23:19:04.716] at /vercel/path0/node_modules/next/dist/build/utils.js:1258:15
[23:19:04.716] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
[23:19:04.717] type: 'Error'
[23:19:04.717] }
[23:19:04.988] error: script "build" exited with code 1
[23:19:04.996] Error: Command "bun run build" exited with 1

【尝试手动重新部署】:
[23:44:13.830] Running build in Washington, D.C., USA (East) – iad1
[23:44:13.981] Cloning github.com/Godoword/lobe-chat (Branch: main, Commit: ac72a34)
[23:44:13.999] Skipping build cache, deployment was triggered without cache.
[23:44:14.607] Cloning completed: 626.598ms
[23:44:15.266] Running "vercel build"
[23:44:15.965] Vercel CLI 33.6.1
[23:44:16.471] Running "install" command: npx [email protected] install...
[23:44:17.891] npm WARN exec The following package was not found and will be installed: [email protected]
[23:44:20.116] bun install v1.0.30 (1424a196)
[23:44:20.119] Resolving dependencies
[23:45:24.330] Resolved, downloaded and extracted [8742]
[23:45:24.331] warn: incorrect peer dependency "@octokit/[email protected]"
[23:45:24.331]
[23:45:24.331] warn: incorrect peer dependency "@octokit/[email protected]"
[23:45:24.332]
[23:45:24.332] warn: incorrect peer dependency "[email protected]"
[23:45:24.332]
[23:45:24.332] warn: incorrect peer dependency "[email protected]"
[23:45:24.332]
[23:45:24.333] warn: incorrect peer dependency "[email protected]"
[23:45:24.333]
[23:45:24.333] warn: incorrect peer dependency "[email protected]"
[23:45:24.333]
[23:45:24.333] warn: incorrect peer dependency "@octokit/[email protected]"
[23:45:24.334]
[23:45:24.334] warn: incorrect peer dependency "@octokit/[email protected]"
[23:45:24.334]
[23:45:24.334] warn: incorrect peer dependency "[email protected]"
[23:45:24.334]
[23:45:24.334] warn: incorrect peer dependency "[email protected]"
[23:45:24.344] error: @typescript-eslint/parser@^5.62.0 failed to resolve
[23:45:24.344] error: @typescript-eslint/parser@^6 failed to resolve
[23:45:24.390] Error: Command "npx [email protected] install" exited with 1

🚦 期望结果

No response

📷 复现步骤

No response

📝 补充信息

No response

@Godoword Godoword added the 🐛 Bug Something isn't working | 缺陷 label Mar 25, 2024
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Mar 25, 2024
@lobehubbot
Copy link
Member

👀 @Godoword

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@arvinxx
Copy link
Contributor

arvinxx commented Mar 25, 2024

next-auth版本更新导致,我明早锁下版本。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


As a result of the next-auth version update, I will lock the version tomorrow morning.

@forkgood
Copy link

next-auth版本更新导致,我明早锁下版本。

同样的问题,幸苦,感谢

@Godoword
Copy link
Author

next-auth版本更新导致,我明早锁下版本。

有劳了

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


As a result of the next-auth version update, I will lock the version tomorrow morning.

I'm tired

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


As a result of the next-auth version update, I will lock the version tomorrow morning.

Same problem, luckily, thanks

josias-r added a commit to nydelic/lobe-chat that referenced this issue Mar 25, 2024
@gh4322
Copy link

gh4322 commented Mar 25, 2024

Same problem+1

@IMSoley
Copy link

IMSoley commented Mar 25, 2024

This fixes for me, run openssl rand -base64 32 in command prompt or windows power shell.

In your .env.local add AUTH_SECRET=secret string here that was generated from the openssl command

That's it

@Johnzhu-123
Copy link

Same problem+1

@kangfenmao
Copy link

+1

@lobehubbot
Copy link
Member

@Godoword

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

@lobehubbot
Copy link
Member

🎉 This issue has been resolved in version 0.142.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 released
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

8 participants