[BUG][WEBJS] - Send Status error
Describe the bug
WEBJS Bug: I can't update the 'Status' of an account, I've tried using 'url' and also 'data:base64' from my PHP script (I can use all the other API messages functions without problems) and I can't from Swagger either. Be it with your own image as with the example that Swagger has.
Version
2024-11-11
Response from API
"{
"statusCode": 500,
"timestamp": "2024-12-03T08:41:05.539Z",
"exception": {
"stack": "TargetCloseError: Protocol error (Runtime.callFunctionOn): Target closed\n at CallbackRegistry.clear (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js:73:36)\n at CdpCDPSession._onClosed (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/CDPSession.js:101:25)\n at #onClose (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Connection.js:167:21)\n at Connection.dispose (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Connection.js:173:22)\n at CdpBrowser.disconnect (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Browser.js:230:26)\n at CdpBrowser.close (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Browser.js:226:20)\n at async WebjsClient.destroy (/app/node_modules/whatsapp-web.js/src/Client.js:787:9)",
"message": "Protocol error (Runtime.callFunctionOn): Target closed",
"name": "TargetCloseError",
"cause": {
"stack": "ProtocolError\n at <instance_members_initializer> (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js:94:14)\n at new Callback (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js:98:16)\n at CallbackRegistry.create (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js:23:26)\n at Connection._rawSend (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Connection.js:90:26)\n at CdpCDPSession.send (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/CDPSession.js:66:33)\n at #evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js:360:50)\n at ExecutionContext.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js:275:36)\n at IsolatedWorld.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/IsolatedWorld.js:100:30)\n at CdpFrame.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Frame.js:341:43)\n at CdpFrame.
Steps
To Reproduce Steps to reproduce the behavior:
Use the Swagger to send Status image
Expected behavior
Update Status
Hi! Could you try to switch to chrome based image?
devlikeapro/waha-plus:chrome
https://waha.devlike.pro/docs/how-to/engines/#docker-images
Yes, the same result. VERSION 2024-12-1 Chrome
Curl
curl -X 'POST'
'https://was.xxxxxxxxx.com:3000/api/xxxxxxxx/status/image'
-H 'accept: /'
-H 'X-Api-Key: ultrasecret'
-H 'Content-Type: application/json'
-d '{
"file": {
"mimetype": "image/jpeg",
"filename": "filename.jpg",
"url": "https://github.com/devlikeapro/waha/raw/core/examples/waha.jpg"
},
"contacts": null,
"caption": "string"
}'
Error: Internal Server Error
Response body
Download
{
"statusCode": 500,
"timestamp": "2024-12-06T11:57:14.952Z",
"exception": {
"stack": "TargetCloseError: Protocol error (Runtime.callFunctionOn): Target closed\n at CallbackRegistry.clear (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js:73:36)\n at CdpCDPSession._onClosed (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/CDPSession.js:101:25)\n at #onClose (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Connection.js:167:21)\n at Connection.dispose (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Connection.js:173:22)\n at CdpBrowser.disconnect (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Browser.js:230:26)\n at CdpBrowser.close (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Browser.js:226:20)\n at async WebjsClient.destroy (/app/node_modules/whatsapp-web.js/src/Client.js:787:9)",
"message": "Protocol error (Runtime.callFunctionOn): Target closed",
"name": "TargetCloseError",
"cause": {
"stack": "ProtocolError\n at <instance_members_initializer> (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js:94:14)\n at new Callback (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js:98:16)\n at CallbackRegistry.create (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js:23:26)\n at Connection._rawSend (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Connection.js:90:26)\n at CdpCDPSession.send (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/CDPSession.js:66:33)\n at #evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js:360:50)\n at ExecutionContext.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js:275:36)\n at IsolatedWorld.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/IsolatedWorld.js:100:30)\n at CdpFrame.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Frame.js:341:43)\n at CdpFrame.