-
Notifications
You must be signed in to change notification settings - Fork 237
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
FileUploadCompletionNotification not working with Iothub GWV2 #1771
Comments
I tried the same with a different iothub instance which is working as expected. |
Is there an actual file being uploaded when you repro this? Sometimes, the BAD_FORMAT error just indicates that IoT hub doesn't have a record of that SAS URI yet. It may take a second or two between requesting one and it being completable and normally that time is filled by uploading a file. |
Adding a |
I think BAD_FORMAT is a bad error message in this case. |
Yep, this is something we have brought up to the service team before, but we can't change this behavior now, unfortunately. How reliably do you see this behavior repro? 100% of the time? |
I can see this behavior every time until i hit the limit of too much active downloads. |
I think it would be nice to confirm the issue with another sdk or with a simple http client but I did not have the time yet. |
This is likely a question of service behavior, so we'll try to investigate this when we have the time |
We ran into exactly the same issue with a hub on GWV2. The issue seems to be that the I think, this additional validation is something that needs to be changed in GWV2, as it breaks existing clients that cannot be easily updated to workaround this new validation. |
Context
Description of the issue
Can not send FileUploadCompletionNotification. IotHubClientException with BadFormat is thrown.
As i used the FileUploadSample as a basis this should be reproducable relativly easily i hope.
Code sample exhibiting the issue
Slightly adapted FileUploadSample from the samples.
Console log of the issue
Starting...
Beginning setup.
Successfully read input parameters.
Using communication protocol MQTT.
2023-12-11 19:54:10,169 INFO (main) [com.microsoft.azure.sdk.iot.device.transport.ExponentialBackoffWithJitter] - NOTE: A new instance of ExponentialBackoffWithJitter has been created with the following properties. Retry Count: 2147483647, Min Backoff Interval: 100, Max Backoff Interval: 10000, Max Time Between Retries: 100, Fast Retry Enabled: true
2023-12-11 19:54:10,233 DEBUG (main) [com.microsoft.azure.sdk.iot.device.ClientConfiguration] - Device configured to use software based SAS authentication provider
2023-12-11 19:54:10,249 DEBUG (main) [com.microsoft.azure.sdk.iot.device.DeviceClient] - Initialized a DeviceClient instance using SDK version 2.4.0
Successfully created an IoT Hub client.
IotHubClientException: BAD_FORMAT
2023-12-11 19:54:10,593 INFO (main) [com.microsoft.azure.sdk.iot.device.DeviceClient] - Closing device client...
2023-12-11 19:54:10,594 INFO (main) [com.microsoft.azure.sdk.iot.device.DeviceClient] - Device client closed successfully
Consider setting the DEBUG environment variable to '*'. This will produce a much more verbose output that will help debugging
Don't forget to remove any connection string information!
The text was updated successfully, but these errors were encountered: