Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Introducing JavaScript Let's Make a Game Doing Things With Functions

Why can't i view the Coin game when i click "Preview"? All i see is a black screen.

Why can't i view the Coin game when i click "Preview"? All i see is a black screen.

Can you make a snapshot of your workspace? It's the camera icon in the upper right corner.

Hey Kris, Thanks for helping! When i click "Preview", it opens another tab titled "Coin Star!", but when i click on the tab to view the window, it's just a blank black screen. It's not letting me take a snapshot of the Preview because the window is blank. Am i missing a plug-in or something?

No. You take the snapshot before clicking preview.

Hey Kris, Sorry about that. Here's the snapshot i got. https://w.trhou.se/us4ugwdxt2

I'm not sure. Some in the past have suggested it's browser related but I tested your code in Chrome, Opera, Firefox and Edge and it displayed properly.

Ali Abbas
Ali Abbas
2,097 Points

Hey Aaron, there are two possible reasons I can think of that can explain the black screen:

  1. It could be due to your internet lagging, so just give it a minute.
  2. If your internet is fine, then check your code because its most likely due to an error. Once you rectify the error the page should loan fine.

I had a similar problem and the latter was the solution. I hope this helps!

2 Answers

Rod R
Rod R
3,050 Points

I'm having the same problem with Chrome. I recently started the course. When i open the workspace for the Coin Collector and launch the preview, it opens a new tab with the name Coin Collector! but the screen is totally black. I haven't made any changes to the default code. Im going to stop the course and look for a solution elsewhere because I havent found a solution in the community postings here.

Ali Abbas
Ali Abbas
2,097 Points

I've had the same problem Rod Rice. It's because there's an error in the default code. I suggest you do what I did and just load the workspace in the previous lesson and add in any new code mentioned in your current lesson. This worked out fine for me. Of course team treehouse need to look into this error, or be notified of it. Let them know what problem you had and paste the link to the lesson. Take care.

Rod R
Rod R
3,050 Points

Thank you for the response. I have a 7G internet connection that I tested and it appears to be running flawlessly based on speed tests. I did open a help request with Treehouse. After spending a lot of time doing research and trying to figure it out I decided to suspend the monthly recurring charges for Treehouse until I received a response to my help request. No response to that yet (its been less than 24 hrs). Interestingly, I did get a response to my suspend request thanking me for the feedback and wishing me luck with 'my future endeavors'. Since I'm new to the training it didn't make a good first impression.

Ali Abbas
Ali Abbas
2,097 Points

You're most welcome Rod Rice. Just like yourself, I'm new to this as well. I've only been with Treehouse for a couple of weeks now. To find these issues can be off putting to say the least, but it's understandable when it comes to coding. Making minor errors when coding is common even amongst professionals. It's why we find our apps and games crashing sometimes, and it's why we receive constant updates to make sure these bugs are dealt with. What I'm saying is, don't let this put you off. If anything, in the last couple of weeks I've learnt a lot. I'm sure you'll find this site just as beneficial. The black screen thing only happened to me during one of the lessons, thankfully. Anyways, all the best with your studies mate.