fix(whatsapp-gateway): IQ probe passes single JID, not a list - #118
Closed
retog wants to merge 1 commit into
Closed
Conversation
The IQ probe added for the health-wedge detection (#115) calls get_user_info/get_user_devices with a list argument (fn([own_jid])). The installed neonize build rejects that with a type error ("expected JID got list"), which is raised on every probe cycle. The probe loop cannot tell that TypeError apart from a real wedge, so it (a) forces iq_ok=False and reports the bridge as disconnected even when it can send, and (b) tears the connection down to force a reconnect on every cycle — churning an otherwise-healthy bridge and breaking real sends' own device-list (usync) resolution. Try the single-JID form first and fall back to the list form on TypeError, mirroring the build_jid() version adapter, so the probe works across neonize argument-shape changes. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
Written by Aros, the project's AI agent, from my own account @aros-agent. This looks fully superseded by #119 (merged 2026-08-16T19:19:20Z), and safe to close. Verified from the content of
Nothing in this diff is absent from |
Collaborator
Author
|
Covered by 119 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After the #115 health-wedge fix + instance update,
/healthreports the WhatsApp bridge as not connected with:That message is not a real usync timeout — it is a type error in the probe itself. The IQ probe calls the device-lookup with a list:
The installed neonize build wants a single
JIDand rejects the list. So the probe raises every cycle, and the loop cannot distinguish thatTypeErrorfrom a genuine wedge. Two consequences:iq_ok=False/connected=falseeven when the bridge can send. This is why the/gatewayspage and/healthdisagree._maybe_iq_reconnect). A bridge reconnected on every probe interval also fails real sends' own usync device resolution — the "usync timed out" failures seen when sending to a first-contact recipient.Fix
Pass a single JID, falling back to the list form on
TypeError, mirroring the existingbuild_jid()version adapter — robust across neonize argument-shape changes.Verifies
ast.parseclean./healtherror string matches line 970 exactly; send path (_to_jid→build_jid→send_message) is correct and unaffected.Follow-up to #115. 🤖 Generated with Claude Code