You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I am experiencing an issue where my Telegram session frequently logs out when running on a Google Cloud VM (static IP) using GramJS. Every time I log in, Telegram detects the login attempt as potentially malicious and forcibly logs me out after a short period.
I suspect this is happening because Telegram flags Google Cloud IPs as untrusted due to potential abuse. This does not happen when running the same code on a local machine or a different cloud provider.
Steps to Reproduce
Deploy a Node.js server using GramJS on a Google Cloud VM (Europe region, static IP)
Authenticate a Telegram user session
Perform basic API calls (e.g., client.getMe())
After some time, Telegram forcefully logs out the session
Expected Behavior
The session should remain active unless manually logged out
Telegram should not falsely flag the session as malicious
Observed Behavior
Telegram frequently logs out the session, treating it as an unauthorized login
Logging in multiple times creates multiple session files, even though I am using session persistence
Additional Information
GramJS Version: 2.17.4
Node.js Version: v16.14.2
OS: Ubuntu 22.04.5 LTS (Google Cloud VM)
Google Cloud Region: europe-west1-b
Static IP: Yes
Troubleshooting Attempts
✅ Tested the same setup on a local machine (works fine)
✅ Tried using a different cloud provider (works fine)
✅ Changed the session file storage method (issue persists)
✅ Contacted Telegram support (awaiting response)
✅ I also tried adding parameters such as deviceModel, systemVersion, appVersion
Description
I am experiencing an issue where my Telegram session frequently logs out when running on a Google Cloud VM (static IP) using GramJS. Every time I log in, Telegram detects the login attempt as potentially malicious and forcibly logs me out after a short period.
I suspect this is happening because Telegram flags Google Cloud IPs as untrusted due to potential abuse. This does not happen when running the same code on a local machine or a different cloud provider.
Steps to Reproduce
Expected Behavior
Observed Behavior
Additional Information
Troubleshooting Attempts
✅ Tested the same setup on a local machine (works fine)
✅ Tried using a different cloud provider (works fine)
✅ Changed the session file storage method (issue persists)
✅ Contacted Telegram support (awaiting response)
✅ I also tried adding parameters such as deviceModel, systemVersion, appVersion
Questions
The text was updated successfully, but these errors were encountered: