Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when replying image message sent by myself #1589

Closed
guilhermebkel opened this issue Apr 15, 2021 · 4 comments
Closed

Error when replying image message sent by myself #1589

guilhermebkel opened this issue Apr 15, 2021 · 4 comments

Comments

@guilhermebkel
Copy link

Describe the bug
Right after sending a image message and replying it I've got an error. After restarting the session and attempting to reply the image message again, it works like a charm.

Steps to Reproduce

const messageId = await client.sendFile(userId, imageBase64, "image.png", null, null, true, false)

const replyMessageId = await client.reply(userId, "image reply", messageId)

console.log(replyMessageId) // ERROR: Something went wrong while trying to send the message: ERROR_UNKNOWN

Expected behavior
Since right after sending file message (per example: video, text, audio, voice) and replying it, everything works fine, it was expected to be the same with image message.

DEBUG INFO

Debug Info {
  "WA_VERSION": "2.2112.10",
  "PAGE_UA": "WhatsApp/2.2108.8 Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36",
  "WA_AUTOMATE_VERSION": "3.10.13 UPDATE AVAILABLE: 3.10.15",
  "BROWSER_VERSION": "HeadlessChrome/90.0.4427.0",
  "OS": "Linux 5.4",
  "START_TS": 1618515091968
}
@smashah
Copy link
Member

smashah commented Apr 17, 2021

@guilhermebkel can you add a caption to the image and try again. That, for some reason, is fixing it for me.

@smashah
Copy link
Member

smashah commented Apr 17, 2021

@guilhermebkel this is happening because the caption is null, if it was undefined it would work fine. I will submit a patch that will convert any caption to undefined if null is provided.

@smashah
Copy link
Member

smashah commented Apr 17, 2021

This should be patched now. Please restart your sessions and try again, let me know if it keeps happening. thanks

@smashah smashah mentioned this issue Apr 17, 2021
@guilhermebkel
Copy link
Author

@smashah Got it! I just tested and it worked like a charm, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants