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

Copy API curl request error #12818

Closed
5 tasks done
wrfly opened this issue Jan 17, 2025 · 1 comment · Fixed by #12936
Closed
5 tasks done

Copy API curl request error #12818

wrfly opened this issue Jan 17, 2025 · 1 comment · Fixed by #12936
Labels
🐞 bug Something isn't working good first issue Good first issue for newcomers

Comments

@wrfly
Copy link

wrfly commented Jan 17, 2025

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.15.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I deployed dify with HTTP endpoints, while the copy function is not working due to it. (related question)

Image

✔️ Expected Behavior

copy the content

❌ Actual Behavior

console error

Copy link

dosubot bot commented Jan 17, 2025

Hello, @wrfly! I'm here to assist you with any bugs, questions, or contributions you have for Dify. I can help you solve issues, answer questions, and even guide you on becoming a contributor.

The error "Uncaught TypeError: Cannot read properties of undefined (reading 'writeText')" suggests that the clipboard API is not accessible in your current environment. This issue often arises when the page is served over HTTP instead of HTTPS, as the clipboard API requires a secure context to function properly.

To resolve this issue, consider the following steps:

  1. Serve Over HTTPS: Ensure that your application is served over HTTPS. This is a requirement for the clipboard API to work in most modern browsers.

  2. Check Browser Compatibility: Verify that the browser you are using supports the clipboard API and is up to date.

  3. Review JavaScript Code: Ensure that the JavaScript code correctly accesses the navigator.clipboard object. The error indicates that navigator.clipboard might be undefined, which can happen if the API is not supported or if the page is not served securely.

If you are using the copy-to-clipboard library, ensure it is correctly implemented and that there are no version-specific issues. The version used in Dify is ^3.3.3 [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 Jan 17, 2025
@crazywoola crazywoola added the good first issue Good first issue for newcomers label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working good first issue Good first issue for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants