reflex icon indicating copy to clipboard operation
reflex copied to clipboard

Button no response

Open EscaticZheng opened this issue 3 years ago β€’ 6 comments

Describe the bug image I copy the dalle example, when I click the button, no response at all, no blue circle, no picture and check server in dev mode, still nothing in background. image I can use my api key get the picture in local, so not the api problem. To Reproduce Steps to reproduce the behavior: just copy the dalle example, init and run it.

  • Code/Link to Repo: Example Pynecone App https://github.com/pynecone-io/pynecone-examples/tree/main/dalle Expected behavior A clear and concise description of what you expected to happen. It should appear the circle then wait to see the picture. Screenshots If applicable, add screenshots to help explain your problem.

** Specifics (please complete the following information):**

  • Python Version:3.8.10
  • Pynecone Version:0.1.14
  • OS: Ubuntu 20.04
  • Browser (Optional): All the Browser
  • Nodejs:v18.13.0

Additional context Add any other context about the problem here.

EscaticZheng avatar Feb 02 '23 05:02 EscaticZheng

Did you put your own api key in the app?

Alek99 avatar Feb 03 '23 05:02 Alek99

Did you put your own api key in the app?

Yes.

EscaticZheng avatar Feb 03 '23 05:02 EscaticZheng

image

EscaticZheng avatar Feb 03 '23 05:02 EscaticZheng

Ah ok seems to be working for me anyone else getting this issue? Also is you api response coming back as successful?

Alek99 avatar Feb 03 '23 06:02 Alek99

Ah ok seems to be working for me anyone else getting this issue? Also is you api response coming back as successful?

I can use my api in local. But the point is I click the button, nothing happened. Even I add print(111111) to "def get_image(self)", It can not print anything.It seems Click The Button does not trigger the get_image function.............

EscaticZheng avatar Feb 03 '23 06:02 EscaticZheng

Ok ill try and look into it more tomorrow, maybe an issue with v 14

Alek99 avatar Feb 03 '23 07:02 Alek99

I had the same problem, I was fine on the local wsl(ubuntu20), but nothing happened on the cloud server.

mengcius avatar Apr 10 '23 14:04 mengcius

A strange phenomenon, when I was running the cloud server and the local simultaneously, when I clicked the button in the cloud, the local actually responded. In addition, pc.switch has the same problem.

mengcius avatar Apr 10 '23 14:04 mengcius

I have solved this problem by configuring pc.Config(api_url="http://<public IP>:8000"), the IP address must be a public IP address.

mengcius avatar Apr 11 '23 18:04 mengcius

@mengcius I have the same problem. Do you mean aws public IPv4 by api_url="http://<public IP>:8000"?

localhd avatar Apr 12 '23 16:04 localhd

@Alek99 Hi, I got the same problem with version 0.1.21. Can you help me solve it?

localhd avatar Apr 12 '23 16:04 localhd

@mengcius I have the same problem. Do you mean aws public IPv4 by api_url="http://:8000"?

yes

mengcius avatar Apr 18 '23 06:04 mengcius

The frontend must be able to reach the backend via websocket, or no interactivity can occur.

Ensure that

  • backend is running
  • api_url is set to a public IP where the backend server is accessible (include port)
  • no websocket errors are displayed in browser devtools

masenf avatar Jul 06 '23 23:07 masenf