I added in n8n.env
HTTP_PROXY="http://10.20.0.1:1080"
HTTPS_PROXY="http://10.20.0.1:1080"
And everything worked successfully, until the latest version was updated.
When I start Workflow, I get a 400 Bad Request error.
StackTrace
ERROR RESPONSE
NodeApiError: Bad request - please check your parameters
at Object.apiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Telegram/GenericFunctions.js:84:15)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Object.checkExists (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Telegram/TelegramTrigger.node.js:148:47)
at async ActiveWorkflowRunner.addWorkflowWebhooks (/usr/local/lib/node_modules/n8n/dist/src/ActiveWorkflowRunner.js:205:39)
at async ActiveWorkflowRunner.add (/usr/local/lib/node_modules/n8n/dist/src/ActiveWorkflowRunner.js:349:13)
at async /usr/local/lib/node_modules/n8n/dist/src/Server.js:471:21
at async /usr/local/lib/node_modules/n8n/dist/src/ResponseHelper.js:86:26 {
cause: Error: Request failed with status code 400
at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)
at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)
at IncomingMessage.emit (events.js:327:22)
at IncomingMessage.EventEmitter.emit (domain.js:467:12)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
config: undefined,
request: undefined,
response: {
status: 400,
statusText: 'Bad Request',
headers: [Object],
config: [Object],
request: [ClientRequest],
data: '<html><head><title>400 Bad Request</title></head>\r\n' +
'<body><h2>400 Bad Request</h2></body></html>\r\n'
},
isAxiosError: true,
toJSON: [Function: toJSON],
cause: {},
error: '<html><head><title>400 Bad Request</title></head>\r\n' +
'<body><h2>400 Bad Request</h2></body></html>\r\n',
statusCode: 400,
options: {
url: 'https://api.telegram.org/botTOKEN/getWebhookInfo',
method: 'post',
headers: [Object],
transformRequest: undefined,
transformResponse: undefined,
paramsSerializer: undefined,
timeout: 300000,
adapter: undefined,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
validateStatus: undefined,
transitional: [Object],
'axios-retry': [Object],
data: undefined,
httpsAgent: undefined
}
},
node: {
parameters: { updates: [Array], additionalFields: [Object] },
name: 'TG WebHook',
type: 'n8n-nodes-base.telegramTrigger',
typeVersion: 1,
position: [ 170, 500 ],
webhookId: 'ID',
credentials: { telegramApi: [Object] }
},
timestamp: 1635701784120,
httpCode: '400',
description: '<html><head><title>400 Bad Request</title></head>\r\n' +
'<body><h2>400 Bad Request</h2></body></html>\r\n'
The same request on the same server through curl + proxy succeeds.
Also, when there is an error in the service, I can see the request in the proxy log.
Version: 0.146.0