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

BQ server error when loading client web page: "TypeError: Cannot read property 'incoming' of undefined" #93

Closed
brynnb opened this issue Aug 5, 2013 · 22 comments
Labels

Comments

@brynnb
Copy link
Member

brynnb commented Aug 5, 2013

On Ubuntu 12.04 with redis 2.6.14 and node v0.6.12.

I did a fresh install of everything and when loading the client page I get the following (every time I refresh it repeats itself):

GET /shared/js/gametypes.js 200 0ms
TypeError: Cannot read property 'incoming' of undefined
    at Object.handleDynamicPageRequests [as handle] (/root/BrowserQuest/server/js/ws.js:151:69)
    at next (/root/BrowserQuest/node_modules/connect/lib/proto.js:190:15)
    at Object.logger [as handle] (/root/BrowserQuest/node_modules/connect/lib/middleware/logger.js:156:5)
    at next (/root/BrowserQuest/node_modules/connect/lib/proto.js:190:15)
    at resume (/root/BrowserQuest/node_modules/connect/lib/middleware/static.js:60:7)
    at SendStream.error (/root/BrowserQuest/node_modules/connect/lib/middleware/static.js:73:37)
    at SendStream.emit (events.js:88:20)
    at SendStream.error (/root/BrowserQuest/node_modules/connect/node_modules/send/lib/send.js:147:51)
    at SendStream.onStatError (/root/BrowserQuest/node_modules/connect/node_modules/send/lib/send.js:248:48)
    at Object.oncomplete (/root/BrowserQuest/node_modules/connect/node_modules/send/lib/send.js:320:26)
GET /config/config_build.json 500 4ms - 945b

I probably just configured something wrong. Any ideas?

@brynnb
Copy link
Member Author

brynnb commented Aug 5, 2013

Also worth noting that logging in or creating a character doesn't actually work. The login and create buttons do nothing.

@justinclift
Copy link

Interesting. That's the problem @Aaron1011 was seeing on OpenShift.

Just to see what happens, can you try reverting your git repo to (say) a week or so ago, and see if the same problem keeps on happening.

It'll be interesting to see if it's a problem with recent-ish code, or if maybe one of our npm dependencies is interacting badly with us.

@justinclift
Copy link

Also, which browsers is this happening for (just in case)? 😄

@Aaron1011
Copy link
Member

Hmm. As @justinclift mentioned, this is the same problem I'm experiencing on Openshift. However, I can't seem to reproduce it locally with the latest code.

@justinclift
Copy link

@Aaron1011 - Hmmm, have you tried with node 0.6.12?

@Aaron1011
Copy link
Member

Actually, I haven't. I'm just trying it now.

@Aaron1011
Copy link
Member

I haven''t been able to test it locally with Node 0.6 yet (nvm is still compiling it), but on Openshift, 0.10 is being used (I'm manually checked through SSH).

@Aaron1011
Copy link
Member

According to the Connect README, it should be compatible with Node 0.6.x.

@Aaron1011
Copy link
Member

Aha! It seems that I'm having the problem too with Node 0.6. We should probably report this as a bug to Connect.

@Aaron1011
Copy link
Member

The question now, of course, is why it's happening on Openshift.

@justinclift
Copy link

Understood. If the problem does show up locally for you with 0.6.12, then it could mean there's something left over with the OpenShift node-0.6 cartridge causing problems. Even though technically 0.10 is what's being executed.

@justinclift
Copy link

@Aaron1011 - Cool. Would you be ok to try with node 0.8. as well? The result with that will be useful for a bug report to the Connect people.

@Aaron1011
Copy link
Member

Everything is working fine with Node 0.8. I'll open an issue on their repository, and try to double-check the version of Node actually in use on Openshift.

@justinclift
Copy link

@Aaron1011 - Cool. 😄

We should update our README.md as well, to advise people to use Node.js 0.8.x or 0.10.x for now. I'll do that right away.

@brynnb - Are you ok to use a newer Node.js?

@justinclift
Copy link

@Aaron1011 - As a thought, now that you can reproduce it locally with 0.6.x, you could set a breakpoint on line 151 of ws.js and see what's wrong with the request when it happens.

Something obvious might turn up from that. (I hope) 😄

@Aaron1011
Copy link
Member

I think the problem is something internal to connect, in that a property is not getting set on the object that it returns.

@brynnb
Copy link
Member Author

brynnb commented Aug 5, 2013

@Aaron1011 Of course, no problem to use newer node. Thanks for all the responses!

@Aaron1011
Copy link
Member

I've just determined that Openshift is in fact using Node 0.6, despite what I'd though earlier. I'll work on getting it to use Node 0.10, but at least now we know what the problem is. Hopefully the people at Connect will get back to us soon.

@brynnb
Copy link
Member Author

brynnb commented Aug 5, 2013

I guess we should close this since it isn't ours to fix and the README has been updated?

@brynnb brynnb closed this as completed Aug 5, 2013
@brynnb
Copy link
Member Author

brynnb commented Aug 5, 2013

Going ahead and closing, updating node to 0.8.x fixed it as expected.

@justinclift
Copy link

Cool. 😄

@brynnb
Copy link
Member Author

brynnb commented Sep 24, 2013

Worth adding that the guy over at connect (senchalabs/connect#858) claims this isn't their code breaking
@justinclift @Aaron1011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants