-
Notifications
You must be signed in to change notification settings - Fork 877
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
AWSIoTDataManager.getShadow() timeout [race condition with AWSIoTDataManager.register()?] #1159
Comments
Hi @armandr , I took a look at the code and it looks like we don't currently support passing this information back. The subscribe code returns void on this line. I'm marking this as a feature request and also assigning @cbommas who might have more/better information. |
I'm in the same situation, there is any news? |
I'm also running into this issue. seems like a common use-case, register for updates and immediately get the device shadow |
@dholdren @AndreaPetrelli @minbi @armandr May i know how did you guys resolved this, I'm facing similar problem while getting shadow ? |
@kshrikant You can try adding a short delay (e.g. 500ms) before getting the shadow and repeat re-try if you still get a timeout. It's not optimal, but will make the behaviour more deterministic. |
@armandr Thank i've added currently delay, let's see if any problem occurs. |
Our team is trying to look into the issue and will provide an update soon. |
State your question
How does one know AWSIoTDataManager.register(withShadow) has completed the registration(finished subscribing)?
In my IoS app I'm calling AWSIoTDataManager.register() with QoS:1 and on success immediately calling AWSIoTDataManager.getShadow(). This often, but not always leads to a AWSIoTShadowOperationStatusTypeTimeout.
It seems possible for getShadow() to be called before register() task has completed subscribing to shadow topics therefore resulting in a timeout.
However, adding a slight delay (as low as 100ms, but more than 10us) in between the register() and getshadow() makes the result more deterministic and successful (at least on my machine and simulator)
The BOOL return value of AWSIoTDataManager.register() is based on the input parameters and does not provide an ACK Callback.
How does one determine that the register is successful and complete so shadow get/update operations can begin?
Which AWS Services are you utilizing?
AWSIoT, AWSCognito
Provide code snippets (if applicable)
Environment(please complete the following information):
Device Information (please complete the following information):
The text was updated successfully, but these errors were encountered: