Open stepacool opened 4 months ago
i have same problem. TypeError: conversations is undefined.
TypeError: conversations is undefined Main index.tsx:236 Main index.tsx:277 commitHookEffectListMount react-dom.development.js:21102 commitHookPassiveMountEffects react-dom.development.js:23154 commitPassiveMountOnFiber react-dom.development.js:23259
I have the same problem, the page show "500 | app is unavailable" ,
confirm you app type is Conversation Application and has created env.local file like this
NEXT_PUBLIC_APP_ID='<Your app Id>'
NEXT_PUBLIC_APP_KEY='<Web API Key From Dify>'
NEXT_PUBLIC_API_URL='https://api.dify.ai/v1'
检查本地是否开了代理,把代理完全关闭去掉。
Maybe caused by not set NEXT_PUBLIC_API_URL or set the wrong NEXT_PUBLIC_API_URL value? @stepacool
I pulled the repository to my local machine and set the required environment variables. After I started the project with
Screenshots show that the error is raised here:
npm run dev
It starts and all the requests are 200 OK, but the whole screen is a big 500 App is unavailable. I reversed engineered the issue and it seems this is happening due to an empty body of /conversations/ API request. Attaching screenshots with error, error logging and potential source of problem.const isNotNewConversation = conversations.some(item => item.id === _conversationId)
But gets muted and instead setAppUnavailable() is called. The error reads "TypeError: Cannot read properties of undefined (reading 'some') at eval (index.tsx:228:52)" meaning the supposed list conversations is undefined at the moment.