mvysny / photocloud-frame-slideshow

Android Digital Photo Frame
https://www.android-photo-frame.eu
14 stars 1 forks source link

Dropbox Tokens expire within a day #175

Open AlphaCactus opened 2 years ago

AlphaCactus commented 2 years ago

Dropbox tokens work for short time, but then expire in < 1 day (perhaps only hours) resulting in this error on screen:

Error: Fatal error: java.lang.RuntimeException: java.lang.RuntimeException: com.dropbox..core.InvalidAccessTokenException: {"error_summary": "expired_access_token/...","error":{".tag":"expired_access_token"}}

Has PhotoCloud hasn't been updated to handle the new Dropbox token mechanism and refresh tokens? https://dropbox.tech/developers/migrating-app-permissions-and-access-tokens

Steps to Reproduce:

  1. Install PhotoCloud.
  2. Add a dropbox source and authenticate.
  3. Run slideshow based on files in dropbox. It does work for awhile after authenticated.
  4. Wait for ~1 day (possibly less, exact duration not known it may only be hours). Also, I don't know if it occurs while the slideshow is running, or if the app must be restarted or if the device must be power cycled. Result: Error message above appears in small text on black background and images do not play. Repeatable: Remove dropbox source and repeat from step2 to experience the same behavior cycle.

My device is a Ugoos X3 Android 9 Firmware v.0.4.2, but I doubt this is device specific

$50 bounty available at BountySource. https://app.bountysource.com/issues/108785503-dropbox-tokens-expire-within-a-day token

KN4CK3R commented 2 years ago

Bountysource does not allow closed source projects.

AlphaCactus commented 2 years ago

Bountysource does not allow closed source projects.

Shoot I was just copying another issue on this project which had posted a bounty with bounty source. #142 How did it work for that issue? Anyway, we can figure out another way to deliver it.

mvysny commented 2 years ago

Thank you for letting me know, and super-thanks for the bounty-source bounty :) . You're right - I need to implement support for "refresh tokens" in order for the app to have a long-lived access to Dropbox. Let me investigate.