puppet-service icon indicating copy to clipboard operation
puppet-service copied to clipboard

can"t fetch endpoint from chatie server

Open TvoozMagnificent opened this issue 3 years ago • 8 comments

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 avatar Apr 16 '22 06:04 TvoozMagnificent

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}

TvoozMagnificent avatar Apr 16 '22 06:04 TvoozMagnificent

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.

huan avatar Apr 16 '22 11:04 huan

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

TvoozMagnificent avatar Apr 17 '22 02:04 TvoozMagnificent

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)

huan avatar Apr 17 '22 03:04 huan

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

TvoozMagnificent avatar Apr 17 '22 04:04 TvoozMagnificent

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/

huan avatar Apr 28 '22 14:04 huan

[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 avatar Jun 01 '23 17:06 rainberg

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

rainberg avatar Jun 01 '23 18:06 rainberg