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

Issue of not being able to press “like” or "unlike". #12101

Closed
5 tasks done
camucamulemon7 opened this issue Dec 25, 2024 · 5 comments
Closed
5 tasks done

Issue of not being able to press “like” or "unlike". #12101

camucamulemon7 opened this issue Dec 25, 2024 · 5 comments
Labels
🐞 bug Something isn't working

Comments

@camucamulemon7
Copy link

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.14.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Internal Server Error” occurs when I click ‘Like’ on the chatbot.
image

I checked the log with the command “docker compose logs -f” and found the following error.

nginx-1       | xxx.xxx.xxx.xxx - - [25/Dec/2024:14:11:55 +0000] "GET /api/site HTTP/1.1" 200 607 "https://xxxxx/chat/yyyyy" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "-"
nginx-1       | xxx.xxx.xxx.xxx - - [25/Dec/2024:14:11:55 +0000] "GET /api/parameters HTTP/1.1" 200 971 "https://xxxxx/chat/yyyyy" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "-"
nginx-1       | xxx.xxx.xxx.xxx - - [25/Dec/2024:14:11:55 +0000] "GET /api/meta HTTP/1.1" 200 19 "https://xxxxx/chat/yyyyy" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "-"
nginx-1       | xxx.xxx.xxx.xxx - - [25/Dec/2024:14:11:55 +0000] "GET /api/conversations?limit=100&pinned=false HTTP/1.1" 200 246 "https://xxxxx/chat/yyyyy" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "-"
nginx-1       | xxx.xxx.xxx.xxx - - [25/Dec/2024:14:11:55 +0000] "GET /api/conversations?limit=100&pinned=true HTTP/1.1" 200 46 "https://xxxxx/chat/yyyyy" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "-"
api-1         | 2024-12-25 14:11:55,303.303 ERROR [Dummy-109] [app.py:875] - Exception on /api/messages/ab3a7d73-1b4e-4346-8565-ad889c0194b5/feedbacks [POST]
api-1         | Traceback (most recent call last):
api-1         |   File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request
api-1         |     rv = self.dispatch_request()
api-1         |          ^^^^^^^^^^^^^^^^^^^^^^^
api-1         |   File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 902, in dispatch_request
api-1         |     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
api-1         |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1         |   File "/app/api/.venv/lib/python3.12/site-packages/flask_restful/__init__.py", line 489, in wrapper
api-1         |     resp = resource(*args, **kwargs)
api-1         |            ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1         |   File "/app/api/.venv/lib/python3.12/site-packages/flask/views.py", line 110, in view
api-1         |     return current_app.ensure_sync(self.dispatch_request)(**kwargs)  # type: ignore[no-any-return]
api-1         |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1         |   File "/app/api/.venv/lib/python3.12/site-packages/flask_restful/__init__.py", line 604, in dispatch_request
api-1         |     resp = meth(*args, **kwargs)
api-1         |            ^^^^^^^^^^^^^^^^^^^^^
api-1         |   File "/app/api/controllers/web/wraps.py", line 21, in decorated
api-1         |     return view(app_model, end_user, *args, **kwargs)
api-1         |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1         |   File "/app/api/controllers/web/message.py", line 111, in post
api-1         |     MessageService.create_feedback(app_model, message_id, end_user, args["rating"], args["content"])
api-1         |                                                                                     ~~~~^^^^^^^^^^^
api-1         | KeyError: 'content

On the other hand, when I clicked “Like” from the log & announcement, the process was successfully completed.
image

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

Copy link

dosubot bot commented Dec 25, 2024

Hello, @camucamulemon7! I'm here to assist you with bug fixes, answer questions, and help you become a contributor. Let's squash those bugs together! 🤖

The "Internal Server Error" you are experiencing when trying to press "like" on the chatbot in the self-hosted Dify version 0.14.2 is due to a known bug in that version. This issue has been resolved in a later update through Pull Request #12058. To fix this error, you should update your Dify installation to the latest version where the fix has been applied. The error occurs specifically when clicking 'like' during a chat conversation, but the action completes successfully when done under the admin feedback logs [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added the 🐞 bug Something isn't working label Dec 25, 2024
@camucamulemon7
Copy link
Author

@dosu.
Thanks for letting me know!
I did the update and made sure #12058 was reflected and tried it, but it did not fix it.
I thought maybe I was falling into docker compose's cache trap, so I rebuilt with the following command, but it didn't fix it.

docker compose build --no-cache
docker compose up --force-recreate --detach

Is there any other cause?

Copy link

dosubot bot commented Dec 25, 2024

If updating and rebuilding with --no-cache didn't resolve the issue, it's possible that the update wasn't applied correctly or there might be another underlying issue. Here are a few steps you can take to troubleshoot further:

  1. Verify the Update: Double-check that the changes from Pull Request fix: like failed close #12057 #12058 are indeed present in your codebase. You can do this by reviewing the specific files and changes that were part of the pull request.

  2. Clear Docker Volumes: Sometimes, persistent data in Docker volumes can cause issues. Try removing the volumes associated with your Dify containers and then rebuild and restart the containers. Be cautious with this step as it might remove important data.

    docker compose down -v
    docker compose build --no-cache
    docker compose up --force-recreate --detach
  3. Check Logs for Additional Errors: Review the logs again for any additional error messages that might provide more insight into what's going wrong. Look for any differences in the logs compared to before the update.

  4. Database Migrations: Ensure that any necessary database migrations have been applied. Sometimes updates require changes to the database schema, which need to be applied manually.

  5. Environment Variables: Verify that all necessary environment variables are correctly set, as changes in the code might depend on new or updated configurations.

If these steps don't resolve the issue, it might be helpful to look for any additional patches or updates that address related issues.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@yihong0618
Copy link
Contributor

fixed in #12058

@hjlarry
Copy link
Contributor

hjlarry commented Dec 26, 2024

fixed in #12077

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants