Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ArtISTTT opened this issue Aug 5, 2023 · 4 comments

Comments

@ArtISTTT
Copy link

ArtISTTT commented Aug 5, 2023

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
Copy link
Contributor

TemaSM commented Aug 14, 2023

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
Copy link

Shuma24 commented Aug 15, 2023

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
Copy link
Contributor

TemaSM commented Aug 16, 2023

@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
Copy link
Contributor

TemaSM commented Sep 10, 2023

Closing due to lack of activity

@TemaSM TemaSM closed this as completed Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants