ваше сообщение коммита

This commit is contained in:
2025-06-19 15:24:27 +03:00
parent 47a6d8593a
commit 8301ebb6bd
27 changed files with 1851 additions and 4305 deletions

View File

@@ -163,7 +163,7 @@ app.use((req, res, next) => {
app.use('/api/tables', tablesRoutes); // ДОЛЖНО БЫТЬ ВЫШЕ!
// app.use('/api', identitiesRoutes);
app.use('/api/auth', authRoutes);
app.use('/api/users/:userId/tags', userTagsRoutes);
app.use('/api/users', userTagsRoutes);
app.use('/api/users', usersRoutes);
app.use('/api/chat', chatRoutes);
app.use('/api/admin', adminRoutes);

File diff suppressed because it is too large Load Diff

View File

@@ -1,403 +1,51 @@
{"level":"error","message":"Health check failed: aiAssistant.checkHealth is not a function","stack":"TypeError: aiAssistant.checkHealth is not a function\n at /app/app.js:203:40\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-06-06T11:22:41.762Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T11:27:40.281Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T11:27:40.282Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T11:27:40.282Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T11:27:40.282Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T11:27:40.282Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T11:27:40.282Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T11:27:40.283Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T11:27:40.283Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T11:27:40.283Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T11:27:40.284Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T11:27:40.284Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T11:27:40.285Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T11:27:40.285Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T11:27:40.285Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T11:27:40.286Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T11:27:40.286Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T11:51:12.394Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T11:51:12.395Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T11:51:12.395Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T11:51:12.395Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T12:11:50.583Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:11:50.583Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:11:50.583Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:11:50.584Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:11:50.584Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:11:50.584Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:11:50.584Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:11:50.585Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T12:13:19.843Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:13:19.844Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:13:19.844Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:13:19.845Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T12:13:35.543Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:13:35.543Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:19:37.226Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:19:37.228Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:19:37.228Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:19:37.228Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:19:37.229Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:19:37.229Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:19:37.229Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:19:37.230Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:19:37.230Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:19:37.230Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:19:37.230Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:19:37.230Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:19:37.231Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:19:37.231Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:19:37.231Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:19:37.232Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:20:43.909Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:20:43.910Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:20:43.910Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:21:06.548Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T12:27:58.901Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:27:58.901Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:27:58.902Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:27:58.902Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T12:31:43.792Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:31:43.793Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:31:43.794Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T12:33:16.180Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:33:16.181Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T12:33:31.377Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T12:42:37.316Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:42:37.317Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:42:37.317Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:42:37.317Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:42:37.317Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:42:37.318Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:42:37.318Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:42:37.318Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:42:37.318Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T12:44:50.653Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:44:50.654Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:44:50.654Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:44:50.654Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:44:50.654Z"}
{"level":"error","message":"Uncaught Exception: Cannot set properties of undefined (setting 'name')","stack":"TypeError: Cannot set properties of undefined (setting 'name')\n at Connection.<anonymous> (/app/node_modules/imap/lib/Connection.js:431:22)\n at Connection._resTagged (/app/node_modules/imap/lib/Connection.js:1535:22)\n at Parser.<anonymous> (/app/node_modules/imap/lib/Connection.js:194:10)\n at Parser.emit (node:events:524:28)\n at Parser._resTagged (/app/node_modules/imap/lib/Parser.js:175:10)\n at Parser._parse (/app/node_modules/imap/lib/Parser.js:139:16)\n at Parser._tryread (/app/node_modules/imap/lib/Parser.js:82:15)\n at Parser._cbReadable (/app/node_modules/imap/lib/Parser.js:53:12)\n at TLSSocket.emit (node:events:524:28)\n at emitReadable_ (node:internal/streams/readable:834:12)","timestamp":"2025-06-06T12:45:05.178Z"}
{"level":"error","message":"Uncaught Exception: Cannot read properties of undefined (reading 'type')","stack":"TypeError: Cannot read properties of undefined (reading 'type')\n at Connection._resUntagged (/app/node_modules/imap/lib/Connection.js:1265:52)\n at Parser.<anonymous> (/app/node_modules/imap/lib/Connection.js:191:10)\n at Parser.emit (node:events:524:28)\n at Parser._resUntagged (/app/node_modules/imap/lib/Parser.js:271:10)\n at Parser._parse (/app/node_modules/imap/lib/Parser.js:137:16)\n at Parser._tryread (/app/node_modules/imap/lib/Parser.js:82:15)\n at Parser._cbReadable (/app/node_modules/imap/lib/Parser.js:53:12)\n at TLSSocket.emit (node:events:524:28)\n at emitReadable_ (node:internal/streams/readable:834:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:81:21)","timestamp":"2025-06-06T12:45:05.253Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T12:45:06.304Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:45:06.304Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:45:06.304Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T12:56:52.112Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:56:52.113Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:56:52.113Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:56:52.114Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T12:56:52.114Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T13:16:39.932Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:16:39.934Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:16:39.934Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:16:39.935Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:16:39.935Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:16:39.935Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:16:39.935Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:16:39.936Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:16:39.936Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T13:31:16.692Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:31:16.694Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:31:16.694Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.400Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.401Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.402Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.402Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.402Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.403Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.403Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.403Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.403Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.404Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.404Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.404Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.404Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.404Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.405Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.405Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.405Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.405Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.405Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.406Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.406Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T13:42:42.406Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T13:50:53.704Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T13:51:09.094Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T13:51:27.610Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T14:01:22.788Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:01:22.789Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:01:22.790Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T14:06:56.099Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:06:56.100Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:06:56.100Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:06:56.101Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:06:56.101Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:06:56.101Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:06:56.101Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:06:56.101Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:06:56.101Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:06:56.101Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:06:56.102Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T14:07:15.119Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:07:15.121Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:07:15.121Z"}
{"level":"error","message":"Uncaught Exception: Timed out while connecting to server","source":"timeout","stack":"Error: Timed out while connecting to server\n at Timeout._onTimeout (/app/node_modules/imap/lib/Connection.js:280:15)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)","timestamp":"2025-06-06T14:07:19.958Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:08:21.808Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:08:21.809Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:08:21.809Z"}
{"level":"error","message":"Uncaught Exception: Timed out while connecting to server","source":"timeout","stack":"Error: Timed out while connecting to server\n at Timeout._onTimeout (/app/node_modules/imap/lib/Connection.js:280:15)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)","timestamp":"2025-06-06T14:08:26.609Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:09:28.466Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:09:28.467Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:09:28.467Z"}
{"level":"error","message":"Uncaught Exception: Timed out while connecting to server","source":"timeout","stack":"Error: Timed out while connecting to server\n at Timeout._onTimeout (/app/node_modules/imap/lib/Connection.js:280:15)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)","timestamp":"2025-06-06T14:09:33.273Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:10:35.153Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:10:35.153Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:10:35.153Z"}
{"level":"error","message":"Uncaught Exception: Timed out while connecting to server","source":"timeout","stack":"Error: Timed out while connecting to server\n at Timeout._onTimeout (/app/node_modules/imap/lib/Connection.js:280:15)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)","timestamp":"2025-06-06T14:10:39.949Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:11:41.799Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:11:41.799Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:11:41.799Z"}
{"level":"error","message":"Uncaught Exception: Timed out while connecting to server","source":"timeout","stack":"Error: Timed out while connecting to server\n at Timeout._onTimeout (/app/node_modules/imap/lib/Connection.js:280:15)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)","timestamp":"2025-06-06T14:11:46.592Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:12:48.429Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:12:48.429Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:12:48.430Z"}
{"level":"error","message":"Uncaught Exception: Timed out while connecting to server","source":"timeout","stack":"Error: Timed out while connecting to server\n at Timeout._onTimeout (/app/node_modules/imap/lib/Connection.js:280:15)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)","timestamp":"2025-06-06T14:12:53.264Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:13:36.092Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:13:55.112Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:13:55.112Z"}
{"level":"error","message":"Uncaught Exception: Timed out while connecting to server","source":"timeout","stack":"Error: Timed out while connecting to server\n at Timeout._onTimeout (/app/node_modules/imap/lib/Connection.js:280:15)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)","timestamp":"2025-06-06T14:13:59.940Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:14:42.744Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:15:01.762Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:15:01.763Z"}
{"level":"error","message":"Uncaught Exception: Timed out while connecting to server","source":"timeout","stack":"Error: Timed out while connecting to server\n at Timeout._onTimeout (/app/node_modules/imap/lib/Connection.js:280:15)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)","timestamp":"2025-06-06T14:15:06.603Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:16:08.430Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:16:08.430Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:16:08.431Z"}
{"level":"error","message":"Uncaught Exception: Timed out while connecting to server","source":"timeout","stack":"Error: Timed out while connecting to server\n at Timeout._onTimeout (/app/node_modules/imap/lib/Connection.js:280:15)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)","timestamp":"2025-06-06T14:16:13.273Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:17:15.167Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:17:15.168Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:17:15.168Z"}
{"level":"error","message":"Uncaught Exception: Timed out while connecting to server","source":"timeout","stack":"Error: Timed out while connecting to server\n at Timeout._onTimeout (/app/node_modules/imap/lib/Connection.js:280:15)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)","timestamp":"2025-06-06T14:17:19.959Z"}
{"level":"error","message":"IMAP connection error during check: This socket has been ended by the other party","timestamp":"2025-06-06T14:18:10.747Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:18:21.814Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:18:21.815Z"}
{"level":"error","message":"Uncaught Exception: Timed out while connecting to server","source":"timeout","stack":"Error: Timed out while connecting to server\n at Timeout._onTimeout (/app/node_modules/imap/lib/Connection.js:280:15)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)","timestamp":"2025-06-06T14:18:26.613Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:19:28.450Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:19:28.450Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:19:28.450Z"}
{"level":"error","message":"Uncaught Exception: Timed out while authenticating with server","source":"timeout-auth","stack":"Error: Timed out while authenticating with server\n at Timeout._onTimeout (/app/node_modules/imap/lib/Connection.js:139:17)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)","timestamp":"2025-06-06T14:19:28.451Z"}
{"level":"error","message":"Uncaught Exception: Timed out while connecting to server","source":"timeout","stack":"Error: Timed out while connecting to server\n at Timeout._onTimeout (/app/node_modules/imap/lib/Connection.js:280:15)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)","timestamp":"2025-06-06T14:19:33.290Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:20:16.070Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:20:35.440Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:20:35.440Z"}
{"level":"error","message":"Uncaught Exception: Timed out while connecting to server","source":"timeout","stack":"Error: Timed out while connecting to server\n at Timeout._onTimeout (/app/node_modules/imap/lib/Connection.js:280:15)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)","timestamp":"2025-06-06T14:20:39.962Z"}
{"action":"call","code":"CALL_EXCEPTION","data":null,"info":{"error":{"code":19,"message":"Unable to perform request"},"payload":{"id":2,"jsonrpc":"2.0","method":"eth_call","params":[{"data":"0x70a08231000000000000000000000000f45aa4917b3775ba37f48aeb3dc1a943561e9e0b","to":"0x351f59de4fedbdf7601f5592b93db3b9330c1c1d"},"latest"]}},"invocation":null,"level":"error","message":"[getUserTokenBalances] Ошибка получения баланса для HB3A (0x351f59de4fedbdf7601f5592b93db3b9330c1c1d) в сети polygon: missing revert data (action=\"call\", data=null, reason=null, transaction={ \"data\": \"0x70a08231000000000000000000000000f45aa4917b3775ba37f48aeb3dc1a943561e9e0b\", \"to\": \"0x351F59dE4FEdBDf7601F5592B93db3B9330c1C1d\" }, invocation=null, revert=null, code=CALL_EXCEPTION, version=6.13.5)","reason":null,"revert":null,"shortMessage":"missing revert data","stack":"Error: missing revert data (action=\"call\", data=null, reason=null, transaction={ \"data\": \"0x70a08231000000000000000000000000f45aa4917b3775ba37f48aeb3dc1a943561e9e0b\", \"to\": \"0x351F59dE4FEdBDf7601F5592B93db3B9330c1C1d\" }, invocation=null, revert=null, code=CALL_EXCEPTION, version=6.13.5)\n at makeError (/app/node_modules/ethers/lib.commonjs/utils/errors.js:129:21)\n at getBuiltinCallException (/app/node_modules/ethers/lib.commonjs/abi/abi-coder.js:105:37)\n at AbiCoder.getBuiltinCallException (/app/node_modules/ethers/lib.commonjs/abi/abi-coder.js:206:16)\n at JsonRpcProvider.getRpcError (/app/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js:676:43)\n at /app/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js:302:45\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-06-06T14:23:08.115Z","transaction":{"data":"0x70a08231000000000000000000000000f45aa4917b3775ba37f48aeb3dc1a943561e9e0b","to":"0x351F59dE4FEdBDf7601F5592B93db3B9330c1C1d"}}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T14:27:40.947Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:27:40.948Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:27:40.948Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:27:40.948Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T14:35:11.266Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:35:11.267Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:35:11.268Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:35:11.268Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:35:11.268Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T14:35:30.977Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:35:30.978Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T14:36:20.123Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T14:38:41.695Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:38:41.696Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T14:41:11.916Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:41:11.918Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:41:11.919Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T14:44:31.551Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:44:31.552Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:44:31.552Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:44:31.552Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:44:31.553Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:44:31.553Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:44:31.553Z"}
{"level":"error","message":"Uncaught Exception: Not authenticated","stack":"Error: Not authenticated\n at Connection.openBox (/app/node_modules/imap/lib/Connection.js:409:11)\n at Connection.<anonymous> (/app/services/emailBot.js:98:19)\n at Object.onceWrapper (node:events:638:28)\n at Connection.emit (node:events:536:35)\n at Connection.<anonymous> (/app/node_modules/imap/lib/Connection.js:1623:12)\n at Connection._resTagged (/app/node_modules/imap/lib/Connection.js:1535:22)\n at Parser.<anonymous> (/app/node_modules/imap/lib/Connection.js:194:10)\n at Parser.emit (node:events:524:28)\n at Parser._resTagged (/app/node_modules/imap/lib/Parser.js:175:10)\n at Parser._parse (/app/node_modules/imap/lib/Parser.js:139:16)","timestamp":"2025-06-06T14:44:47.469Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T14:44:50.481Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:44:50.482Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T14:44:50.482Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T15:23:15.652Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:23:15.653Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T15:23:39.981Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T15:26:11.153Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T15:30:51.514Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:30:51.515Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:30:51.516Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:30:51.516Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:30:51.517Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T15:32:14.254Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:32:14.255Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:32:14.255Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:32:14.256Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T15:34:00.879Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T15:34:11.511Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T15:40:04.118Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T15:41:25.890Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:41:25.892Z"}
{"action":"call","code":"CALL_EXCEPTION","data":null,"info":{"error":{"code":19,"message":"Unable to perform request"},"payload":{"id":2,"jsonrpc":"2.0","method":"eth_call","params":[{"data":"0x70a08231000000000000000000000000f45aa4917b3775ba37f48aeb3dc1a943561e9e0b","to":"0x351f59de4fedbdf7601f5592b93db3b9330c1c1d"},"latest"]}},"invocation":null,"level":"error","message":"[getUserTokenBalances] Ошибка получения баланса для HB3A (0x351f59de4fedbdf7601f5592b93db3b9330c1c1d) в сети polygon: missing revert data (action=\"call\", data=null, reason=null, transaction={ \"data\": \"0x70a08231000000000000000000000000f45aa4917b3775ba37f48aeb3dc1a943561e9e0b\", \"to\": \"0x351F59dE4FEdBDf7601F5592B93db3B9330c1C1d\" }, invocation=null, revert=null, code=CALL_EXCEPTION, version=6.13.5)","reason":null,"revert":null,"shortMessage":"missing revert data","stack":"Error: missing revert data (action=\"call\", data=null, reason=null, transaction={ \"data\": \"0x70a08231000000000000000000000000f45aa4917b3775ba37f48aeb3dc1a943561e9e0b\", \"to\": \"0x351F59dE4FEdBDf7601F5592B93db3B9330c1C1d\" }, invocation=null, revert=null, code=CALL_EXCEPTION, version=6.13.5)\n at makeError (/app/node_modules/ethers/lib.commonjs/utils/errors.js:129:21)\n at getBuiltinCallException (/app/node_modules/ethers/lib.commonjs/abi/abi-coder.js:105:37)\n at AbiCoder.getBuiltinCallException (/app/node_modules/ethers/lib.commonjs/abi/abi-coder.js:206:16)\n at JsonRpcProvider.getRpcError (/app/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js:676:43)\n at /app/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js:302:45\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-06-06T15:41:52.193Z","transaction":{"data":"0x70a08231000000000000000000000000f45aa4917b3775ba37f48aeb3dc1a943561e9e0b","to":"0x351F59dE4FEdBDf7601F5592B93db3B9330c1C1d"}}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T15:45:11.851Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:45:11.853Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:45:11.853Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:45:11.853Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:45:11.854Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T15:45:30.358Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T15:45:46.777Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T15:49:13.751Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:49:13.752Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:49:13.752Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:49:13.752Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T15:51:26.862Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:51:26.863Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:51:26.864Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:51:26.864Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:51:26.864Z"}
{"level":"error","message":"Uncaught Exception: Not authenticated","stack":"Error: Not authenticated\n at Connection.openBox (/app/node_modules/imap/lib/Connection.js:409:11)\n at Connection.<anonymous> (/app/services/emailBot.js:98:19)\n at Object.onceWrapper (node:events:638:28)\n at Connection.emit (node:events:536:35)\n at Connection.<anonymous> (/app/node_modules/imap/lib/Connection.js:1623:12)\n at Connection._resTagged (/app/node_modules/imap/lib/Connection.js:1535:22)\n at Parser.<anonymous> (/app/node_modules/imap/lib/Connection.js:194:10)\n at Parser.emit (node:events:524:28)\n at Parser._resTagged (/app/node_modules/imap/lib/Parser.js:175:10)\n at Parser._parse (/app/node_modules/imap/lib/Parser.js:139:16)","timestamp":"2025-06-06T15:51:37.905Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T15:51:42.065Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:51:42.066Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:51:42.066Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:52:49.203Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:52:49.203Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:52:49.204Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:53:55.751Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:53:55.752Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:53:55.752Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T15:59:32.392Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:59:32.393Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T15:59:32.393Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T16:01:45.624Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:01:45.625Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:01:45.625Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:01:45.626Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:01:45.626Z"}
{"level":"error","message":"Uncaught Exception: Not authenticated","stack":"Error: Not authenticated\n at Connection.openBox (/app/node_modules/imap/lib/Connection.js:409:11)\n at Connection.<anonymous> (/app/services/emailBot.js:98:19)\n at Object.onceWrapper (node:events:638:28)\n at Connection.emit (node:events:536:35)\n at Connection.<anonymous> (/app/node_modules/imap/lib/Connection.js:1623:12)\n at Connection._resTagged (/app/node_modules/imap/lib/Connection.js:1535:22)\n at Parser.<anonymous> (/app/node_modules/imap/lib/Connection.js:194:10)\n at Parser.emit (node:events:524:28)\n at Parser._resTagged (/app/node_modules/imap/lib/Parser.js:175:10)\n at Parser._parse (/app/node_modules/imap/lib/Parser.js:139:16)","timestamp":"2025-06-06T16:01:59.722Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: write after end","timestamp":"2025-06-06T16:03:06.527Z"}
{"level":"error","message":"IMAP connection error during check: write after end","timestamp":"2025-06-06T16:03:06.528Z"}
{"level":"error","message":"IMAP connection error during check: write after end","timestamp":"2025-06-06T16:03:06.528Z"}
{"level":"error","message":"IMAP connection error during check: write after end","timestamp":"2025-06-06T16:03:06.528Z"}
{"level":"error","message":"IMAP connection error during check: write after end","timestamp":"2025-06-06T16:03:06.528Z"}
{"level":"error","message":"IMAP connection error during check: write after end","timestamp":"2025-06-06T16:03:06.529Z"}
{"level":"error","message":"Uncaught Exception: Cannot set properties of undefined (setting 'name')","stack":"TypeError: Cannot set properties of undefined (setting 'name')\n at Connection.<anonymous> (/app/node_modules/imap/lib/Connection.js:431:22)\n at Connection._resTagged (/app/node_modules/imap/lib/Connection.js:1535:22)\n at Parser.<anonymous> (/app/node_modules/imap/lib/Connection.js:194:10)\n at Parser.emit (node:events:524:28)\n at Parser._resTagged (/app/node_modules/imap/lib/Parser.js:175:10)\n at Parser._parse (/app/node_modules/imap/lib/Parser.js:139:16)\n at Parser._tryread (/app/node_modules/imap/lib/Parser.js:82:15)\n at Parser._cbReadable (/app/node_modules/imap/lib/Parser.js:53:12)\n at TLSSocket.emit (node:events:524:28)\n at emitReadable_ (node:internal/streams/readable:834:12)","timestamp":"2025-06-06T16:04:16.901Z"}
{"level":"error","message":"Uncaught Exception: Cannot read properties of undefined (reading 'type')","stack":"TypeError: Cannot read properties of undefined (reading 'type')\n at Connection._resUntagged (/app/node_modules/imap/lib/Connection.js:1265:52)\n at Parser.<anonymous> (/app/node_modules/imap/lib/Connection.js:191:10)\n at Parser.emit (node:events:524:28)\n at Parser._resUntagged (/app/node_modules/imap/lib/Parser.js:271:10)\n at Parser._parse (/app/node_modules/imap/lib/Parser.js:137:16)\n at Parser._tryread (/app/node_modules/imap/lib/Parser.js:82:15)\n at Parser._cbReadable (/app/node_modules/imap/lib/Parser.js:53:12)\n at TLSSocket.emit (node:events:524:28)\n at emitReadable_ (node:internal/streams/readable:834:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:81:21)","timestamp":"2025-06-06T16:04:16.966Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:04:17.544Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:04:17.544Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:04:17.544Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:05:24.325Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:05:24.325Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:05:24.325Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:06:31.651Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:06:31.651Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:06:31.651Z"}
{"level":"error","message":"Uncaught Exception: Timed out while connecting to server","source":"timeout","stack":"Error: Timed out while connecting to server\n at Timeout._onTimeout (/app/node_modules/imap/lib/Connection.js:280:15)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)","timestamp":"2025-06-06T16:06:35.520Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:07:37.475Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:07:37.476Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:07:37.477Z"}
{"level":"error","message":"Uncaught Exception: Cannot set properties of undefined (setting 'name')","stack":"TypeError: Cannot set properties of undefined (setting 'name')\n at Connection.<anonymous> (/app/node_modules/imap/lib/Connection.js:431:22)\n at Connection._resTagged (/app/node_modules/imap/lib/Connection.js:1535:22)\n at Parser.<anonymous> (/app/node_modules/imap/lib/Connection.js:194:10)\n at Parser.emit (node:events:524:28)\n at Parser._resTagged (/app/node_modules/imap/lib/Parser.js:175:10)\n at Parser._parse (/app/node_modules/imap/lib/Parser.js:139:16)\n at Parser._tryread (/app/node_modules/imap/lib/Parser.js:82:15)\n at Parser._cbReadable (/app/node_modules/imap/lib/Parser.js:53:12)\n at TLSSocket.emit (node:events:524:28)\n at emitReadable_ (node:internal/streams/readable:834:12)","timestamp":"2025-06-06T16:08:43.177Z"}
{"level":"error","message":"Uncaught Exception: Cannot read properties of undefined (reading 'type')","stack":"TypeError: Cannot read properties of undefined (reading 'type')\n at Connection._resUntagged (/app/node_modules/imap/lib/Connection.js:1265:52)\n at Parser.<anonymous> (/app/node_modules/imap/lib/Connection.js:191:10)\n at Parser.emit (node:events:524:28)\n at Parser._resUntagged (/app/node_modules/imap/lib/Parser.js:271:10)\n at Parser._parse (/app/node_modules/imap/lib/Parser.js:137:16)\n at Parser._tryread (/app/node_modules/imap/lib/Parser.js:82:15)\n at Parser._cbReadable (/app/node_modules/imap/lib/Parser.js:53:12)\n at TLSSocket.emit (node:events:524:28)\n at emitReadable_ (node:internal/streams/readable:834:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:81:21)","timestamp":"2025-06-06T16:08:43.255Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:08:43.800Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:08:43.801Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:08:43.801Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:09:50.434Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:09:50.435Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:09:50.435Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:10:56.888Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:10:56.889Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:10:56.889Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:11:44.588Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:12:51.215Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:12:51.215Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:12:51.215Z"}
{"level":"error","message":"Uncaught Exception: Cannot read properties of undefined (reading 'type')","stack":"TypeError: Cannot read properties of undefined (reading 'type')\n at Connection._resUntagged (/app/node_modules/imap/lib/Connection.js:1265:52)\n at Parser.<anonymous> (/app/node_modules/imap/lib/Connection.js:191:10)\n at Parser.emit (node:events:524:28)\n at Parser._resUntagged (/app/node_modules/imap/lib/Parser.js:271:10)\n at Parser._parse (/app/node_modules/imap/lib/Parser.js:137:16)\n at Parser._tryread (/app/node_modules/imap/lib/Parser.js:82:15)\n at Parser._cbReadable (/app/node_modules/imap/lib/Parser.js:53:12)\n at TLSSocket.emit (node:events:524:28)\n at emitReadable_ (node:internal/streams/readable:834:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:81:21)","timestamp":"2025-06-06T16:13:05.376Z"}
{"level":"error","message":"Uncaught Exception: Cannot set properties of undefined (setting 'name')","stack":"TypeError: Cannot set properties of undefined (setting 'name')\n at Connection.<anonymous> (/app/node_modules/imap/lib/Connection.js:431:22)\n at Connection._resTagged (/app/node_modules/imap/lib/Connection.js:1535:22)\n at Parser.<anonymous> (/app/node_modules/imap/lib/Connection.js:194:10)\n at Parser.emit (node:events:524:28)\n at Parser._resTagged (/app/node_modules/imap/lib/Parser.js:175:10)\n at Parser._parse (/app/node_modules/imap/lib/Parser.js:139:16)\n at Parser._tryread (/app/node_modules/imap/lib/Parser.js:82:15)\n at Parser._cbReadable (/app/node_modules/imap/lib/Parser.js:53:12)\n at TLSSocket.emit (node:events:524:28)\n at emitReadable_ (node:internal/streams/readable:834:12)","timestamp":"2025-06-06T16:14:16.058Z"}
{"level":"error","message":"Uncaught Exception: Cannot read properties of undefined (reading 'type')","stack":"TypeError: Cannot read properties of undefined (reading 'type')\n at Connection._resUntagged (/app/node_modules/imap/lib/Connection.js:1265:52)\n at Parser.<anonymous> (/app/node_modules/imap/lib/Connection.js:191:10)\n at Parser.emit (node:events:524:28)\n at Parser._resUntagged (/app/node_modules/imap/lib/Parser.js:271:10)\n at Parser._parse (/app/node_modules/imap/lib/Parser.js:137:16)\n at Parser._tryread (/app/node_modules/imap/lib/Parser.js:82:15)\n at Parser._cbReadable (/app/node_modules/imap/lib/Parser.js:53:12)\n at TLSSocket.emit (node:events:524:28)\n at emitReadable_ (node:internal/streams/readable:834:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:81:21)","timestamp":"2025-06-06T16:14:16.134Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:14:16.653Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:14:16.653Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:14:16.653Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:14:16.653Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:14:16.654Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:15:23.313Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:15:23.314Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:15:23.314Z"}
{"level":"error","message":"Uncaught Exception: Cannot set properties of undefined (setting 'name')","stack":"TypeError: Cannot set properties of undefined (setting 'name')\n at Connection.<anonymous> (/app/node_modules/imap/lib/Connection.js:431:22)\n at Connection._resTagged (/app/node_modules/imap/lib/Connection.js:1535:22)\n at Parser.<anonymous> (/app/node_modules/imap/lib/Connection.js:194:10)\n at Parser.emit (node:events:524:28)\n at Parser._resTagged (/app/node_modules/imap/lib/Parser.js:175:10)\n at Parser._parse (/app/node_modules/imap/lib/Parser.js:139:16)\n at Parser._tryread (/app/node_modules/imap/lib/Parser.js:82:15)\n at Parser._cbReadable (/app/node_modules/imap/lib/Parser.js:53:12)\n at TLSSocket.emit (node:events:524:28)\n at emitReadable_ (node:internal/streams/readable:834:12)","timestamp":"2025-06-06T16:16:29.015Z"}
{"level":"error","message":"Uncaught Exception: Cannot read properties of undefined (reading 'type')","stack":"TypeError: Cannot read properties of undefined (reading 'type')\n at Connection._resUntagged (/app/node_modules/imap/lib/Connection.js:1265:52)\n at Parser.<anonymous> (/app/node_modules/imap/lib/Connection.js:191:10)\n at Parser.emit (node:events:524:28)\n at Parser._resUntagged (/app/node_modules/imap/lib/Parser.js:271:10)\n at Parser._parse (/app/node_modules/imap/lib/Parser.js:137:16)\n at Parser._tryread (/app/node_modules/imap/lib/Parser.js:82:15)\n at Parser._cbReadable (/app/node_modules/imap/lib/Parser.js:53:12)\n at TLSSocket.emit (node:events:524:28)\n at emitReadable_ (node:internal/streams/readable:834:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:81:21)","timestamp":"2025-06-06T16:16:29.080Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:16:29.678Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:16:29.679Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:16:29.679Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T16:18:22.613Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:18:22.614Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:18:22.614Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T16:18:41.102Z"}
{"action":"call","code":"CALL_EXCEPTION","data":null,"info":{"error":{"code":19,"message":"Unable to perform request"},"payload":{"id":2,"jsonrpc":"2.0","method":"eth_call","params":[{"data":"0x70a08231000000000000000000000000f45aa4917b3775ba37f48aeb3dc1a943561e9e0b","to":"0x351f59de4fedbdf7601f5592b93db3b9330c1c1d"},"latest"]}},"invocation":null,"level":"error","message":"[getUserTokenBalances] Ошибка получения баланса для HB3A (0x351f59de4fedbdf7601f5592b93db3b9330c1c1d) в сети polygon: missing revert data (action=\"call\", data=null, reason=null, transaction={ \"data\": \"0x70a08231000000000000000000000000f45aa4917b3775ba37f48aeb3dc1a943561e9e0b\", \"to\": \"0x351F59dE4FEdBDf7601F5592B93db3B9330c1C1d\" }, invocation=null, revert=null, code=CALL_EXCEPTION, version=6.13.5)","reason":null,"revert":null,"shortMessage":"missing revert data","stack":"Error: missing revert data (action=\"call\", data=null, reason=null, transaction={ \"data\": \"0x70a08231000000000000000000000000f45aa4917b3775ba37f48aeb3dc1a943561e9e0b\", \"to\": \"0x351F59dE4FEdBDf7601F5592B93db3B9330c1C1d\" }, invocation=null, revert=null, code=CALL_EXCEPTION, version=6.13.5)\n at makeError (/app/node_modules/ethers/lib.commonjs/utils/errors.js:129:21)\n at getBuiltinCallException (/app/node_modules/ethers/lib.commonjs/abi/abi-coder.js:105:37)\n at AbiCoder.getBuiltinCallException (/app/node_modules/ethers/lib.commonjs/abi/abi-coder.js:206:16)\n at JsonRpcProvider.getRpcError (/app/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js:676:43)\n at /app/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js:302:45\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-06-06T16:23:47.035Z","transaction":{"data":"0x70a08231000000000000000000000000f45aa4917b3775ba37f48aeb3dc1a943561e9e0b","to":"0x351F59dE4FEdBDf7601F5592B93db3B9330c1C1d"}}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T16:24:32.962Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:24:32.962Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:24:32.962Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:24:32.963Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:24:32.963Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:24:32.963Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:24:32.963Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:24:32.963Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:24:32.963Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:24:32.964Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:24:32.964Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:24:32.964Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:25:01.722Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:31:40.820Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:31:40.820Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:31:40.821Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:31:40.821Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:31:40.821Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:31:40.821Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:31:40.822Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:31:40.822Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:31:40.822Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:31:40.822Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:31:40.822Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:31:40.823Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:32:47.267Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:32:47.268Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:39:26.370Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:39:26.370Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:39:26.371Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:39:26.371Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:39:26.371Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:39:26.372Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:39:26.372Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:39:26.372Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:39:26.372Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:39:26.372Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:39:26.372Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:39:26.373Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T16:39:51.521Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T16:41:16.923Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:41:16.924Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:41:16.924Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T16:42:23.404Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:42:23.405Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:42:23.405Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T16:44:30.897Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:44:30.898Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T16:44:53.409Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:44:53.409Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T16:48:31.770Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:48:31.770Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:48:31.770Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:48:31.771Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:48:31.771Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:48:31.771Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:48:31.771Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:48:31.772Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:48:31.772Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:48:31.772Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:48:31.772Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T16:51:24.141Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:51:24.142Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:51:24.143Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T16:51:43.476Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T16:52:02.438Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:52:02.441Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-06T16:53:08.864Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:53:08.865Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-06T16:53:08.865Z"}
{"level":"error","message":"Директория /home/alex/DApp-for-Business/backend/temp недоступна для записи: EACCES: permission denied, open '/home/alex/DApp-for-Business/backend/temp/.write-test'","timestamp":"2025-06-18T19:10:58.515Z"}
{"address":"::","code":"EADDRINUSE","errno":-98,"level":"error","message":"Uncaught Exception: listen EADDRINUSE: address already in use :::8000","port":8000,"stack":"Error: listen EADDRINUSE: address already in use :::8000\n at Server.setupListenHandle [as _listen2] (node:net:1908:16)\n at listenInCluster (node:net:1965:12)\n at Server.listen (node:net:2067:7)\n at Object.<anonymous> (/home/alex/DApp-for-Business/backend/server.js:47:8)\n at Module._compile (node:internal/modules/cjs/loader:1469:14)\n at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)\n at Module.load (node:internal/modules/cjs/loader:1288:32)\n at Module._load (node:internal/modules/cjs/loader:1104:12)\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:173:12)\n at node:internal/main/run_main_module:28:49","syscall":"listen","timestamp":"2025-06-18T19:10:59.390Z"}
{"code":"EAI_AGAIN","errno":-3001,"hostname":"postgres","level":"error","message":"Unhandled Rejection: getaddrinfo EAI_AGAIN postgres","stack":"Error: getaddrinfo EAI_AGAIN postgres\n at /home/alex/DApp-for-Business/backend/node_modules/pg-pool/index.js:45:11\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async reinitPoolFromDbSettings (/home/alex/DApp-for-Business/backend/db.js:50:17)","syscall":"getaddrinfo","timestamp":"2025-06-18T19:11:11.251Z"}
{"level":"error","message":"Директория /home/alex/DApp-for-Business/backend/temp недоступна для записи: EACCES: permission denied, open '/home/alex/DApp-for-Business/backend/temp/.write-test'","timestamp":"2025-06-18T19:14:27.087Z"}
{"address":"::","code":"EADDRINUSE","errno":-98,"level":"error","message":"Uncaught Exception: listen EADDRINUSE: address already in use :::8000","port":8000,"stack":"Error: listen EADDRINUSE: address already in use :::8000\n at Server.setupListenHandle [as _listen2] (node:net:1908:16)\n at listenInCluster (node:net:1965:12)\n at Server.listen (node:net:2067:7)\n at Object.<anonymous> (/home/alex/DApp-for-Business/backend/server.js:47:8)\n at Module._compile (node:internal/modules/cjs/loader:1469:14)\n at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)\n at Module.load (node:internal/modules/cjs/loader:1288:32)\n at Module._load (node:internal/modules/cjs/loader:1104:12)\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:173:12)\n at node:internal/main/run_main_module:28:49","syscall":"listen","timestamp":"2025-06-18T19:14:27.414Z"}
{"code":"EAI_AGAIN","errno":-3001,"hostname":"postgres","level":"error","message":"Unhandled Rejection: getaddrinfo EAI_AGAIN postgres","stack":"Error: getaddrinfo EAI_AGAIN postgres\n at /home/alex/DApp-for-Business/backend/node_modules/pg-pool/index.js:45:11\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async reinitPoolFromDbSettings (/home/alex/DApp-for-Business/backend/db.js:50:17)","syscall":"getaddrinfo","timestamp":"2025-06-18T19:14:40.959Z"}
{"level":"error","message":"Директория /home/alex/DApp-for-Business/backend/temp недоступна для записи: EACCES: permission denied, open '/home/alex/DApp-for-Business/backend/temp/.write-test'","timestamp":"2025-06-18T19:16:21.596Z"}
{"code":"EAI_AGAIN","errno":-3001,"hostname":"postgres","level":"error","message":"Unhandled Rejection: getaddrinfo EAI_AGAIN postgres","stack":"Error: getaddrinfo EAI_AGAIN postgres\n at /home/alex/DApp-for-Business/backend/node_modules/pg-pool/index.js:45:11\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async reinitPoolFromDbSettings (/home/alex/DApp-for-Business/backend/db.js:50:17)","syscall":"getaddrinfo","timestamp":"2025-06-18T19:16:35.178Z"}
{"ip":"::1","level":"error","message":"Error: getaddrinfo EAI_AGAIN postgres","method":"GET","stack":"Error: getaddrinfo EAI_AGAIN postgres\n at /home/alex/DApp-for-Business/backend/node_modules/pg-pool/index.js:45:11\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async PGStore._asyncQuery (/home/alex/DApp-for-Business/backend/node_modules/connect-pg-simple/index.js:322:21)","timestamp":"2025-06-18T19:16:44.984Z","url":"/api/auth/identities"}
{"ip":"::1","level":"error","message":"Error: getaddrinfo EAI_AGAIN postgres","method":"GET","stack":"Error: getaddrinfo EAI_AGAIN postgres\n at /home/alex/DApp-for-Business/backend/node_modules/pg-pool/index.js:45:11\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async PGStore._asyncQuery (/home/alex/DApp-for-Business/backend/node_modules/connect-pg-simple/index.js:322:21)","timestamp":"2025-06-18T19:17:33.983Z","url":"/api/auth/identities"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-18T19:24:31.727Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-18T19:24:31.728Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-18T19:24:47.815Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-18T19:24:47.817Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-18T19:25:01.594Z"}
{"code":"23505","constraint":"user_identities_provider_provider_id_key","detail":"Key (provider, provider_id)=(email, avtarabanov@gmail.com) already exists.","file":"nbtinsert.c","length":296,"level":"error","line":"666","message":"[IdentityService] Error saving identity email:avtarabanov@gmail.com for user 99: duplicate key value violates unique constraint \"user_identities_provider_provider_id_key\"","name":"error","routine":"_bt_check_unique","schema":"public","severity":"ERROR","stack":"error: duplicate key value violates unique constraint \"user_identities_provider_provider_id_key\"\n at /app/node_modules/pg-pool/index.js:45:11\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async IdentityService.saveIdentity (/app/services/identity-service.js:124:9)\n at async IdentityService.findOrCreateUserWithRole (/app/services/identity-service.js:544:7)\n at async /app/services/emailBot.js:140:48","table":"user_identities","timestamp":"2025-06-18T19:25:16.580Z"}
{"code":"23503","constraint":"messages_user_id_fkey","detail":"Key (user_id)=(99) is not present in table \"users\".","file":"ri_triggers.c","length":255,"level":"error","line":"2608","message":"Error processing incoming email: insert or update on table \"messages\" violates foreign key constraint \"messages_user_id_fkey\"","name":"error","routine":"ri_ReportViolation","schema":"public","severity":"ERROR","stack":"error: insert or update on table \"messages\" violates foreign key constraint \"messages_user_id_fkey\"\n at /app/node_modules/pg-pool/index.js:45:11\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async /app/services/emailBot.js:167:23","table":"messages","timestamp":"2025-06-18T19:27:06.840Z"}
{"code":"EPROTOCOL","command":"CONN","level":"error","message":"Error sending email: Invalid greeting. response=421 4.7.0 smtp.hostland.ru Error: too many connections from 78.31.221.26: 421 4.7.0 smtp.hostland.ru Error: too many connections from 78.31.221.26","response":"421 4.7.0 smtp.hostland.ru Error: too many connections from 78.31.221.26","responseCode":421,"stack":"Error: Invalid greeting. response=421 4.7.0 smtp.hostland.ru Error: too many connections from 78.31.221.26: 421 4.7.0 smtp.hostland.ru Error: too many connections from 78.31.221.26\n at SMTPConnection._actionGreeting (/app/node_modules/nodemailer/lib/smtp-connection/index.js:1251:27)\n at SMTPConnection._processResponse (/app/node_modules/nodemailer/lib/smtp-connection/index.js:993:20)\n at SMTPConnection._onData (/app/node_modules/nodemailer/lib/smtp-connection/index.js:774:14)\n at SMTPConnection._onSocketData (/app/node_modules/nodemailer/lib/smtp-connection/index.js:195:44)\n at TLSSocket.emit (node:events:524:28)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Readable.push (node:internal/streams/readable:392:5)\n at TLSWrap.onStreamRead (node:internal/stream_base_commons:191:23)","timestamp":"2025-06-18T19:27:25.131Z"}
{"code":"EPROTOCOL","command":"CONN","level":"error","message":"Error processing incoming email: Invalid greeting. response=421 4.7.0 smtp.hostland.ru Error: too many connections from 78.31.221.26: 421 4.7.0 smtp.hostland.ru Error: too many connections from 78.31.221.26","response":"421 4.7.0 smtp.hostland.ru Error: too many connections from 78.31.221.26","responseCode":421,"stack":"Error: Invalid greeting. response=421 4.7.0 smtp.hostland.ru Error: too many connections from 78.31.221.26: 421 4.7.0 smtp.hostland.ru Error: too many connections from 78.31.221.26\n at SMTPConnection._actionGreeting (/app/node_modules/nodemailer/lib/smtp-connection/index.js:1251:27)\n at SMTPConnection._processResponse (/app/node_modules/nodemailer/lib/smtp-connection/index.js:993:20)\n at SMTPConnection._onData (/app/node_modules/nodemailer/lib/smtp-connection/index.js:774:14)\n at SMTPConnection._onSocketData (/app/node_modules/nodemailer/lib/smtp-connection/index.js:195:44)\n at TLSSocket.emit (node:events:524:28)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Readable.push (node:internal/streams/readable:392:5)\n at TLSWrap.onStreamRead (node:internal/stream_base_commons:191:23)","timestamp":"2025-06-18T19:27:25.132Z"}
{"code":"EPROTOCOL","command":"CONN","level":"error","message":"Error sending email: Invalid greeting. response=421 4.7.0 smtp.hostland.ru Error: too many connections from 78.31.221.26: 421 4.7.0 smtp.hostland.ru Error: too many connections from 78.31.221.26","response":"421 4.7.0 smtp.hostland.ru Error: too many connections from 78.31.221.26","responseCode":421,"stack":"Error: Invalid greeting. response=421 4.7.0 smtp.hostland.ru Error: too many connections from 78.31.221.26: 421 4.7.0 smtp.hostland.ru Error: too many connections from 78.31.221.26\n at SMTPConnection._actionGreeting (/app/node_modules/nodemailer/lib/smtp-connection/index.js:1251:27)\n at SMTPConnection._processResponse (/app/node_modules/nodemailer/lib/smtp-connection/index.js:993:20)\n at SMTPConnection._onData (/app/node_modules/nodemailer/lib/smtp-connection/index.js:774:14)\n at SMTPConnection._onSocketData (/app/node_modules/nodemailer/lib/smtp-connection/index.js:195:44)\n at TLSSocket.emit (node:events:524:28)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Readable.push (node:internal/streams/readable:392:5)\n at TLSWrap.onStreamRead (node:internal/stream_base_commons:191:23)","timestamp":"2025-06-18T19:27:25.590Z"}
{"code":"EPROTOCOL","command":"CONN","level":"error","message":"Error processing incoming email: Invalid greeting. response=421 4.7.0 smtp.hostland.ru Error: too many connections from 78.31.221.26: 421 4.7.0 smtp.hostland.ru Error: too many connections from 78.31.221.26","response":"421 4.7.0 smtp.hostland.ru Error: too many connections from 78.31.221.26","responseCode":421,"stack":"Error: Invalid greeting. response=421 4.7.0 smtp.hostland.ru Error: too many connections from 78.31.221.26: 421 4.7.0 smtp.hostland.ru Error: too many connections from 78.31.221.26\n at SMTPConnection._actionGreeting (/app/node_modules/nodemailer/lib/smtp-connection/index.js:1251:27)\n at SMTPConnection._processResponse (/app/node_modules/nodemailer/lib/smtp-connection/index.js:993:20)\n at SMTPConnection._onData (/app/node_modules/nodemailer/lib/smtp-connection/index.js:774:14)\n at SMTPConnection._onSocketData (/app/node_modules/nodemailer/lib/smtp-connection/index.js:195:44)\n at TLSSocket.emit (node:events:524:28)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Readable.push (node:internal/streams/readable:392:5)\n at TLSWrap.onStreamRead (node:internal/stream_base_commons:191:23)","timestamp":"2025-06-18T19:27:25.592Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-18T19:27:31.660Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-18T19:27:31.662Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-18T19:27:31.663Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-18T19:27:31.663Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-18T19:27:31.664Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-18T19:27:31.665Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-18T19:27:31.667Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-18T19:29:30.006Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-18T19:29:43.775Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-18T19:30:57.052Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-18T19:30:57.053Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-18T19:30:57.053Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-18T19:32:46.073Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-18T19:32:46.073Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-19T12:16:04.066Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-19T12:16:04.066Z"}
{"level":"error","message":"[EmailBot] IMAP connection error: Timed out while authenticating with server","timestamp":"2025-06-19T12:21:53.096Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-19T12:21:53.097Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-19T12:21:53.097Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-19T12:21:53.097Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-19T12:21:53.098Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-19T12:21:53.098Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-19T12:21:53.098Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-19T12:21:53.099Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-19T12:21:53.099Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-19T12:21:53.100Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-19T12:21:53.100Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-19T12:21:53.100Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-19T12:21:53.101Z"}
{"level":"error","message":"IMAP connection error during check: Timed out while authenticating with server","timestamp":"2025-06-19T12:21:53.101Z"}

View File

@@ -5,15 +5,23 @@ const db = require('../db');
// GET /api/messages?userId=123
router.get('/', async (req, res) => {
const userId = req.query.userId;
if (!userId) return res.status(400).json({ error: 'userId required' });
try {
const result = await db.getQuery()(
`SELECT id, user_id, sender_type, content, channel, role, direction, created_at, attachment_filename, attachment_mimetype, attachment_size, attachment_data, metadata
FROM messages
WHERE user_id = $1
ORDER BY created_at ASC`,
[userId]
);
let result;
if (userId) {
result = await db.getQuery()(
`SELECT id, user_id, sender_type, content, channel, role, direction, created_at, attachment_filename, attachment_mimetype, attachment_size, attachment_data, metadata
FROM messages
WHERE user_id = $1
ORDER BY created_at ASC`,
[userId]
);
} else {
result = await db.getQuery()(
`SELECT id, user_id, sender_type, content, channel, role, direction, created_at, attachment_filename, attachment_mimetype, attachment_size, attachment_data, metadata
FROM messages
ORDER BY created_at ASC`
);
}
res.json(result.rows);
} catch (e) {
res.status(500).json({ error: 'DB error', details: e.message });

View File

@@ -3,6 +3,8 @@ const { app, nonceStore } = require('./app');
const http = require('http');
const { initWSS } = require('./wsHub');
const logger = require('./utils/logger');
const { getBot } = require('./services/telegramBot');
const EmailBotService = require('./services/emailBot');
const PORT = process.env.PORT || 8000;
@@ -14,9 +16,26 @@ console.log('Используемый порт:', process.env.PORT || 8000);
async function initServices() {
try {
console.log('Инициализация сервисов...');
// Здесь может быть инициализация ботов, email-сервисов и т.д.
// ...
console.log('Все сервисы успешно инициализированы');
console.log('[initServices] Запуск Email-бота...');
console.log('[initServices] Создаю экземпляр EmailBotService...');
let emailBot;
try {
emailBot = new EmailBotService();
console.log('[initServices] Экземпляр EmailBotService создан');
} catch (err) {
console.error('[initServices] Ошибка при создании экземпляра EmailBotService:', err);
throw err;
}
console.log('[initServices] Перед вызовом emailBot.start()');
try {
await emailBot.start();
console.log('[initServices] Email-бот успешно запущен');
} catch (err) {
console.error('[initServices] Ошибка при запуске emailBot:', err);
}
console.log('[initServices] Запуск Telegram-бота...');
await getBot();
console.log('[initServices] Telegram-бот успешно запущен');
} catch (error) {
console.error('Ошибка при инициализации сервисов:', error);
}

View File

@@ -1,3 +1,5 @@
console.log('[ai-assistant] loaded');
const { ChatOllama } = require('@langchain/ollama');
const { HNSWLib } = require('@langchain/community/vectorstores/hnswlib');
const { OpenAIEmbeddings } = require('@langchain/openai');

View File

@@ -1,7 +1,6 @@
const db = require('../db');
const OpenAI = require('openai');
const Anthropic = require('@anthropic-ai/sdk');
const { GoogleGenAI } = require('@google/genai');
const TABLE = 'ai_providers_settings';
@@ -48,6 +47,7 @@ async function getProviderModels(provider, { api_key, base_url } = {}) {
return res.data ? res.data.map(m => ({ id: m.id, ...m })) : [];
}
if (provider === 'google') {
const { GoogleGenAI } = await import('@google/genai');
const ai = new GoogleGenAI({ apiKey: api_key, baseUrl: base_url });
const pager = await ai.models.list();
const models = [];
@@ -79,6 +79,7 @@ async function verifyProviderKey(provider, { api_key, base_url } = {}) {
return { success: true };
}
if (provider === 'google') {
const { GoogleGenAI } = await import('@google/genai');
const ai = new GoogleGenAI({ apiKey: api_key, baseUrl: base_url });
const pager = await ai.models.list();
for await (const _ of pager) {

View File

@@ -1,3 +1,4 @@
console.log('[EmailBot] emailBot.js loaded');
const db = require('../db');
const nodemailer = require('nodemailer');
const Imap = require('imap');
@@ -9,6 +10,10 @@ const identityService = require('./identity-service');
const aiAssistant = require('./ai-assistant');
class EmailBotService {
constructor() {
console.log('[EmailBot] constructor called');
}
async getSettingsFromDb() {
const { rows } = await db.getQuery()('SELECT * FROM email_settings ORDER BY id LIMIT 1');
if (!rows.length) throw new Error('Email settings not found in DB');
@@ -46,6 +51,7 @@ class EmailBotService {
idleInterval: 300000,
forceNoop: true,
},
connTimeout: 30000, // 30 секунд
};
}
@@ -228,55 +234,63 @@ class EmailBotService {
}
async start() {
logger.info('[EmailBot] start() called');
const imapConfig = await this.getImapConfig();
// Логируем IMAP-конфиг (без пароля)
const safeConfig = { ...imapConfig };
if (safeConfig.password) safeConfig.password = '***';
logger.info('[EmailBot] IMAP config:', safeConfig);
let attempt = 0;
const maxAttempts = 3;
this.isChecking = false;
const tryConnect = () => {
attempt++;
logger.info(`[EmailBot] IMAP connect attempt ${attempt}`);
this.imap = new Imap(imapConfig);
this.imap.once('ready', () => {
logger.info('[EmailBot] IMAP connection ready');
this.imap.openBox('INBOX', false, (err, box) => {
if (err) {
logger.error(`[EmailBot] Error opening INBOX: ${err.message}`);
this.imap.end();
return;
}
logger.info('[EmailBot] INBOX opened successfully');
try {
console.log('[EmailBot] start() called');
logger.info('[EmailBot] start() called');
const imapConfig = await this.getImapConfig();
// Логируем IMAP-конфиг (без пароля)
const safeConfig = { ...imapConfig };
if (safeConfig.password) safeConfig.password = '***';
logger.info('[EmailBot] IMAP config:', safeConfig);
let attempt = 0;
const maxAttempts = 3;
this.isChecking = false;
const tryConnect = () => {
attempt++;
logger.info(`[EmailBot] IMAP connect attempt ${attempt}`);
this.imap = new Imap(imapConfig);
this.imap.once('ready', () => {
logger.info('[EmailBot] IMAP connection ready');
this.imap.openBox('INBOX', false, (err, box) => {
if (err) {
logger.error(`[EmailBot] Error opening INBOX: ${err.message}`);
this.imap.end();
return;
}
logger.info('[EmailBot] INBOX opened successfully');
});
// После успешного подключения — обычная логика
this.checkEmails();
logger.info('[EmailBot] Email bot started and IMAP connection initiated');
// Периодическая проверка почты
setInterval(async () => {
if (this.isChecking) return;
this.isChecking = true;
try {
await this.checkEmails();
} catch (e) {
logger.error('[EmailBot] Error in periodic checkEmails:', e);
}
this.isChecking = false;
}, 60000); // 60 секунд
});
// После успешного подключения — обычная логика
this.checkEmails();
logger.info('[EmailBot] Email bot started and IMAP connection initiated');
// Периодическая проверка почты
setInterval(async () => {
if (this.isChecking) return;
this.isChecking = true;
try {
await this.checkEmails();
} catch (e) {
logger.error('[EmailBot] Error in periodic checkEmails:', e);
this.imap.once('error', (err) => {
logger.error(`[EmailBot] IMAP connection error: ${err.message}`);
if (err.message && err.message.toLowerCase().includes('timed out') && attempt < maxAttempts) {
logger.warn(`[EmailBot] IMAP reconnecting in 10 seconds (attempt ${attempt + 1})...`);
setTimeout(tryConnect, 10000);
}
this.isChecking = false;
}, 60000); // 60 секунд
});
this.imap.once('error', (err) => {
logger.error(`[EmailBot] IMAP connection error: ${err.message}`);
if (err.message && err.message.toLowerCase().includes('timed out') && attempt < maxAttempts) {
logger.warn(`[EmailBot] IMAP reconnecting in 10 seconds (attempt ${attempt + 1})...`);
setTimeout(tryConnect, 10000);
}
});
this.imap.connect();
};
tryConnect();
});
this.imap.connect();
};
tryConnect();
} catch (err) {
console.error('[EmailBot] Ошибка при старте:', err);
logger.error('[EmailBot] Ошибка при старте:', err);
throw err;
}
}
}
console.log('[EmailBot] module.exports = EmailBotService');
module.exports = EmailBotService;

View File

@@ -1,7 +1,10 @@
console.log('[identity-service] loaded');
const db = require('../db');
const logger = require('../utils/logger');
const { getLinkedWallet } = require('./wallet-service');
const { checkAdminRole } = require('./admin-role');
const { broadcastContactsUpdate } = require('../wsHub');
/**
* Сервис для работы с идентификаторами пользователей
@@ -541,6 +544,7 @@ class IdentityService {
await this.saveIdentity(userId, provider, providerId, true);
user = { id: userId, role: 'user' };
isNew = true;
broadcastContactsUpdate();
}
// Проверяем связь с кошельком
const wallet = await getLinkedWallet(user.id);

View File

@@ -332,8 +332,9 @@ async function getBot() {
}
});
// Запускаем бота
// Запуск бота
await botInstance.launch();
logger.info('[TelegramBot] Бот запущен');
}
return botInstance;