-
Notifications
You must be signed in to change notification settings - Fork 44
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
This.render is not a function? #536
Comments
Yeah, I've seen this too. It's not Woof's best moment. If anyone can create a reproducible example of this bug and paste it below, that'd be a great start towards debugging it |
+1 Another person chatted us to complain about this UPDATE - turns out "The problem occured only under Safari but not with Chrome". Yet another reason to #531 check if chrome and warn if not. |
Actually, this happens to me on Chrome continually. I don't have to refresh the page. Very often I just increase or decrease the number of lines of codes by 1 or 2 and it fixes it. It seems to not be happening on my student's surface running chrome but it does on my surface running chrome. |
setBackdropURL("./docs/images/tomato-attack-backdrop.jpg") var unicorn = new Image({ }) That code with line 15 blank has " There's a problem. |
This is happening a lot now. Like in this project: https://woofjs.com/team.html#black-dragonfly Not sure what's going on? |
I never looked into this issue. Every time it seemed worth looking into (it was happening a lot), it would then seem to stop happening as much. It may be time to (finally) actually look into it... As you know, the first essential step to solving any bug is to first come up with a reliable way to reproduce it. That is the problem with this issue. For example, the above link does not trigger the bug for me. I messed around with that code a bit: no issue. My best guess at this moment is that is somehow triggered by the quality of the wifi connection. Another guess is that it may happen when someone has a lot other tabs open. In summary, I agree this is worth solving, so keep your eyes peeled for what potentially may be causing it so we can generate the reproducible bug. |
I see. I thought that I had finally replicated it in a way others would see! Usually we're able to fix it by changing a few lines and having it reload, but this time I couldn't get the error to go away. WiFi connection sounds interesting. I'll experiment with that. |
Other things to note that might be helpful:
|
In the link that Maddy posted above (https://woofjs.com/team.html#black-dragonfly) I can reproduce the issue by bringing the cursor down to a blank line below all the code, and pressing enter. This will create another blank line of code, and often, cause the this.render issue. The issue can be resolved by adding one more blank line of code. It seems that if there is more going on (more browser windows open, more bandwidth being used) then the this.render error is easier to reproduce. If I introduce more loops and calculations into the project above, the this.render error is easier to reproduce. I'm not finding that there is consistency. It is not always that one more line fixes it or causes it. Sometimes it is two or three or more. I wish I knew more to be able to help more. Had two kids get frustrated yesterday with the this.render errors (working on advanced projects) and move on to web development. Not a terrible end result, but I think the kids get emotional about woof when it throws errors at them that they can't understand. I hope that helps! ~Kate |
(Nice to meet you Kate! I don't think we've met before, yes?) Very well written comment! You analysis would lead me to believe we're dealing with a very persnicity race condition bug here. In other words, there's probably a bug in Woof that only occurs when the CPU is running slowly (because there's a lot of other things its trying to do at the same time). For what it's worth, on a macbook I was not able to reproduce the issue via the methods you suggested above. However this would fit our theory: macbooks have much more CPU power than chromebooks so it's not surprising that an issue on a chromebook would not happen on my macbook. So what I see now are two paths forward, a short path and a long path:
(To be clear, I don't have the time or inclination to work on such an involved WoofJS bug myself at the moment. If you feel like you really need my involvement on it, though, we can talk...) |
Hi Steve, Nice to meet you too! I'm hypothetically and experimentally working on working on some WoofJS, so hopefully we will be able to build upon WoofJS. I love it. Thank you for bringing some thoughts and technical expertise to the issue here. My thoughts are similar to your thoughts and I will troubleshoot this issue one more time on my gaming pc at home the next time I turn it on. That shouldn't have any problem at all, and if I can't reproduce it, then our thoughts are probably right! Maddy suggested I look into your first idea and then second. Love both of them. Thanks for suggesting them! |
Same happened to me yesterday! I had three students start on web development because this error has been making WoofJS pretty much unusable for us in the past few weeks. |
A few things for us (just food for thought):
|
Another one of our awesome teachers, @bbah93, mentioned the idea that it could have something to do with a library or other dependency needing an update. This would make sense when trying to answer the question of why is it suddenly happening all of the time when nothing has changed on our end. I’m wondering about CodeMirror. It seems significant that changing the number of lines on the editor creates or gets rid of the bug. Also when the error appears on the code editor, the project will not render on the Woof viewer, but it will render in full screen mode when the code editor is no longer in the window. I took a Woof game that reproduces the bug easily (most things do for me on my super rad chromebook) and put it on jsbin bringing in the Woof library. I haven’t been able to reproduce the bug there. Can anyone else? |
Interesting, seems like something is running inefficiently. Not a surprise. I wrote this code quickly so I bet there are a lot of places we can tighten things up. As far as maybe its a dependency, that's also a great guess. Again, I don't have time to do this, but the way one would is: in your development environment, paste in code that reliably causes the error, then make small changes, and after each one, see if the error goes away. In the case of this code mirror hypothesis, try bumping the version number up and seeing what happens. I wouldn't be surprised if that broke other Woof features (because we're using Code Mirror in slightly hacky ways) but it would at least let us know where the bug is coming from. Another potential source of the issue could be that |
Occasionally woofjs freezes, requiring a reload, and the error message reads "this.render is not a function", while the little emoji thing glitches out, showing tons of different emojis. I don't have any specific case in which this error occurs (I'll make sure to keep an eye out in the future), but I've seen it multiple times so I figured I would make it known.
The text was updated successfully, but these errors were encountered: