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

can"t fetch endpoint from chatie server #201

Open
TvoozMagnificent opened this issue Apr 16, 2022 · 8 comments
Open

can"t fetch endpoint from chatie server #201

TvoozMagnificent opened this issue Apr 16, 2022 · 8 comments

Comments

@TvoozMagnificent
Copy link

can"t fetch endpoint from chatie server

2022-04-16 14:23:44,858 - Wechaty - INFO - on() listen event with <<function on_scan at 0x1031105e0>>
2022-04-16 14:23:44,858 - Wechaty - INFO - on() listen event with <<function on_login at 0x10459c280>>
2022-04-16 14:23:44,858 - Wechaty - INFO - on() listen event with <<function on_message at 0x1028c0c10>>
2022-04-16 14:23:44,883 - Wechaty - INFO - init_puppet_event_bridge() <<wechaty_puppet_service.puppet.PuppetService object at 0x10459bfa0>>
2022-04-16 14:23:44,883 - Wechaty - INFO - initPuppetEventBridge() puppet.on(dong) (listenerCount:1) registering...
2022-04-16 14:23:44,883 - Wechaty - INFO - initPuppetEventBridge() puppet.on(error) (listenerCount:1) registering...
2022-04-16 14:23:44,883 - Wechaty - INFO - initPuppetEventBridge() puppet.on(heart-beat) (listenerCount:1) registering...
2022-04-16 14:23:44,883 - Wechaty - INFO - initPuppetEventBridge() puppet.on(ready) (listenerCount:1) registering...
2022-04-16 14:23:44,883 - Wechaty - INFO - receive event <%s>
2022-04-16 14:23:44,883 - Wechaty - INFO - initPuppetEventBridge() puppet.on(reset) (listenerCount:0) registering...
2022-04-16 14:23:44,883 - Wechaty - INFO - initPuppetEventBridge() puppet.on(friendship) (listenerCount:1) registering...
2022-04-16 14:23:44,883 - Wechaty - INFO - initPuppetEventBridge() puppet.on(login) (listenerCount:1) registering...
2022-04-16 14:23:44,883 - Wechaty - INFO - initPuppetEventBridge() puppet.on(logout) (listenerCount:1) registering...
2022-04-16 14:23:44,883 - Wechaty - INFO - initPuppetEventBridge() puppet.on(message) (listenerCount:1) registering...
2022-04-16 14:23:44,883 - Wechaty - INFO - initPuppetEventBridge() puppet.on(room-invite) (listenerCount:1) registering...
2022-04-16 14:23:44,883 - Wechaty - INFO - initPuppetEventBridge() puppet.on(room-join) (listenerCount:1) registering...
2022-04-16 14:23:44,884 - Wechaty - INFO - initPuppetEventBridge() puppet.on(room-leave) (listenerCount:1) registering...
2022-04-16 14:23:44,884 - Wechaty - INFO - initPuppetEventBridge() puppet.on(room-topic) (listenerCount:1) registering...
2022-04-16 14:23:44,884 - Wechaty - INFO - initPuppetEventBridge() puppet.on(scan) (listenerCount:1) registering...
2022-04-16 14:23:44,884 - Wechaty - INFO - starting puppet ...
2022-04-16 14:23:44,884 - PuppetService - INFO - init puppet ...
2022-04-16 14:23:44,884 - PuppetService - INFO - fetching endpoint from chatie-server: https://api.chatie.io/v0/hosties/81ca116a-5a78-4a24-8e1d-e9baa035b1b3
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/wechaty/wechaty.py", line 395, in start
await self.puppet.start()
File "/usr/local/lib/python3.9/site-packages/wechaty_puppet_service/puppet.py", line 919, in start
self._init_puppet()
File "/usr/local/lib/python3.9/site-packages/wechaty_puppet_service/puppet.py", line 884, in _init_puppet
raise WechatyPuppetGrpcError(
wechaty_puppet.exceptions.WechatyPuppetGrpcError: WechatyPuppetGrpcError('can"t fetch endpoint from chatie server. You can try it later, or make sure that your pc can connect to heroku server ', None, None)
[Python Wechaty] Ding Dong Bot started.
hfdeMacBook-Pro:python-wechaty-getting-started luchang$

@TvoozMagnificent
Copy link
Author

NOTE: on https://api.chatie.io/v0/hosties/81ca116a-5a78-4a24-8e1d-e9baa035b1b3: {"host":"0.0.0.0","ip":"0.0.0.0","port":0}

@huan
Copy link
Member

huan commented Apr 16, 2022

If the above API return HTTP/404 or port is 0, then it means that your token is not valid.

You need to check whether you have registered it successfully from the puppet service provider perspective.

@TvoozMagnificent
Copy link
Author

registered it successfully from the puppet service provider perspective : HOW?

@huan
Copy link
Member

huan commented Apr 17, 2022

In order to make your situation to be clear so that others can help, please provide:

  1. What you have already done. (With the script and log message details posted as text)
  2. What you expected (and explain why you expect that)
  3. What actual it is (detail with log message pastes as text)

@TvoozMagnificent
Copy link
Author

I am not sure what I have tried, all I want to know is how to get a token actually.

@huan
Copy link
Member

huan commented Apr 28, 2022

You can learn about how to get a Wechaty Puppet Service (WPS) TOKEN from our official website at https://wechaty.js.org/docs/puppet-services/

@rainberg
Copy link

rainberg commented Jun 1, 2023

[INFO][2023-06-02 01:10:51][finish.py:23] - [Finish] inited
Traceback (most recent call last):
File "D:\00_dev\anaconda\env\py310\lib\site-packages\wechaty\wechaty.py", line 445, in start
await self.puppet.start()
File "D:\00_dev\anaconda\env\py310\lib\site-packages\wechaty_puppet_service\puppet.py", line 911, in start
self._init_puppet()
File "D:\00_dev\anaconda\env\py310\lib\site-packages\wechaty_puppet_service\puppet.py", line 876, in _init_puppet
raise WechatyPuppetGrpcError(
wechaty_puppet.exceptions.WechatyPuppetGrpcError: WechatyPuppetGrpcError('can"t fetch endpoint from chatie server. You can try it later, or make sure that your pc can connect to heroku server ', None, None)

我有同样的问题

(D:\00_dev\anaconda\env\py310) PS D:\00_dev\git\chatgpt-on-wechat> curl https://api.chatie.io/v0/hosties/5a8a7644-395XXXXXXX2b17d5dcf14

StatusCode : 200
StatusDescription : OK
Content : {"host":"127.0.0.1","ip":"124.2XXXX9.226","port":9001}
RawContent : HTTP/1.1 200 OK
Connection: keep-alive
CF-Cache-Status: DYNAMIC
Report-To: {"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v3?s=mEQaY
%2FGx%2FAepVE%2Fb4h0EuQN8BtXXXXB0O%2FwBcCs8Tt1Zn3K8...
Forms : {}
Headers : {[Connection, keep-alive], [CF-Cache-Status, DYNAMIC], [Report-To, {"endpoints":[{"
url":"https://a.nel.cloudflare.com/report/v3?s=mEQaY%2FGx%2FAepVE%2Fb4hXXXXQN8Bt 2%2B0O%2FwBcCs8Tt1Zn3K8bFbwQilwud2sjaIePMo8gKSd%2Bh1XXx6hcLmx8ivBcm0snwclMmg42zIGxO
6ngZPTDc8Fq2AkHcrQgcofhaK"}],"group":"cf-nel","max_age":604800}], [NEL, {"success_f
raction":0,"report_to":"cf-nel","max_age":604800}]...}

但是用CURL可以正常取到地址

@rainberg
Copy link

rainberg commented Jun 1, 2023

在客端上设置了endpoint后解决了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants