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

Black screen every few weeks with Authorization required #201

Open
key5000 opened this issue Jan 19, 2022 · 16 comments
Open

Black screen every few weeks with Authorization required #201

key5000 opened this issue Jan 19, 2022 · 16 comments

Comments

@key5000
Copy link

key5000 commented Jan 19, 2022

Hi MrWorf and everyone,
I had my frame up and running for about a year now, every now and the frame display black screen with the message saying Google Photos: Authorization Required.

image

I can say that every 2-3 week, the black screen came up and I have to access the photoframe web interface and re-upload the jsaon file.

Is there a way to fix this issue?
Thank you in advance.

@mrworf
Copy link
Owner

mrworf commented Jan 19, 2022

Can you grab logs next time this happens and share? Will hopefully provide me with some insights into this issue.

@key5000
Copy link
Author

key5000 commented Jan 19, 2022

Can you grab logs next time this happens and share? Will hopefully provide me with some insights into this issue.

Hi MrWorf,

Please see attached file for the logs, hopefully you can see the problems.

I just reload the JSON file about 2 hours ago.

Logs.txt

@key5000
Copy link
Author

key5000 commented Jan 26, 2022

Hi MrWorf,
It happened again today, the screen showed the same error for GooglePhoto Authorization Required. Could you please help me to fix this error.

@dgaz9
Copy link

dgaz9 commented Jan 26, 2022 via email

@mrworf
Copy link
Owner

mrworf commented Jan 26, 2022

I'm seeing

SSLError: ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",)

In the logs, which causes all comms with Google's servers to fail. This means it cannot get the token and then the authentication fails.

Now, why would this happen? Looking further at the log, it turns out that at the time of the first error, the date of the raspberry pi is August 12, which is quite wrong. You can see that it actually manages to get the correct time a bit later but then the authentication has been invalidated.

For some reason, getting network time is taking so long that the frame has time to fail ssl.

But, I assume you're not rebooting on a regular schedule :) so it means that your RPi randomly lost the correct time and date and this will cause it to fail SSL. The only thing I can think of is that the RPi isn't getting enough power which causes it to lose the date&time.

The only workaround I can imagine for this is to add a protective layer around all SSL calls so it will hold off if it detects a leap back in-time from last request.

@mrworf
Copy link
Owner

mrworf commented Jan 26, 2022

The web UI should show a warning if you're running with too low power, and you'll also see a lightning symbol on the display from time to time indicating lack of power.

@key5000
Copy link
Author

key5000 commented Jan 26, 2022

Hi MrWorf,

Thank you for your response.
The RPi never get reboot, it only scheduled to turn on/off the display. How do I schedule to reboot the RPi so it can keep up the time?

My RPi 3 was powered by iPad adapter 5.2V 2.4A (12W), do you think it has enough power?

No, I don’t see the lightning symbol on the display

@mrworf
Copy link
Owner

mrworf commented Jan 26, 2022

That should be enough and the fact that you don't see any indicators is a good thing. I just cant understand why your RPi would randomly get the wrong time and date if it's not being rebooted. I'd advise against scheduling a reboot since it will only worsen the issue.

I think the only long-term solution would be to implement safeguards around all network access which essentially makes the frame think network is lost if the time jumps back to the past (since that's the reason SSL fails)

@key5000
Copy link
Author

key5000 commented Jan 27, 2022

Hi MrWorf,
Any suggestions on How to implement safeguards to keep the time up to date on RPi?

or I have to live with it by re-authorize the frame every few weeks?

@mrworf
Copy link
Owner

mrworf commented Jan 27, 2022 via email

@key5000
Copy link
Author

key5000 commented Jan 27, 2022

Hi MrWorf,
Thank you for your hard works on this photo frame project. I am looking forward to the fix and will check back in a month or so.

Best regards,
Key

@key5000
Copy link
Author

key5000 commented Feb 26, 2022

Hi MrWorf,

I just want to check back to see if you get a chance to look into this issue?

Best regards,
Key

@mrworf
Copy link
Owner

mrworf commented Dec 18, 2022

Is this still happening?

@key5000
Copy link
Author

key5000 commented Dec 18, 2022

Is this still happening?

Yes, it’s still happening. I lost the connection every few weeks. In order for the photoframe to display again, I have to re-authentication again.
The date and time on the photoframe/Raspberry Pi is up to date with correct one.

@key5000
Copy link
Author

key5000 commented Dec 18, 2022 via email

@mnkypshngbttns
Copy link

same issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants