RealSpeaker / telegraf-session-local

Telegraf local sessions middleware with multiple supported storage types (Memory/FileSync/FileAsync/...) using lowdb
https://git.io/v7iw9
MIT License
93 stars 10 forks source link

telegraf-session-local kills my server when i am trying to connect session middleware #240

Closed ArtISTTT closed 1 year ago

ArtISTTT commented 1 year ago

Usage: bot.use((new LocalSession({ database: 'sessions.json' })).middleware())

I have a telegram bot that works great but I need to connect sessions saved locally. I connect middleware first. And my project stops working and I don't see any errors in the console

TemaSM commented 1 year ago

Hi

Please, provide more technical info about your environment - versions of nodejs, npm, OS, contents of package.json, etc. Also, it would be great if you could create a repository and upload your code to it, which I could download and test on my own to try to catch your bug.

Shuma24 commented 1 year ago

I have the same problem, I added the exact path to the file and the server stopped crashing. this.instance .use( new LocalSession({ database: '../../session_db.json', storage: LocalSession.storageFileAsync, }), ) .middleware();

TemaSM commented 1 year ago

@Shuma24 may you please send dependencies which you are using in package.json of your project?

Looks like your server simply reloads itself each time when session_db.json file modified. This case pretty much similar to #186

TemaSM commented 1 year ago

Closing due to lack of activity