cogentapps / chat-with-gpt

An open-source ChatGPT app with a voice
https://www.chatwithgpt.ai
MIT License
2.29k stars 485 forks source link

Share button not working #173

Open ryderstorm opened 11 months ago

ryderstorm commented 11 months ago

Hello! First off - thanks for creating this app. I've been self-hosting it for months and it's a huge improvement over the official ChatGPT interface.

I'm having an issue with the share button in a conversation. Nothing happens in the interface when I click on it, but the Network tab shows a successful communication with the backend and the console shows an error:

image

Here is the content of the response from the backend:

{"id":"w_xNK"}

And here is the error message in the console:

Uncaught (in promise) DOMException: navigator.share can only be called in response to user interaction
(anonymous) @ VM626:47
navigator.share @ VM626:36
(anonymous) @ chat.tsx:99
d @ regeneratorRuntime.js:44
(anonymous) @ regeneratorRuntime.js:125
(anonymous) @ regeneratorRuntime.js:69
r @ asyncToGenerator.js:3
u @ asyncToGenerator.js:22
Promise.then (async)
r @ asyncToGenerator.js:12
u @ asyncToGenerator.js:22
(anonymous) @ asyncToGenerator.js:27
(anonymous) @ asyncToGenerator.js:19
(anonymous) @ chat.tsx:105
je @ react-dom.production.min.js:54
Be @ react-dom.production.min.js:54
(anonymous) @ react-dom.production.min.js:55
Ir @ react-dom.production.min.js:105
jr @ react-dom.production.min.js:106
(anonymous) @ react-dom.production.min.js:117
ac @ react-dom.production.min.js:274
Te @ react-dom.production.min.js:52
Br @ react-dom.production.min.js:109
Gt @ react-dom.production.min.js:74
Vt @ react-dom.production.min.js:73

I have updated my server to use the latest version of the release branch. I'm not experiencing any other bugs.

Here's some more context for the bug:

Let me know what else you need to debug this, I'm happy to help out in any way that I can.