synzen / MonitoRSS

MonitoRSS RSS bot (formerly known as Discord.RSS) with customizable feeds. https://monitorss.xyz
https://monitorss.xyz
MIT License
1.07k stars 238 forks source link

Unable to restore, TypeError: Cannot read property 'id' of undefined #138

Closed NicolasFR closed 4 years ago

NicolasFR commented 4 years ago

Hi I've been using it for 6 months without any problems. But lately when I restart the service I see the following lines in the logs: [21:30:00.121] General Info | No custom schedules found in settings/schedules folder [21:30:01.067] General Success | Discord.RSS has logged in as "RSS" (ID 0000000) [21:30:01.069] General Info | Commands have been enabled. [21:30:01.069] General Info | Database URI ./sources detected as a folder URI [21:30:01.093] INIT Info | Unable to restore 620861222681706496 (TypeError: Cannot read property 'id' of undefined) The file contains the field id And it no longer posts new articles in Discord.

synzen commented 4 years ago

There should be a file at sources/backup/620861222681706496.json - try moving that up a directory into into sources/620861222681706496.json

NicolasFR commented 4 years ago

It works, thank you. Out of curiosity why? I don't remember having a file here.

synzen commented 4 years ago

Files are moved to the backup folder when the bot no longer sees a server/guild (when it kicks the bot, or when an issue happens that causes the bot to think it left). It tries to restore it when it sees it again, but your issue was a bug which is fixed now)