NidukaAkalanka / x-ui-english

English Version of X-UI, A Multi-protocol & Multi-user Xray Panel with a Web UI and a TG Bot
GNU General Public License v3.0
727 stars 239 forks source link

Telegram robot doesnt answer to my commands! #132

Closed mtalaeii closed 1 year ago

mtalaeii commented 1 year ago

Welcome

Description of the problem,screencshot would be good

Im add the robot token and my chat_id but robot doesnt answer to my commands!

Version of x-ui

```console $ x-ui version 0.5.3 ```

x-ui log or xray log

```console Jan 29 13:15:28 Cloud-11-12-cece06 systemd[1]: Started x-ui Service. Jan 29 13:15:28 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:15:28 x-ui 0.5.3 Jan 29 13:15:28 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:15:28 INFO - web server run http on [::]:8585 Jan 29 13:19:31 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:19:31 INFO - mahdi login success,Ip Address:94.23.144.95 Jan 29 13:19:31 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:19:31 WARNING - sendMsgToTgbot failed,GetTgBotToken fail: Jan 29 13:19:31 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:19:31 INFO - user 1 login success Jan 29 13:33:32 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:33:32 WARNING - Add Tofail: 端口已存在: 50690 Jan 29 13:39:16 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:39:16 INFO - mahdi login success,Ip Address:5.239.252.155 Jan 29 13:39:16 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:39:16 WARNING - sendMsgToTgbot failed,GetTgBotToken fail: Jan 29 13:39:16 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:39:16 INFO - user 1 login success Jan 29 13:52:14 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:52:14 WARNING - Add Tofail: strconv.ParseInt: parsing "\"0\"": invalid syntax Jan 29 13:53:18 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:53:18 ERROR - restart xray failed: 生成 xray 配置文件失败: json: error calling MarshalJSON for type json_util.RawMessage: invalid character '\\' looking for beginning of object key string Jan 29 13:53:58 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:53:58 ERROR - restart xray failed: 生成 xray 配置文件失败: json: error calling MarshalJSON for type json_util.RawMessage: invalid character '\\' looking for beginning of object key string Jan 29 13:54:03 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:54:03 WARNING - Add Tofail: 端口已存在: 50691 Jan 29 13:54:28 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:54:28 ERROR - restart xray failed: 生成 xray 配置文件失败: json: error calling MarshalJSON for type json_util.RawMessage: invalid character '\\' looking for beginning of object key string Jan 29 13:55:08 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:55:08 ERROR - restart xray failed: 生成 xray 配置文件失败: json: error calling MarshalJSON for type json_util.RawMessage: invalid character '\\' looking for beginning of object key string Jan 29 13:55:58 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:55:58 ERROR - restart xray failed: 生成 xray 配置文件失败: json: error calling MarshalJSON for type json_util.RawMessage: invalid character '\\' looking for beginning of object key string Jan 29 13:56:28 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:56:28 ERROR - restart xray failed: 生成 xray 配置文件失败: json: error calling MarshalJSON for type json_util.RawMessage: invalid character '\\' looking for beginning of object key string Jan 29 13:56:58 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:56:58 ERROR - restart xray failed: 生成 xray 配置文件失败: json: error calling MarshalJSON for type json_util.RawMessage: invalid character '\\' looking for beginning of object key string Jan 29 13:57:12 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:57:12 WARNING - stop server err: multierr: context canceled | close tcp [::]:8585: use of closed network connection | Jan 29 13:57:12 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:57:12 INFO - web server run http on [::]:8585 Jan 29 13:57:12 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:57:12 WARNING - start xray failed: 生成 xray 配置文件失败: json: error calling MarshalJSON for type json_util.RawMessage: invalid character '\\' looking for beginning of object key string Jan 29 13:58:12 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:58:12 ERROR - restart xray failed: 生成 xray 配置文件失败: json: error calling MarshalJSON for type json_util.RawMessage: invalid character '\\' looking for beginning of object key string Jan 29 13:58:42 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:58:42 ERROR - restart xray failed: 生成 xray 配置文件失败: json: error calling MarshalJSON for type json_util.RawMessage: invalid character '\\' looking for beginning of object key string Jan 29 13:59:12 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:59:12 ERROR - restart xray failed: 生成 xray 配置文件失败: json: error calling MarshalJSON for type json_util.RawMessage: invalid character '\\' looking for beginning of object key string Jan 29 13:59:31 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:59:31 WARNING - stop server err: multierr: context canceled | close tcp [::]:8585: use of closed network connection | Jan 29 13:59:31 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:59:31 INFO - web server run http on [::]:8585 Jan 29 13:59:31 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:59:31 WARNING - start xray failed: 生成 xray 配置文件失败: json: error calling MarshalJSON for type json_util.RawMessage: invalid character '\\' looking for beginning of object key string Jan 29 13:59:31 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:59:31 ERROR - Add NewStatsNotifyJob error[%!s()],Runtime[] invalid,wil run default Jan 29 13:59:31 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 13:59:31 INFO - Tg notify enabled,run at @daily Jan 29 14:00:10 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 14:00:10 WARNING - record not found Jan 29 14:00:10 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 14:00:10 WARNING - record not found Jan 29 14:00:31 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 14:00:31 ERROR - restart xray failed: 生成 xray 配置文件失败: json: error calling MarshalJSON for type json_util.RawMessage: invalid character '\\' looking for beginning of object key string Jan 29 14:01:01 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 14:01:01 ERROR - restart xray failed: 生成 xray 配置文件失败: json: error calling MarshalJSON for type json_util.RawMessage: invalid character '\\' looking for beginning of object key string Jan 29 14:01:31 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 14:01:31 ERROR - restart xray failed: 生成 xray 配置文件失败: json: error calling MarshalJSON for type json_util.RawMessage: invalid character '\\' looking for beginning of object key string Jan 29 14:02:01 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 14:02:01 ERROR - restart xray failed: 生成 xray 配置文件失败: json: error calling MarshalJSON for type json_util.RawMessage: invalid character '\\' looking for beginning of object key string Jan 29 14:02:31 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 14:02:31 ERROR - restart xray failed: 生成 xray 配置文件失败: json: error calling MarshalJSON for type json_util.RawMessage: invalid character '\\' looking for beginning of object key string Jan 29 14:03:01 Cloud-11-12-cece06 x-ui[49506]: 2023/01/29 14:03:01 ERROR - restart xray failed: 生成 xray 配置文件失败: json: error calling MarshalJSON for type json_util.RawMessage: invalid character '\\' looking for beginning of object key string Jan 29 14:03:23 Cloud-11-12-cece06 systemd[1]: Stopping x-ui Service... Jan 29 14:03:23 Cloud-11-12-cece06 systemd[1]: x-ui.service: Succeeded. Jan 29 14:03:23 Cloud-11-12-cece06 systemd[1]: Stopped x-ui Service. Jan 29 14:03:48 Cloud-11-12-cece06 systemd[1]: Started x-ui Service. Jan 29 14:03:48 Cloud-11-12-cece06 systemd[1]: Stopping x-ui Service... Jan 29 14:03:48 Cloud-11-12-cece06 systemd[1]: x-ui.service: Succeeded. Jan 29 14:03:48 Cloud-11-12-cece06 systemd[1]: Stopped x-ui Service. Jan 29 14:03:48 Cloud-11-12-cece06 systemd[1]: Started x-ui Service. Jan 29 14:03:48 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:03:48 x-ui-english 0.2.1.2 Jan 29 14:03:48 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:03:48 INFO - web server run http on [::]:8585 Jan 29 14:03:48 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:03:48 WARNING - start xray failed: 生成 xray 配置文件失败: json: error calling MarshalJSON for type json_util.RawMessage: invalid character '\\' looking for beginning of object key string Jan 29 14:03:48 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:03:48 ERROR - Add NewStatsNotifyJob error[%!s()],Runtime[] invalid,wil run default Jan 29 14:03:48 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:03:48 INFO - Tg notify enabled,run at @daily Jan 29 14:03:58 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:03:58 WARNING - client ip job err: open bin/config.json: no such file or directory Jan 29 14:03:58 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:03:58 WARNING - client ip job err: unexpected end of JSON input Jan 29 14:03:58 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:03:58 WARNING - xray log not init in config.json Jan 29 14:04:08 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:04:08 WARNING - client ip job err: open bin/config.json: no such file or directory Jan 29 14:04:08 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:04:08 WARNING - client ip job err: unexpected end of JSON input Jan 29 14:04:08 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:04:08 WARNING - xray log not init in config.json Jan 29 14:04:18 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:04:18 WARNING - client ip job err: open bin/config.json: no such file or directory Jan 29 14:04:18 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:04:18 WARNING - client ip job err: unexpected end of JSON input Jan 29 14:04:18 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:04:18 WARNING - xray log not init in config.json Jan 29 14:04:28 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:04:28 WARNING - client ip job err: open bin/config.json: no such file or directory Jan 29 14:04:28 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:04:28 WARNING - client ip job err: unexpected end of JSON input Jan 29 14:04:28 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:04:28 WARNING - xray log not init in config.json Jan 29 14:04:38 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:04:38 WARNING - client ip job err: open bin/config.json: no such file or directory Jan 29 14:04:38 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:04:38 WARNING - client ip job err: unexpected end of JSON input Jan 29 14:04:38 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:04:38 WARNING - xray log not init in config.json Jan 29 14:04:48 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:04:48 WARNING - client ip job err: open ./access.log: no such file or directory Jan 29 14:04:48 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:04:48 WARNING - client ip job err: truncate ./access.log: no such file or directory Jan 29 14:07:59 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:07:59 WARNING - stop server err: multierr: close tcp [::]:8585: use of closed network connection | Jan 29 14:08:00 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:08:00 INFO - web server run http on [::]:8585 Jan 29 14:08:14 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:08:14 WARNING - stop server err: multierr: close tcp [::]:8585: use of closed network connection | Jan 29 14:08:14 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:08:14 INFO - web server run http on [::]:8585 Jan 29 14:08:14 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:08:14 ERROR - Add NewStatsNotifyJob error[%!s()],Runtime[] invalid,wil run default Jan 29 14:08:14 Cloud-11-12-cece06 x-ui[62388]: 2023/01/29 14:08:14 INFO - Tg notify enabled,run at @daily ```
NidukaAkalanka commented 1 year ago

Hi there @mtalaeii !

As it is mentioned on the readme, the bot is fully available only for v0.2, which is an older one and lacks some features in the latest version. While recommending you to keep using the latest version, if you desperately want to experience telegram bot functions, you may consider downgrading your current installation. To do that, just put 0.2 at the end of the single command for installing/upgrading

However, I'll make the bot fully available in the next release with all these existing features.