-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
TriggerFullFrameSnapshot POST timeout #93
Comments
Hello @jsm174, thanks for raising this issue. I suspect what's happening is that the response message is either not getting sent to the EventStream, or it's being consumed somewhere. If you don't mind, it would be helpful to put some logging in to see where we're hung. I suspect that if you log something here, just before the |
@jeffreydwalter Thank you. I put a I turned on debug logging:
I have one camera that is pretty far from the basestation, so sometimes it becomes unavailable. I wonder if that is the cause. |
@jsm174 thanks for that feedback. It looks like the http request to trigger the snapshot succeeded. I'm pretty sure what's happening is that the EventStream message is either not being sent or is being grabbed by something else. |
Not sure this helps but... I have this running as a cron job that fires at 10:30am and 5:30pm. If it gets stuck during the 10:30am run, when the 5:30pm run kicks off, the 10:30am will then finally fail for all remaining cameras. I'm guessing, since it's a new process, it's re-logging in, which is closing the previous login. |
Yes, that is correct. Arlo only allows a single session at a time. This is because they use a publisher/subscriber model and it doesn't support broadcast messaging. i.e., if one consumer consumes the message none of the others will, so they don't allow it. |
Makes sense. I am seeing this consistently, with my furthest away camera. That's why in the script I was looking for cameras with 'available' connectionStates. Maybe I should try to thread the |
@jsm174 can you replace the HandleEvents function with this code:
|
Thanks! I updated, and it's printing more logs. I will let it run a bit and keep you posted.
|
Awesome! Looks like the snapshot worked in the case you pasted. I'm definitely interested to see what it does in the failure case. Thanks for your help! |
Sorry for the long delay, but it took a while for this to happen again. On 11-14 at 5:30 pm the script kicked off. It got stuck on the first camera.
This block repeated over and over until 5:01 am the next morning:
It looks like the EventStream reset, and then the script continued processing. |
Thanks for sending that output! Did you happen to open another connection to your Arlo account from anywhere? i.e., did you open the Arlo web or mobile app during that time? |
I created a separate account just for the script. Also when the connection reset it was ~5am, so I would have been sleeping. |
Okay, great. Just wanted to rule that out. Arlo is designed to only allow a single connection to the EventStream per account. So, logging in from two devices logs out the first one. |
Looks like your logs had some editing (from the above):
Do you happen to have the whole unedited log? It would be really helpful to see the full context. |
I did a search and replace for the serial #. As for the ‘conne2018’, that’s how the log was. Can I send the log through some other means? |
You should be able to drag/drop a .txt file with the logs: https://help.github.com/articles/file-attachments-on-issues-and-pull-requests/ |
Ah, I meant not in a public forum, since it has serials, tokens, etc.. |
So, what I noticed is that this event is missing:
One possibility is that there's a race condition happening because I do the POST to trigger the snapshot before the eventstream connection is made. That might mean the response event is being dropped. |
You can email it to me: |
One thing I'm curious about. When it failed to send the fullFrameSnapshotAvailable event, did your camera actually take a snapshot? |
The snapshot url was null because when I got the push notification from ifttt, {{value3}} was empty. I will send the logs shortly. |
Okay, the url was null, but did the camera actually take the snapshot? |
@jsm174 looking at the logs you emailed, and I see this error in the log:
This occurs when the camera is streaming and you call |
Just curious could that be if any other account is streaming? Over the past week I can guarantee no account is streaming while trying to capture snapshots. |
Do you have multiple accounts tied to the same camera? If so, then I suppose that's a possibility. You might want to get the state of the camera to see if it's streaming or not and |
@jsm174 just pushed a fix for this issue. Please give it a try when you can and let me know how it goes. Thanks! |
@jeffreydwalter Thank you! I installed it, and just gave it a test, but it's stuck at on the GetCameraState.
I'm not sure if it's on my end. (Since it's cold, I currently have 2 dead cams out of my 5). I put the logging back on:
Just for reference, the code is:
|
Hey, that was my bad. I didn't have my Arlo stuff hooked up, so I was not able to test. I ended up hooking everything back up and properly debugged it. Please give the latest a try. |
I put the latest latest code in. :) If I'm reading the code properly, it is a 120s timeout? If so, unfortunately, it is not timing out:
It is now 19:51 and still stuck. |
@jsm174 thanks for the feedback. That's a disappointment. :/ Will keep looking... If you happen to see where the code is hung, please let me know. Thanks! |
Please answer these questions before submitting your issue. Thanks!
What version of Python are you using (
python -V
)?What operating system and processor architecture are you using (
python -c 'import platform; print(platform.uname());'
)?Which Python packages do you have installed (run the
pip freeze
orpip3 freeze
command and paste output)?Which Arlo hardware do you have (camera types - [Arlo, Pro, Q, etc.], basestation model, etc.)?
What did you do?
I wrote a script to fetch my active cameras, take snapshots, and then send rich notifications via IFTTT.
I've noticed, that sometimes
TriggerFullFrameSnapshot
hangs and sits forever. SinceTriggerAndHandleEvent
has a 120 second timeout, I'm guessing, it's stuck in the POST?Looking at the
requests
module at http://docs.python-requests.org/en/master/user/advanced/#timeouts:If possible, provide the steps you took to reproduce the issue.
A complete runnable program is good. (don't include your user/password or any sensitive info)
What did you expect to see?
What did you see instead?
Does this issue reproduce with the latest release?
The text was updated successfully, but these errors were encountered: