jarvis icon indicating copy to clipboard operation
jarvis copied to clipboard

## Rectify Error in WhatsApp Automation sendMsg Function

Open Om7035 opened this issue 1 year ago • 1 comments

Description

The sendMsg function in src/apps/pages/automations/Messenger/whatsApp.py has a TODO comment indicating there's an error that needs to be rectified. The current implementation uses pywhatkit.sendwhatmsg_instantly() combined with pyautogui keyboard simulation, which is unreliable and prone to failures.

Problem

The current approach has several issues:

  1. Relies on browser automation which is fragile
  2. Uses hardcoded sleep times that may not work on all systems
  3. No proper error handling for common failure scenarios
  4. Browser focus issues can cause messages to be sent incorrectly

Proposed Solution

  1. Replace the current implementation with a more reliable approach
  2. Add proper error handling and validation
  3. Implement retry mechanisms for transient failures
  4. Add user feedback for success/failure states

Acceptance Criteria

  • Messages are sent reliably across different systems
  • Proper error handling for network issues, authentication failures, etc.
  • User-friendly feedback for success and failure cases
  • No dependency on browser automation or UI simulation

Assignees: Labels: bug, enhancement, good first issue

Om7035 avatar Oct 27 '25 12:10 Om7035

Thank you for creating this issue! We'll look into it as soon as possible. Your contributions are highly appreciated! 😊 For further communication, join our discord server https://discord.gg/tSqtvHUJzE.

github-actions[bot] avatar Oct 27 '25 12:10 github-actions[bot]