chtaylo2 / Roku-GooglePhotos

Roku-GooglePhotos (https://www.photoviewapp.com)
https://channelstore.roku.com/details/133629/google-photos-album
MIT License
73 stars 23 forks source link

Bug: Unregistered app + screensaver startup errors out #199

Closed chtaylo2 closed 5 years ago

chtaylo2 commented 5 years ago

As reported in #192 - confirmed when PhotoView screensaver starts up and the app is unregistered it errors out.

Trying to sign a header with invalid variable. https://github.com/chtaylo2/Roku-GooglePhotos/blob/master/components/Screensaver/Screensaver.brs#L372-L379

chtaylo2 commented 5 years ago

Current Function: 266: Function oauth_sign(userIndex As Integer) as Object 267: 268: ' Save our current selection 269: m.currentAccessTokenInd = userIndex 270: 271: signedHeader = {} 272: 273: if m.accessToken[userIndex] <> "" 274:* signedHeader["Authorization"] = "Bearer " + m.accessToken[userIndex] 275: 'print "Creating Signed Headers: "; m.accessToken[userIndex] 276: end if 277: 278: return signedHeader Type Mismatch. (runtime error &h18) in pkg:/components/Utils/Common.brs(274) 274: signedHeader["Authorization"] = "Bearer " + m.accessToken[userIndex] Backtrace:

3 Function oauth_sign(userindex As Integer) As Object

file/line: pkg:/components/Utils/Common.brs(274)

2 Function dogetlibraryimages(albumid As String, selecteduser As Integer) As String

file/line: pkg:/components/Slideshow/SlideshowHelper.brs(256)

1 Function processalbums() As Void

file/line: pkg:/components/Screensaver/Screensaver.brs(255)

0 Function onapitimertrigger() As Void

file/line: pkg:/components/Screensaver/Screensaver.brs(374) Local Variables: userindex Integer val:0 (&h0) global Interface:ifGlobal m roAssociativeArray refcnt=5 count:32 signedheader roAssociativeArray refcnt=1 count:0 Threads: ID Location Source Code 0 pkg:/source/mainScreensaver.brs(34) msg = wait(0, port) 1 ...:/components/Utils/Common.brs(274) signedHeader["Authorization"] = "Bearer " + m.accessToken[us 2 ...nts/UrlHandler/UrlHandler.brs(24) msg = wait(0, m.port) selected

Brightscript Debugger>