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

Feature Request: Error Page when Channel fails to load #19

Closed
ocelotsloth opened this issue Oct 15, 2017 · 10 comments
Closed

Feature Request: Error Page when Channel fails to load #19

ocelotsloth opened this issue Oct 15, 2017 · 10 comments
Assignees
Labels
feature request something new to be implemented

Comments

@ocelotsloth
Copy link
Contributor

As I mentioned in #18, if the given URL doesn't load/exist/resolve, all we get for feedback is a blank white screen. A quick JS script to detect this failure mode and change the page to show a simple error message explaining why the channel didn't load would be super helpful for diagnostics.

I'll write something next week and push it up.

@Brekmister
Copy link
Contributor

Brekmister commented Oct 15, 2017

I did find other things that can be diagnosed as well such as bad CSS or JS...

Ok, I totally knew I was doing...I just made some typos and used Firefox Developer tools to diagnose it. I didn't break anything, I SWEAR

Or you know, I was just screwing around :)

@ocelotsloth
Copy link
Contributor Author

What about adding a Development mode that just prints all alerts and errors to the screen as alerts on the physical chrome casts?

This would allow us to see when something isn't working in the testing phase, but also see the exact error message just in case it's different from what we get in testing browsers. Unless somebody knows how to get the developer tools working on a Chromecast.

This could be combined with a more generic page that shows when in production mode that just shows a configurable logo along with an "Oops, looks like something went wrong."

@Brekmister
Copy link
Contributor

Also diagnosed in #1

@ocelotsloth
Copy link
Contributor Author

^ Could even be combined with an api on the server that let's the chrome casts report back errors to the server to get logged in the log files.

That could be a /log/ endpoint that just takes some text and dumps it as a log message.

@Brekmister
Copy link
Contributor

Brekmister commented Oct 15, 2017

Actually, it's a better idea to make a log/dashboard page and use a channel or template to go to it.

If we are talking about developer mode.

Quite honestly, I don't know if Iframe throws an error in JS when such thing happens. Or how to catch it.

@Brekmister
Copy link
Contributor

Brekmister commented Oct 15, 2017 via email

@ocelotsloth
Copy link
Contributor Author

Something like this should do the trick: https://stackoverflow.com/a/8000059

Just wrap the console.warn/err/etc methods so that they also do an http call to the server to report the contents of any error that is posted.

@Brekmister
Copy link
Contributor

Brekmister commented Oct 15, 2017 via email

@superhawk610
Copy link
Owner

Chromecasts actually offer a built-in debugger via Google Chrome, accessible at chrome://inspect. This will list all Chromecast receivers on the LAN and allow access to their layout and console in real time.

I do think logging would be a very useful feature, for debugging in the short-term and maintenance in the long-term. I'll open a new branch for this and try to get some work done for it when I get a chance.

@superhawk610 superhawk610 self-assigned this Oct 16, 2017
@superhawk610 superhawk610 added the feature request something new to be implemented label Oct 16, 2017
@Brekmister
Copy link
Contributor

Brekmister commented Oct 16, 2017

Just wanted to let you guys what I do right now for testing:

Just click the preview link on the device, it will render exactly the same page the chromecast is running on, including my rotation feature. If there is an error, just open up developer tools to see what's wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request something new to be implemented
Projects
None yet
Development

No branches or pull requests

3 participants