opus1269 / photo-screen-saver

A Chrome Extension providing a screen saver with custom photo sources. Developed with Polymer Web Components
https://chrome.google.com/webstore/detail/kohpcmlfdjfdggcjmjhhbcbankgmppgc
Other
21 stars 10 forks source link

Uncaught TypeError: Cannot read property 'showScreenSaver' of null #1

Closed AniX closed 9 years ago

AniX commented 9 years ago

As reported in Chrome Web-store today, but with additional information:

System information:

Using Google+ Photo Albums will not work in all setups. In both setups, in Google+ Photo Albums I have turned on Your Photos and selected one album as photo source.

Successful setup

In Settings, leave Author turned on. Preview works and screen saver works as expected.

Error Setup

In Settings, turned off Author (I have assumed, I won't need this for using my own photo source).

Preview doesn't do anything. It just shows the menu panel on the left, and a large empty panel on the right. Also waited until the "Wait time" passed by, but nothing happens.

When I click "Preview" while I have the developer tools JS console running, the console shows this error:

Uncaught TypeError: Cannot read property 'showScreenSaver' of null options-csp.js.15

The expanded console output for this error:

Uncaught TypeError: Cannot read property 'showScreenSaver' of null
t.menuItemSelected @ options-csp.js:15
events.dispatchMethod @ options-csp.js:8
(anonymous function) @ options-csp.js:10
utils.fire @ options-csp.js:8
Polymer.setItemSelected @ options-csp.js:12
Polymer.select @ options-csp.js:12
Polymer.valueToSelection @ options-csp.js:12
Polymer.updateSelected @ options-csp.js:12
Polymer.selectedChanged @ options-csp.js:12
properties.invokeMethod @ options-csp.js:8
properties.notifyPropertyChanges @ options-csp.js:8
Observer.report_ @ options-csp.js:4
createObject.check_ @ options-csp.js:4
callback @ options-csp.js:4

I'd be happy to help with additional information or assistance in case you cannot reproduce the error in your setup.

opus1269 commented 9 years ago

Thanks so much for the feedback. I pushed out version 0.1.4 which I believe will correct the problem. Please check it out when you get a chance.

I switched to an asynchronous version of getBackgroundPage which should guarantee that background.html is loaded before calling showScreenSaver. Might explain the occasional 1 star reviews I get saying it doesn't work.

AniX commented 9 years ago

I've tested your change in 0.1.4 and can confirm that the bug has been fixed for me. The screen-saver now works with custom Google Photos album and the Author option turned off. Tested Preview and Wait time.

Thank you very much for the great extension. Looks beautiful with that Material design, too. My Dad will love it.