[GOWS] - 515 and 422 Error after QR Code Authentication
// After new QR code Authentication it logs "Successfully paired" but returns 515 code and reconnects -> ~~ {"level":30,"time":1760606539563,"pid":7,"hostname":"","engine":"gows","msg":"[Session/-staging/Client] Successfully paired @s.whatsapp.net"} {"level":30,"time":1760606540019,"pid":7,"hostname":"","engine":"gows","msg":"[Session/-staging/Client] Got 515 code, reconnecting..."} {"level":30,"time":1760606540748,"pid":7,"hostname":"","engine":"gows","msg":"[Session/-staging/Client] Successfully authenticated"} {"level":30,"time":1760606540987,"pid":7,"hostname":"","engine":"gows","msg":"[Session/-staging/Client] Uploading 50 new prekeys to server"} {"level":30,"time":1760606542437,"pid":7,"hostname":"","engine":"gows","msg":"[Session/-staging/Client] Updating contact store with 16 push names from history sync"} {"level":40,"time":1760606542439,"pid":7,"hostname":"","engine":"gows","msg":"[Session/-staging/Client/AppState] Warnings while updating hash for regular_low: [missing value MAC of previous SET operation for 590F8F95E64DB3F3B01314C00E5C837CE2ED087210C0990F35478C23EB6A2808]"} {"level":30,"time":1760606542477,"pid":7,"hostname":"","engine":"gows","msg":"[Session/-staging/Client] Stored 16 message secret keys from history sync"} {"level":30,"time":1760606542488,"pid":7,"hostname":"","engine":"gows","msg":"[Session/-staging/Client] Stored 9 privacy tokens from history sync"} {"level":30,"time":1760606542674,"pid":7,"hostname":"","reqId":2084,"req":{"id":2084,"method":"GET","url":"/api/sessions/-staging","query":{},"params":{"path":["api","sessions","-staging"]}},"res":{"statusCode":200},"responseTime":3,"msg":"request completed"} ~~
// we got the 515 error before so we try to start again but the session is already WORKING, returns this error 422 -> ~~ {"level":30,"time":1760605879809,"pid":7,"hostname":"","reqId":1877,"req":{"id":1877,"method":"GET","url":"/api/-staging/auth/qr?format=image","query":{"format":"image"},"params":{"path":["api","-staging","auth","qr"]}},"res":{"statusCode":422},"err":{"type":"UnprocessableEntityException","message":"Unprocessable Entity Exception","stack":"UnprocessableEntityException: Unprocessable Entity Exception at SessionManagerPlus.waitUntilStatus (/app/dist/core/abc/manager.abc.js:111:19)\n at async resolveParamValue (/app/node_modules/@nestjs/core/router/router-execution-context.js:148:23) at async Promise.all (index 1)at async pipesFn (/app/node_modules/@nestjs/core/router/router-execution-context.js:151:13) at async /app/node_modules/@nestjs/core/router/router-execution-context.js:37:30","response":{"error":"Session status is not as expected. Try again later or restart the session","session":"-staging","status":"WORKING","expected":["SCAN_QR_CODE"]},"status":422,"options":{},"name":"UnprocessableEntityException"},"responseTime":10010,"msg":"request errored"} ~~
We can configure condition to stop the WORKING session on the 422 status but we need to understand why we get 515 on the first try
GOWS 2025.10.2