littlebear0729 / Mastodon2TG

Sync mastodon toot and Telegram channel or group in both direction.
Apache License 2.0
8 stars 6 forks source link

Keeps reporting "Websocket Error" #4

Open Misaka-0x447f opened 1 month ago

Misaka-0x447f commented 1 month ago

I tried to build a docker and run it on azure but it keeps reporting same error. Same on my own machine.

Error log

2024-05-25 11:26:50,590 WARNING Websocket Error: scheme https is invalid
2024-05-25 11:26:50,591 INFO scheme https is invalid - reconnect

and keeps printing same thing.

Filesystem

root@3f6d8af29414:/app# ls
Dockerfile  LICENSE  README.md  config.json  config.sample.json  main.log  main.py  requirements.txt

Config

{
  "tg_bot_token": "1005******:AA********************************k",
  "channel_chat_id": -100198*******,
  "pm_chat_id": 143******,
  "mastodon_host": "mastodon.online",
  "mastodon_api_access_token": "fb8i98sRSyF********************************",
  "mastodon_app_name": "Mastodon2TG",
  "mastodon_username": "Misaka_0x447f",
  "scope": ["public", "unlisted"],
  "add_link_in_telegram": true,
  "add_link_in_mastodon": true
}
littlebear0729 commented 1 month ago

Sorry for late reply, I'm no longer using this project so I cannot ensure you my code is still working for you. But I can offer you some idea to debug.

The error may occur at: https://github.com/littlebear0729/Mastodon2TG/blob/668d0f30c036336e5c27420a9a7f3547138d5a29/main.py#L63

You may try check the API document of your Mastodon instance and change the URL?