Skip to content

## Rectify Error in WhatsApp Automation sendMsg Function #349

Open

Description

@Om7035

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

Activity

  1. github-actions commented on Oct 27, 2025

    @github-actions

    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.

  2. added a commit that references this issue on Oct 27, 2025
    220d4c1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions