Comments (3)
I was able to fix it on my own. The problem was: /app/compontents/index.tsx: The "oncompleted" function fails while fetching the conversations.id . Therefore the bot never reaches the state, where the "setResponsingFalse()" is set.
I rewrote the async onCompleted like this:
async onCompleted(hasError?: boolean) {
// Immediately set the chatbot as not responding, regardless of potential errors in fetching conversations
setResponsingFalse();
if (hasError) {
return; // Early return if there was an error in the chat message operation
}
try {
// Attempt to fetch all conversations and generate a new name for the conversation
const { data: allConversations }: any = await fetchConversations();
if (allConversations && allConversations.length > 0) {
const newItem: any = await generationConversationName(allConversations[0].id);
// Proceed with setting new conversation information and resetting state as needed
const newAllConversations = produce(allConversations, (draft: any) => {
draft[0].name = newItem.name;
});
setConversationList(newAllConversations as any);
// Additional logic to reset inputs and conversation IDs as needed
if (getConversationIdChangeBecauseOfNew()) {
setConversationIdChangeBecauseOfNew(false);
resetNewConversationInputs();
setChatNotStarted();
setCurrConversationId(allConversations[0].id, APP_ID, true);
}
} else {
// Handle the case where no conversations are returned
console.error("No conversations were fetched.");
}
} catch (error) {
console.error("An error occurred while fetching conversations or generating a new conversation name:", error);
// Here, handle the error as needed, possibly setting additional error states or displaying a message to the user
}
},
from webapp-conversation.
After you embed the chatbot in another website, can other people still access your web app UI?
from webapp-conversation.
After you embed the chatbot in another website, can other people still access your web app UI?
Before I fixed it -> No
After my fix -> Yes
Please make sure to have SSL activated (For example by using a reverse Proxy), otherwise many brothers will block the iFrame
from webapp-conversation.
Related Issues (20)
- 500|App is unavailable HOT 1
- throw this error when build after add Environment Variables in vercel HOT 4
- App is unavailable HOT 10
- 代码是2个月前的 需要更新到最新代码 HOT 4
- 欢迎语出不来
- 开场白的开场问题不显示 HOT 1
- Bot Replies Not Displaying HOT 1
- "500 App is unavailable" when fetching empty conversations HOT 8
- 开场问题没展示出来啊,看了看代码也没找到 HOT 3
- 没有语音转文本的按钮 HOT 1
- 删除会话的功能还是无法使用
- 请问如何将此应用编译成静态网页,使用客户端渲染? HOT 1
- Security Issue: Internal API URL and Token exposed in client code. HOT 1
- Cannot remove workflow and node information to be sent to the frontend. HOT 1
- # Feature Request: Display Opening Questions in UI
- Has anyone encountered a GET/serviceWorker.js 404 issue? HOT 3
- generationConversationName接口怎么使用? HOT 1
- local api 404 || 本地部分接口404
- Coding Error - Word Case HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webapp-conversation.