Error 405 - Method not allowed in desktop app

Describe the problem/error/question

Hey, guys!
I have a problem in my node with the post method.
I created the node and put the POST method but when I call the method I get the ERROR:
ERROR: Method not allowed - make sure you are using the correct HTTP method

When I try the same POST in Postman it works normally.
Can someone help me?

What is the error message (if any)?

{“status”:“rejected”,“reason”:{“message”:“405 - "{\"detail\":\"Method \\\"GET\\\" not allowed.\",\"status_code\":405}"”,“name”:“Error”,“stack”:“Error: 405 - "{\"detail\":\"Method \\\"GET\\\" not allowed.\",\"status_code\":405}"\n at createError (/private/var/folders/gf/j4k9dlg909x2q18xy89s88sm0000gp/T/AppTranslocation/51F5FC94-B707-4AFF-9D3C-0802DD64A16D/d/n8n.app/Contents/Resources/app/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/private/var/folders/gf/j4k9dlg909x2q18xy89s88sm0000gp/T/AppTranslocation/51F5FC94-B707-4AFF-9D3C-0802DD64A16D/d/n8n.app/Contents/Resources/app/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/private/var/folders/gf/j4k9dlg909x2q18xy89s88sm0000gp/T/AppTranslocation/51F5FC94-B707-4AFF-9D3C-0802DD64A16D/d/n8n.app/Contents/Resources/app/node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (node:events:406:35)\n at IncomingMessage.emit (node:domain:532:15)\n at endReadableNT (node:internal/streams/readable:1331:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)”}}

Stack

NodeApiError: Method not allowed - please check you are using the right HTTP method
    at Object.execute (/private/var/folders/gf/j4k9dlg909x2q18xy89s88sm0000gp/T/AppTranslocation/51F5FC94-B707-4AFF-9D3C-0802DD64A16D/d/n8n.app/Contents/Resources/app/node_modules/n8n-nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts:1312:12)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Workflow.runNode (/private/var/folders/gf/j4k9dlg909x2q18xy89s88sm0000gp/T/AppTranslocation/51F5FC94-B707-4AFF-9D3C-0802DD64A16D/d/n8n.app/Contents/Resources/app/node_modules/n8n-workflow/src/Workflow.ts:1270:19)
    at /private/var/folders/gf/j4k9dlg909x2q18xy89s88sm0000gp/T/AppTranslocation/51F5FC94-B707-4AFF-9D3C-0802DD64A16D/d/n8n.app/Contents/Resources/app/node_modules/n8n-core/src/WorkflowExecute.ts:938:29

Please share your workflow

{
“meta”: {
“instanceId”: “76862fd1ce4e971cd40a4543db4b0dc2cc227731156f3cd10b62546e08756cc6”
},
“nodes”: [
{
“parameters”: {
“method”: “POST”,
“url”: “https://backend.botconversa.com.br/api/v1/webhook/subscriber/208376708/custom_fields/1024484”,
“sendHeaders”: true,
“headerParameters”: {
“parameters”: [
{
“name”: “API-KEY”,
“value”: “VALUE-API-KEY”
}
]
},
“options”: {}
},
“id”: “fff1a7c1-0094-455a-a48f-ac441a064be7”,
“name”: “HTTP Request7”,
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 3,
“position”: [
2100,
880
]
}
],
“connections”: {}
}

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 0.216.2
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via desktop app:
  • Operating system: macOS Ventura Version 13.1

Hey @Lucas_Frizzo,

That is interesting, The error you shared shows that n8n is sending a GET request rather than a POST request. Normally I would recommend upgrading but we have recently removed Desktop as an option for n8n so it could be worth trying to run n8n from Docker locally to see if that works.

Hey @Jon I try today with docker locally but I have the same problem.

I deleted my n8n app in my Mac and installed the n8n by docker. The app worked but the strange is that the workflows created in desktop app until stayed there. I dont know why?

I tryied again from n8n by docker but not worked.

n8n Version: 0.236.2
Source Code: GitHub - n8n-io/n8n: Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.


ERROR: Method not allowed - please check you are using the right HTTP method

{“status”:“rejected”,“reason”:{“message”:“405 - "{\"detail\":\"Method \\\"GET\\\" not allowed.\",\"status_code\":405}"”,“name”:“Error”,“stack”:“Error: 405 - "{\"detail\":\"Method \\\"GET\\\" not allowed.\",\"status_code\":405}"\n at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n at RedirectableRequest.handleResponse (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:238:9)\n at RedirectableRequest.emit (node:events:525:35)\n at RedirectableRequest.emit (node:domain:489:12)\n at RedirectableRequest._processResponse (/usr/local/lib/node_modules/n8n/node_modules/follow-redirects/index.js:356:10)\n at ClientRequest.RedirectableRequest._onNativeResponse (/usr/local/lib/node_modules/n8n/node_modules/follow-redirects/index.js:62:10)\n at Object.onceWrapper (node:events:628:26)\n at ClientRequest.emit (node:events:525:35)\n at ClientRequest.emit (node:domain:489:12)\n at HTTPParser.parserOnIncomingClient (node:_http_client:693:27)\n at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)\n at TLSSocket.socketOnData (node:_http_client:534:22)\n at TLSSocket.emit (node:events:513:28)\n at TLSSocket.emit (node:domain:489:12)\n at addChunk (node:internal/streams/readable:315:12)\n at readableAddChunk (node:internal/streams/readable:289:9)\n at TLSSocket.Readable.push (node:internal/streams/readable:228:10)\n at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)”}}


Stack

NodeApiError: Method not allowed - please check you are using the right HTTP method
at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js:1281:27)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:655:19)
at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:596:53


Hey @Lucas_Frizzo,

The workflows are kept in the database under ~/.n8n so when you ran Docker you told it to use the same path and it has kept everything for you.

So the next thing to do would be to add a new http request node to your workflow and see if that works, It could be that something bugged out with the older version.

Hey @Jon

I deleted all my workflows and I did a pull latest version from n8n in docker
n8n Version - 1.0.5

But I get the same error:

{“status”:“rejected”,“reason”:{“message”:“405 - "{\"detail\":\"Method \\\"GET\\\" not allowed.\",\"status_code\":405}"”,“name”:“Error”,“stack”:“Error: 405 - "{\"detail\":\"Method \\\"GET\\\" not allowed.\",\"status_code\":405}"\n at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n at RedirectableRequest.handleResponse (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:238:9)\n at RedirectableRequest.emit (node:events:525:35)\n at RedirectableRequest.emit (node:domain:489:12)\n at RedirectableRequest._processResponse (/usr/local/lib/node_modules/n8n/node_modules/follow-redirects/index.js:356:10)\n at ClientRequest.RedirectableRequest._onNativeResponse (/usr/local/lib/node_modules/n8n/node_modules/follow-redirects/index.js:62:10)\n at Object.onceWrapper (node:events:628:26)\n at ClientRequest.emit (node:events:525:35)\n at ClientRequest.emit (node:domain:489:12)\n at HTTPParser.parserOnIncomingClient (node:_http_client:701:27)\n at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)\n at TLSSocket.socketOnData (node:_http_client:542:22)\n at TLSSocket.emit (node:events:513:28)\n at TLSSocket.emit (node:domain:489:12)\n at addChunk (node:internal/streams/readable:324:12)\n at readableAddChunk (node:internal/streams/readable:297:9)\n at TLSSocket.Readable.push (node:internal/streams/readable:234:10)\n at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)\n at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17)”}}

This is my new workflow but not work:

Hey @Lucas_Frizzo,

That is odd it is still showing a GET in the error, I wonder if maybe the server is just not correctly returning the error. Have you reached out to botconversa to see if they can assist?

It could be worth sending the same request using curl or changing the http request node to use something like webhook.site so you can verify it is sending the correct data.

@Jon, I tried the same request through the Postman app and it worked.
I`ll check with the support botconversa if I can get the logs

Hey @Lucas_Frizzo,

Can you try changing the URL in the http request node and sending it to a webhook.site address to see if that shows the method as POST or GET?