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

Failed creation of default mqtt client #582

Closed
grofonn opened this issue May 29, 2024 · 2 comments · Fixed by #583
Closed

Failed creation of default mqtt client #582

grofonn opened this issue May 29, 2024 · 2 comments · Fixed by #583
Labels
bug This issue is a bug. p2 This is a standard priority issue pending-release This issue will be fixed by an approved PR that hasn't been released yet.

Comments

@grofonn
Copy link

grofonn commented May 29, 2024

Describe the bug

new_default_builder function in mqtt_client_builder.py (awsiot) doesn't pass kwargs argument as expected.
It calles _builder function with kwargs as a single argument and not as a dictionary (**kwargs), which fails the creation of a mqtt client.
This seems to be the exact same problem that was reported for mqtt_connection_builder in #340 and solved in #341

Expected Behavior

Pass kwargs as a dictionary (**kwargs)

Current Behavior

Pass kwargs as a single argument

Reproduction Steps

    client = mqtt5_client_builder.new_default_builder(
        endpoint=endpoint,
        port=port,
        client_id=client_id,
        username=user,
        password=password,
        clean_session=False,
        keep_alive_secs=30,
        on_connection_interrupted=self.on_connection_interrupted,
        on_connection_resumed=self.on_connection_resumed,
        on_connection_success=self.on_connect,
        on_connection_failure=self.on_connection_failure,
        on_connection_closed=self.on_disconnect)

Possible Solution

Fix new_default_builder function' calls (pass **kwargs instead of kwargs=kwargs)

Additional Information/Context

No response

SDK version used

v2

Environment details (OS name and version, etc.)

Windows 10

@grofonn grofonn added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels May 29, 2024
@xiazhvera
Copy link
Contributor

Thank you for making this issue! I have made a PR to fix the issue: #583

I will update the ticket once the fix is released.

@jmklix jmklix added pending-release This issue will be fixed by an approved PR that hasn't been released yet. p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels May 29, 2024
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 This is a standard priority issue pending-release This issue will be fixed by an approved PR that hasn't been released yet.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants