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

Attempting to run the example code from the connection kit via start.sh does not work #546

Closed
tucker-SB opened this issue Jan 19, 2024 · 5 comments
Assignees
Labels
bug This issue is a bug. p3 This is a minor priority issue

Comments

@tucker-SB
Copy link

tucker-SB commented Jan 19, 2024

Describe the bug

Attempt to run the startup script from the connection kit on a Ubuntu machine

Expected Behavior

Script to run without error and start a continuous publisher

Current Behavior

Running pub/sub sample application...
Traceback (most recent call last):
  File "/home/todd_keitel/Downloads/aws-iot-device-sdk-python-v2/samples/pubsub.py", line 84, in <module>
    mqtt_connection = mqtt_connection_builder.mtls_from_path(
  File "/home/todd_keitel/Downloads/aws_env/lib/python3.10/site-packages/awsiot/mqtt_connection_builder.py", line 276, in mtls_from_path
    return _builder(tls_ctx_options, **kwargs)
  File "/home/todd_keitel/Downloads/aws_env/lib/python3.10/site-packages/awsiot/mqtt_connection_builder.py", line 231, in _builder
    tls_ctx = awscrt.io.ClientTlsContext(tls_ctx_options)
  File "/home/todd_keitel/Downloads/aws_env/lib/python3.10/site-packages/awscrt/io.py", line 596, in __init__
    self._binding = _awscrt.client_tls_ctx_new(
RuntimeError: 34 (AWS_ERROR_INVALID_ARGUMENT): An invalid argument was passed to a function.

Reproduction Steps

start.sh is starting the sample script with params:
python3 aws-iot-device-sdk-python-v2/samples/pubsub.py --endpoint a3dkrncnrub5qb-ats.iot.us-east-2.amazonaws.com --ca_file root-CA.crt --cert lab_nuc_test.cert.pem --key lab_nuc_test.private.key --client_id basicPubSub --topic sdk/test/python --count 0

verified that these are all present in the same directory

Possible Solution

No response

Additional Information/Context

Worked fine on Mac following the same steps

SDK version used

awsiotsdk - 1.0.0.dev0 (also tried a regular pip install 1.21.0 - same result), awscrt - 0.20.2

Environment details (OS name and version, etc.)

Ubuntu 22.04.3

@tucker-SB tucker-SB added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 19, 2024
@jmklix jmklix self-assigned this Jan 19, 2024
@jmklix
Copy link
Member

jmklix commented Jan 19, 2024

I'm unable to reproduce this on Ubuntu 22.04 when I downloaded the latest install script. Can you try installing the latest version of this sdk with the following steps:

git clone https://github.com/aws/aws-iot-device-sdk-python-v2.git
python3 -m pip install ./aws-iot-device-sdk-python-v2
python3 aws-iot-device-sdk-python-v2/samples/pubsub.py --endpoint a3dkrncnrub5qb-ats.iot.us-east-2.amazonaws.com --ca_file root-CA.crt --cert lab_nuc_test.cert.pem --key lab_nuc_test.private.key --client_id basicPubSub --topic sdk/test/python --count 0

@jmklix jmklix added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 2 days. p3 This is a minor priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Jan 19, 2024
Copy link

Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 5 days unless further comments are made. label Jan 21, 2024
@tucker-SB
Copy link
Author

seemed to have solved this by deleting the downloads directory and following the tutorial again in a new one

@github-actions github-actions bot removed closing-soon This issue will automatically close in 5 days unless further comments are made. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 2 days. labels Jan 24, 2024
@jmklix
Copy link
Member

jmklix commented Jan 24, 2024

I'm glad that you were able to get the sample working. Let me know if you have any other problems questions with this sdk.

@jmklix jmklix closed this as completed Jan 24, 2024
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

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. p3 This is a minor priority issue
Projects
None yet
Development

No branches or pull requests

2 participants