inUtil-info / whin2-contrib

whin is a node-red set of nodes that allow users to send and receive Whatsapps from within node-red to their mobile and to whatsapp groups.
MIT License
2 stars 0 forks source link

New issues after upgrading to 0.9 #7

Closed deblasioluca closed 1 year ago

deblasioluca commented 1 year ago

It seems, the switch button to activate and deactivate the connection does not properly work.

Working: The button works in order to activate the node receiver in the case when

In any other case, the receiver button throws errors continuously as explained in my previous issue report

Deactivating the receiver node when the continous error messages are thrown, does not help. Node red needs to be restarted to stop error messages!

N.B. I'm a subscribed user on RapidAPI, so the node receiver should work for me.

lu4t commented 1 year ago

Would you mind to paste the logs you get on node-red?. Did some tests and cannot reproduce the error.

Thanks.

deblasioluca commented 1 year ago

Hi!

Absolutely! Can you guide me how to get the logs you need?

On 18 Jan 2023, at 16:42, lu4t @.***> wrote:

Would you mind to paste the logs you get on node-red?. Did some tests and cannot reproduce the error.

Thanks.

— Reply to this email directly, view it on GitHub https://github.com/inUtil-info/whin2-contrib/issues/7#issuecomment-1387274991, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMOUH5Z6CVMOBQQ6YGVCDZDWTAFNVANCNFSM6AAAAAAT7GR3NA. You are receiving this because you authored the thread.

lu4t commented 1 year ago

if running on docker, just run on a terminal: docker logs node-red-docker I guess it's not needed, but just in case: node-red-docker is the name of you node-red container :)

deblasioluca commented 1 year ago

I’ve installed on Raspberry PI natively.

I used journalctl to produce below log. Does it help?

Steps to reproduce:

Above steps within 1 min after sending the message with the sender node

I’ve a Pro subscription (240 messages / day, 1 request per minute)

(node:3068) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'close' of null at @./node-red-whin-whatsapp/whin.js:188:28 at WhinReceive._inputCallback @./node-red-whin-whatsapp/whin.js:192:21) at @./runtime/lib/nodes/Node.js:210:26 at Object.trigger @./util/lib/hooks.js:166:13) at WhinReceive.Node._emitInput @./runtime/lib/nodes/Node.js:202:11) at WhinReceive.Node.emit @./runtime/lib/nodes/Node.js:186:25) at WhinReceive.Node.receive @./runtime/lib/nodes/Node.js:485:10) at @./node-red-whin-whatsapp/whin.js:342:18 at Layer.handle [as handle_request] (/usr/lib/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5) at next (/usr/lib/node_modules/node-red/node_modules/express/lib/router/route.js:137:13) at @.***/editor-api/lib/auth/index.js:75:13 at Layer.handle [as handle_request] (/usr/lib/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5) at next (/usr/lib/node_modules/node-red/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/usr/lib/node_modules/node-red/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/usr/lib/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5) at /usr/lib/node_modules/node-red/node_modules/express/lib/router/index.js:281:22 (node:3068) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 191) 18 Jan 16:46:17 - [warn] [whin_receive:02807b1acc60f4c2] [WHIN-Error] Unexpected server response: 401 18 Jan 16:46:17 - [warn] [whin_receive:02807b1acc60f4c2] [WHIN] Connection died 18 Jan 16:46:17 - [warn] [whin_receive:02807b1acc60f4c2] [WHIN-Error] Unexpected server response: 401 18 Jan 16:46:17 - [warn] [whin_receive:02807b1acc60f4c2] [WHIN] Connection died 18 Jan 16:46:17 - [warn] [whin_receive:02807b1acc60f4c2] [WHIN-Error] Unexpected server response: 401 18 Jan 16:46:17 - [warn] [whin_receive:02807b1acc60f4c2] [WHIN] Connection died 18 Jan 16:46:17 - [warn] [whin_receive:02807b1acc60f4c2] [WHIN-Error] Unexpected server response: 401 18 Jan 16:46:17 - [warn] [whin_receive:02807b1acc60f4c2] [WHIN] Connection died 18 Jan 16:46:17 - [warn] [whin_receive:02807b1acc60f4c2] [WHIN-Error] Unexpected server response: 401 18 Jan 16:46:17 - [warn] [whin_receive:02807b1acc60f4c2] [WHIN] Connection died 18 Jan 16:46:17 - [warn] [whin_receive:02807b1acc60f4c2] [WHIN-Error] Unexpected server response: 401 18 Jan 16:46:17 - [warn] [whin_receive:02807b1acc60f4c2] [WHIN] Connection died 18 Jan 16:46:18 - [warn] [whin_receive:02807b1acc60f4c2] [WHIN-Error] Unexpected server response: 401 18 Jan 16:46:18 - [warn] [whin_receive:02807b1acc60f4c2] [WHIN] Connection died

On 18 Jan 2023, at 16:44, lu4t @.***> wrote:

if running on docker, just run on a terminal: docker logs node-red-docker

— Reply to this email directly, view it on GitHub https://github.com/inUtil-info/whin2-contrib/issues/7#issuecomment-1387278366, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMOUH54FTZUP6QPMXSTQAATWTAFWXANCNFSM6AAAAAAT7GR3NA. You are receiving this because you authored the thread.

lu4t commented 1 year ago

can you please place a debug node after whin-recive, and confirm if you see a message saying: "[WHIN] Connection closed cleanly, code=1005 reason=" when you switch from on to off?

deblasioluca commented 1 year ago

Yes, I do receive the message when switching from ON to OFF. But, if I have the node receiver active and need to restart node red, the button is in a non listening mode but the switch is still on status ON. When I then switch OFF, no message. Followed by the continuous errors once I switch it ON again.

On 18 Jan 2023, at 16:55, lu4t @.***> wrote:

can you please place a debug node after whin-recive, and confirm if you see a message saying: "[WHIN] Connection closed cleanly, code=1005 reason=" when you swith from on to off?

— Reply to this email directly, view it on GitHub https://github.com/inUtil-info/whin2-contrib/issues/7#issuecomment-1387300329, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMOUH53Q455G6SLGR7HNUT3WTAG5TANCNFSM6AAAAAAT7GR3NA. You are receiving this because you authored the thread.

lu4t commented 1 year ago

Can you confirm if the error does NOT happen if you repeat the process, but wait for more than 1 minute?

deblasioluca commented 1 year ago

Yes, I can confirm that.

On 18 Jan 2023, at 17:05, lu4t @.***> wrote:

Can you confirm if the error does NOT happen if you repeat the process, but wait for more than 1 minute?

— Reply to this email directly, view it on GitHub https://github.com/inUtil-info/whin2-contrib/issues/7#issuecomment-1387315383, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMOUH563XMSRSYKBUHHB573WTAIDFANCNFSM6AAAAAAT7GR3NA. You are receiving this because you authored the thread.

lu4t commented 1 year ago

Ok, then the code is correctly running,... the problem is the rate limit set on the api gateway (for your plan is 1 Req/min). I will discuss this setting later today with the Ops team, and see if we can raise the Req/min limit for the PRO plan. Until I have feedback, I will leave this issue open.

deblasioluca commented 1 year ago

Hmm… or would it make sense you have a delay for 1 min to execute the activation with a counter as status message below the node receiver indicating the remaining waiting time?

On 18 Jan 2023, at 17:15, lu4t @.***> wrote:

Ok, then the code is correctly running,... the problem is the rate limit set on the api gateway (for your plan is 1 Req/min). I will discuss this setting later today with the Ops team, and see if we can raise the Req/min limit for the PRO plan. Until I have feedback, I will leave this issue open.

— Reply to this email directly, view it on GitHub https://github.com/inUtil-info/whin2-contrib/issues/7#issuecomment-1387330903, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMOUH534ZG4LQPVEJEPHE5DWTAJITANCNFSM6AAAAAAT7GR3NA. You are receiving this because you authored the thread.

lu4t commented 1 year ago

there are some options, and the implications are not obvious. I will get back later today after the meeting... Just try not to click the switch too quickly :)

deblasioluca commented 1 year ago

No worries..

On 18 Jan 2023, at 17:19, lu4t @.***> wrote:

there are some options, and the implications are not obvious. I will get back later today after the meeting... Just try not to click the switch too quickly :)

— Reply to this email directly, view it on GitHub https://github.com/inUtil-info/whin2-contrib/issues/7#issuecomment-1387337134, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMOUH53ARXXNLBG77K5HM7DWTAJYRANCNFSM6AAAAAAT7GR3NA. You are receiving this because you authored the thread.

lu4t commented 1 year ago

Rate Limits on the paid plans has been raised to: PRO 4/min ULTRA 10/min MEGA 14/min

You will still be rate limited, but this is as much as I could get out of the Ops team.

I am closing this issue, as there's no bug. Probably it's a Feature that we should add to the nodes roadmap.

deblasioluca commented 1 year ago

Many thanks for your efforts! Highly appreciated!

On 18 Jan 2023, at 20:13, lu4t @.***> wrote:

Rate Limits on the paid plans has been raised to: PRO 4/min ULTRA 10/min MEGA 14/min

You will still be rate limited, but this is as much as I could get out of the Ops team.

I am closing this issue, as there's no bug. Probably it's a Feature that we should add to the nodes roadmap.

— Reply to this email directly, view it on GitHub https://github.com/inUtil-info/whin2-contrib/issues/7#issuecomment-1387625353, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMOUH55XPGML7GHLKMUGAULWTA6GHANCNFSM6AAAAAAT7GR3NA. You are receiving this because you authored the thread.

deblasioluca commented 1 year ago

One more observation with the new switch you’ve implemented:

—> receiver node stays with active switch, but does not show “listening to WhatsApp” and also does not receive messages. I need to deactivate the node receiver with the switch and activate it again.

On 18 Jan 2023, at 20:17, Luca De Blasio @.***> wrote:

Many thanks for your efforts! Highly appreciated!

On 18 Jan 2023, at 20:13, lu4t @.***> wrote:

Rate Limits on the paid plans has been raised to: PRO 4/min ULTRA 10/min MEGA 14/min

You will still be rate limited, but this is as much as I could get out of the Ops team.

I am closing this issue, as there's no bug. Probably it's a Feature that we should add to the nodes roadmap.

— Reply to this email directly, view it on GitHub https://github.com/inUtil-info/whin2-contrib/issues/7#issuecomment-1387625353, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMOUH55XPGML7GHLKMUGAULWTA6GHANCNFSM6AAAAAAT7GR3NA. You are receiving this because you authored the thread.

lu4t commented 1 year ago

please update to 0.1.0 to correct the errors (kind of).

Now the connection will not drop if you do a only modified flows or only modified nodes. It will drop, and you will need to reconnect, if you do a full deploy or a restart all flows.

Thanks for the help to address them.