Baileys icon indicating copy to clipboard operation
Baileys copied to clipboard

Native mobile: 405 after successful registration

Open Arctic-beaver opened this issue 1 year ago • 12 comments

I'm getting error 405: Methos not allowed when using native mobile api. After successful registration, when trying to get messages using handlers. I'm using latest version of both wa and baileys.

Steps to reproduce the behavior:

  1. Registered mobile account with captcha using v6.4.1
  2. Got error 405 when trying to receive messages for this connection
  3. Reconnecting, restoring sessions from the database does not help
  • Do you have multiple clients on the same IP? NO
  • Are you using a proxy? NO

I'm using Baileys version 6.4.1. Changing mobile version to '2.23.18.8' does not help.

Full error could be seen above:

{"err": { "type": "Error", "message": "Connection Failure", "stack": "Error: Connection Failure\n at WebSocketClient.<anonymous> (\node_modules\\@whiskeysockets\\baileys\\lib\\Socket\\socket.js:506:13)\n at WebSocketClient.emit (node:events:526:28)\n at \node_modules\\@whiskeysockets\\baileys\\lib\\Socket\\socket.js:236:35\n at Object.decodeFrame (\node_modules\\@whiskeysockets\\baileys\\lib\\Utils\\noise-handler.js:136:17)\n at WebSocketClient.onMessageRecieved (\node_modules\\@whiskeysockets\\baileys\\lib\\Socket\\socket.js:212:15)\n at WebSocketClient.emit (node:events:526:28)\n at WebSocket.<anonymous> (\node_modules\\@whiskeysockets\\baileys\\lib\\Socket\\Client\\web-socket-client.js:46:100)\n at WebSocket.emit (node:events:526:28)\n at Receiver.receiverOnMessage node_modules\\ws\\lib\\websocket.js:1184:20)\n at Receiver.emit (node:events:526:28)", "data": { "reason": "405", "location": "frc" }, "isBoom": true, "isServer": false, "output": { "statusCode": 405, "payload": { "statusCode": 405, "error": "Method Not Allowed", "message": "Connection Failure" }, "headers": {} } }, "msg": "Connection Failure"}

Arctic-beaver avatar Aug 28 '23 11:08 Arctic-beaver

Same problem...

Arphimed avatar Aug 29 '23 22:08 Arphimed

error 405 - old version

ORMiK0 avatar Aug 30 '23 16:08 ORMiK0

error 405 - old version

Which version is current? Thanks for the answer.

Arphimed avatar Aug 30 '23 23:08 Arphimed

I encountered the same problem. How did you deal with this problem in the end? @Arphimed @Arctic-beaver

xianm-sudo avatar Sep 06 '23 17:09 xianm-sudo

i use this module in FastWSapi.com , but many time its show this error. any solution there

node:events:491 throw er; // Unhandled 'error' event ^

Error: WebSocket was closed before the connection was established at WebSocket.close (/root/fastws_server/node_modules/ws/lib/websocket.js:285:7) at WebSocketClient.close (/root/fastws_server/node_modules/@whiskeysockets/baileys/lib/Socket/Client/web-socket-client.js:53:21) at Object.end (/root/fastws_server/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:258:20) at Object.relogin (/root/fastws_server/waziper/waziper.js:399:35) at async /root/fastws_server/waziper/waziper.js:1187:6 at async Object.live_back (/root/fastws_server/waziper/waziper.js:1185:4) Emitted 'error' event on WebSocketClient instance at: at WebSocket. (/root/fastws_server/node_modules/@whiskeysockets/baileys/lib/Socket/Client/web-socket-client.js:46:100) at WebSocket.emit (node:events:513:28) at emitErrorAndClose (/root/fastws_server/node_modules/ws/lib/websocket.js:1008:13) at processTicksAndRejections (node:internal/process/task_queues:83:21)

spacesoft321 avatar Sep 11 '23 04:09 spacesoft321

I encountered the same problem. How did you deal with this problem in the end? @Arphimed @Arctic-beaver

Publicly Available Pairing Code Version

Riders004 avatar Sep 27 '23 03:09 Riders004

Same here: {"level":10,"time":"2023-11-19T20:14:20.730Z","pid":73572,"hostname":"H79","msg":"<failure reason='405' location='cln'/>"} connection: 'close', lastDisconnect: { error: Error: Connection Failure at WebSocketClient. (/home/ubuntu/Baileys650/src/Socket/socket.ts:646:7) at WebSocketClient.emit (node:events:514:28) at WebSocketClient.emit (node:domain:489:12) at /home/ubuntu/Baileys650/src/Socket/socket.ts:338:23 at Object.decodeFrame (/home/ubuntu/Baileys650/src/Utils/noise-handler.ts:176:5) at WebSocketClient.onMessageRecieved (/home/ubuntu/Baileys650/src/Socket/socket.ts:310:9) at WebSocketClient.emit (node:events:514:28) at WebSocketClient.emit (node:domain:489:12) at WebSocket. (/home/ubuntu/Baileys650/src/Socket/Client/web-socket-client.ts:40:52) at WebSocket.emit (node:events:514:28) { data: [Object], isBoom: true, isServer: false, output: [Object] }, date: 2023-11-19T20:14:20.731Z }

lauriolasw avatar Nov 19 '23 20:11 lauriolasw

Has anyone been able to solve this problem?

sg957 avatar Jan 17 '24 13:01 sg957

Has anyone been able to solve this problem?

Its wants a lastest wa web version

Riders004 avatar Jan 17 '24 17:01 Riders004

WA now has strict control over numbers, with almost every VOIP number being declined with 'no_routes,' 'format_wrong,' and other 'fail' statuses. I'm using the Native mobile, and out of 100 VOIP attempts, only 2 are successful

lauriolasw avatar Jan 18 '24 14:01 lauriolasw

https://github.com/WhiskeySockets/Baileys/pull/626

bobslavtriev avatar Feb 02 '24 01:02 bobslavtriev

It's working thanks

wandrey7 avatar May 03 '24 18:05 wandrey7