ZhongXiLu / NaoTomori

Discord bot that pings you when a new anime episode or manga chapter is released

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]Bot goes offline after using setProfile

newaccforhc opened this issue · comments

commented

After I used setProfile command, bot went offline and unresponsive... I checked Heroku Logs but they don't show anything about crashing.

Logs if you want (I restarted the app retried using setProfile and waited 3 hours to see if it crashes):
https://del.dog/ihingeloll

Thanks for reporting the found bugs.

I fixed your other issues, but I'm not sure if I fixed this one too. Either way, I recommend redeploying to Heroku with the new fixes. I'll try to keep an eye out for it as well and see if it's still broken.

commented

@ZhongXiLu Thanks for update.. But, now the bot stays offline forever..

Updating and running logs:
https://del.dog/othivilerr

Logs show that bot crashed several times overnight (I was asleep).. Bot was offline when I woke up.. I restarted it some time ago.. Bot didn't come online at all..

Thanks for reporting again (the logs also helped).

The bug should be fixed now. There was a problem with long lists which caused the bot to timeout and shutdown.

It might still take a while for your profile to update, but at least your bot should stay online. Also, if you haven't recreated your app on Heroku yet, please do to recreate the database, which is needed (or re-add the Heroku Postgres plugin).

commented

Okay.. Thanks...I'll recreate the app..

commented

@ZhongXiLu Looks like the bot doesn't go offline now.. But, setProfile command doesn't work (I waited for more than 4 hours).. The logs show some errors..

Logs: https://del.dog/gudufiheti

I can create new issue if you want..

@newaccforhc Did you delete the app from Heroku and added it again?

commented

I deleted the Postgres plug-in and added it again.

@newaccforhc That doesn't seem to work. It's probably the best if you create a whole new app.

commented

Okay.. Thanks!
I'll recreate the app and report back here.

commented

@ZhongXiLu Sorry I took long time to reply.. But, looks like the issue is fixed after recreating the app..
Thanks!!

Edit: just noticed that getProfile doesn't show anything. 😅

Logs:

2020-11-20T16:57:57.732371+00:00 app[worker.1]: Ignoring exception in command getProfile:
2020-11-20T16:57:57.735718+00:00 app[worker.1]: Traceback (most recent call last):
2020-11-20T16:57:57.735830+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.7/site-packages/discord/ext/commands/core.py", line 85, in wrapped
2020-11-20T16:57:57.735832+00:00 app[worker.1]:     ret = await coro(*args, **kwargs)
2020-11-20T16:57:57.735871+00:00 app[worker.1]:   File "/app/naotomori/cogs/usercog.py", line 175, in getProfile
2020-11-20T16:57:57.735873+00:00 app[worker.1]:     await ctx.send(embed=embed)
2020-11-20T16:57:57.735962+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.7/site-packages/discord/abc.py", line 891, in send
2020-11-20T16:57:57.735963+00:00 app[worker.1]:     nonce=nonce, allowed_mentions=allowed_mentions)
2020-11-20T16:57:57.735999+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.7/site-packages/discord/http.py", line 245, in request
2020-11-20T16:57:57.736000+00:00 app[worker.1]:     raise HTTPException(r, data)
2020-11-20T16:57:57.736058+00:00 app[worker.1]: discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
2020-11-20T16:57:57.736077+00:00 app[worker.1]: In embed.thumbnail.url: Not a well formed URL.
2020-11-20T16:57:57.736132+00:00 app[worker.1]: 
2020-11-20T16:57:57.736133+00:00 app[worker.1]: The above exception was the direct cause of the following exception:
2020-11-20T16:57:57.736133+00:00 app[worker.1]: 
2020-11-20T16:57:57.736168+00:00 app[worker.1]: Traceback (most recent call last):
2020-11-20T16:57:57.736235+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 903, in invoke
2020-11-20T16:57:57.736254+00:00 app[worker.1]:     await ctx.command.invoke(ctx)
2020-11-20T16:57:57.736306+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.7/site-packages/discord/ext/commands/core.py", line 855, in invoke
2020-11-20T16:57:57.736307+00:00 app[worker.1]:     await injected(*ctx.args, **ctx.kwargs)
2020-11-20T16:57:57.736341+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.7/site-packages/discord/ext/commands/core.py", line 94, in wrapped
2020-11-20T16:57:57.736342+00:00 app[worker.1]:     raise CommandInvokeError(exc) from exc
2020-11-20T16:57:57.736398+00:00 app[worker.1]: discord.ext.commands.errors.CommandInvokeError: Command raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
2020-11-20T16:57:57.736399+00:00 app[worker.1]: In embed.thumbnail.url: Not a well formed URL.

@newaccforhc I just fixed that now; there was an issue if your MyAnimeList account did not have a profile picture. Sorry for all the trouble btw. 😢

Also, Discord has changed its api recently, so you should enable PRESENCE INTENT (Privileged Gateway Intents section) on https://discordapp.com/developers/applications/me if you haven't done that already.

commented

@ZhongXiLu Thanks for the bot and quick replies...
I'll enable it now.