NovaGram
NovaGram copied to clipboard
A Userbot Undefined offset: 0 Error in Utils.php on line 43
I'm using a Userbot (modified it a little bit) with latest version of NovaGram and getting this error message:
[Sun Jul 18 08:08:43.555377 2021] [php7:notice] [pid 64165] [client 185.242.180.125:35294] PHP Notice: Undefined offset: 0 in /var/www/robot/vendor/skrtdev/novagram/src/NovaGram/Utils.php on line 43
[Sun Jul 18 08:08:48.379605 2021] [php7:notice] [pid 64165] [client 185.242.180.125:35294] [2021-07-18T08:08:48.379454+07:00] NovaGram.CRITICAL: An Exception has been thrown inside internal error handling: skrtdev\\Telegram\\BadRequestException. Full exception has been printed to stdout. [] []
[Sun Jul 18 08:11:18.587280 2021] [php7:notice] [pid 63104] [client 185.242.180.125:36244] PHP Notice: Undefined offset: 0 in /var/www/robot/vendor/skrtdev/novagram/src/NovaGram/Utils.php on line 43
[Sun Jul 18 08:11:18.779592 2021] [php7:notice] [pid 63104] [client 185.242.180.125:36244] PHP Notice: Undefined offset: 0 in /var/www/robot/vendor/skrtdev/novagram/src/NovaGram/Utils.php on line 43
[Sun Jul 18 08:12:24.947972 2021] [php7:notice] [pid 63101] [client 185.242.180.125:36594] PHP Notice: Undefined offset: 0 in /var/www/robot/vendor/skrtdev/novagram/src/NovaGram/Utils.php on line 43
[Sun Jul 18 08:12:25.145462 2021] [php7:notice] [pid 63101] [client 185.242.180.125:36594] PHP Notice: Undefined offset: 0 in /var/www/robot/vendor/skrtdev/novagram/src/NovaGram/Utils.php on line 43
[Sun Jul 18 08:15:02.117104 2021] [php7:notice] [pid 63075] [client 185.242.180.125:37408] PHP Notice: Undefined offset: 0 in /var/www/robot/vendor/skrtdev/novagram/src/NovaGram/Utils.php on line 43
[Sun Jul 18 08:15:02.309639 2021] [php7:notice] [pid 63075] [client 185.242.180.125:37408] PHP Notice: Undefined offset: 0 in /var/www/robot/vendor/skrtdev/novagram/src/NovaGram/Utils.php on line 43
[Sun Jul 18 08:15:06.676806 2021] [php7:notice] [pid 63075] [client 185.242.180.125:37408] PHP Notice: Undefined offset: 0 in /var/www/robot/vendor/skrtdev/novagram/src/NovaGram/Utils.php on line 43
[Sun Jul 18 08:15:10.633559 2021] [php7:notice] [pid 63075] [client 185.242.180.125:37408] PHP Notice: Undefined offset: 0 in /var/www/robot/vendor/skrtdev/novagram/src/NovaGram/Utils.php on line 43
[Sun Jul 18 08:22:00.243235 2021] [php7:notice] [pid 64165] [client 185.242.180.125:39584] PHP Notice: Undefined offset: 0 in /var/www/robot/vendor/skrtdev/novagram/src/NovaGram/Utils.php on line 43
[Sun Jul 18 08:22:00.435600 2021] [php7:notice] [pid 64165] [client 185.242.180.125:39584] PHP Notice: Undefined offset: 0 in /var/www/robot/vendor/skrtdev/novagram/src/NovaGram/Utils.php on line 43
[Sun Jul 18 09:17:15.537236 2021] [php7:notice] [pid 64166] [client 185.242.180.125:56718] PHP Notice: Undefined offset: 0 in /var/www/robot/vendor/skrtdev/novagram/src/NovaGram/Utils.php on line 43
[Sun Jul 18 09:17:15.731295 2021] [php7:notice] [pid 64166] [client 185.242.180.125:56718] PHP Notice: Undefined offset: 0 in /var/www/robot/vendor/skrtdev/novagram/src/NovaGram/Utils.php on line 43
[Sun Jul 18 09:35:41.126093 2021] [php7:notice] [pid 63073] [client 125.164.11.83:57684] PHP Notice: Undefined offset: 0 in /var/www/robot/vendor/skrtdev/novagram/src/NovaGram/Utils.php on line 43
What could have gone wrong? Is it because the token ID is my phone number (because I'm using Userbot)?
What version of tdlight bot api are you using? If you’re using a public instance, which one are you using?
What version of tdlight bot api are you using? If you’re using a public instance, which one are you using?
I'm using the server offered here https://tdlight-team.github.io/tdlight-telegram-bot-api
Computed URL:https://botapi.giuseppem99.xyz/bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
I replaced the token with the content of .token file generated by NovaGram in my script directory. Set the webhook by https://botapi.giuseppem99.xyz/user123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11/setWebhook?url=https://xxxxx/mybot.php and successfully set, getWebhookInfo also giving me proper result:
{
"ok": true,
"result": {
"url": "https://xxxxx/mybot.php",
"has_custom_certificate": false,
"pending_update_count": 0,
"max_connections": 100,
"ip_address": "xxx.xxx.x.xx",
"allowed_updates": [
"message"
]
}
}
@soulhd Well ok, I’ll fix it in v2.0, user tokens are different. However, when you log in using novagram, webhook is automatically set, so you don’t have to manually set it. Does bot work even with this error?
@soulhd Well ok, I’ll fix it in v2.0, user tokens are different. However, when you log in using novagram, webhook is automatically set, so you don’t have to manually set it.
I see. OK, I'll watch for an update and report it to you.
Does bot work even with this error?
It's working even errors reported. But I'm getting double replies when communicating with the bot in group or private message. I don't know whether or not it is affected by the errors or by something else.
@soulhd Probably you set webhook two times, check if there are two instances of bot api logged in your account. Telegram Settings -> devices
@soulhd Probably you set webhook two times, check if there are two instances of bot api logged in your account. Telegram Settings -> devices
Wonderful, you're my hero!! Been looking for the problem all this day, google didn't even mention about this when I search for "bot double reply" :)
@soulhd Nothing. I’ll close issue when I’ll fix it in v2
got it. is there any telegram group/channel of yours which I can participate?
@soulhd Yes, it’s mentioned in readme