Still getting a connection error
k88hudson opened this issue · 12 comments
This seemed to go away for a couple of hours, but it's back again and visible on http://webmaker-app.mofodev.net.
Aha! logs from heroku:
=1238ms status=101 bytes=129
2014-10-15T21:24:17.743482+00:00 app[web.1]: /app/node_modules/filer/src/filesystem/implementation.js:1416
2014-10-15T21:24:17.743149+00:00 app[web.1]:
2014-10-15T21:24:17.743729+00:00 app[web.1]: else if (!node.xattrs.hasOwnProperty(name)) {
2014-10-15T21:24:17.766580+00:00 heroku[router]: at=info method=GET path="/" host=makedrive.mofodev.net request_id=faa1ae29-2259-4307-b923-48c69ea37d4d fwd="64.180.231.174" dyno=web.1 connect=6ms service=50ms status=101 bytes=129
2014-10-15T21:24:17.743761+00:00 app[web.1]: ^
2014-10-15T21:24:17.749107+00:00 app[web.1]: TypeError: Cannot call method 'hasOwnProperty' of undefined
2014-10-15T21:24:17.749112+00:00 app[web.1]: at get_xattr (/app/node_modules/filer/src/filesystem/implementation.js:1416:27)
2014-10-15T21:24:17.749113+00:00 app[web.1]: at is_symbolic_link (/app/node_modules/filer/src/filesystem/implementation.js:263:9)
2014-10-15T21:24:17.749115+00:00 app[web.1]: at /app/node_modules/filer-fs/index.js:94:5
2014-10-15T21:24:17.749117+00:00 app[web.1]: at /app/node_modules/filer-fs/index.js:77:5
2014-10-15T21:24:17.749118+00:00 app[web.1]: at fs.js:271:14
2014-10-15T21:24:17.749120+00:00 app[web.1]: at Object.oncomplete (fs.js:107:15)
2014-10-15T21:24:17.765561+00:00 app[web.1]: worker #0 (1885) must be replaced, respawning in 0
This looks like a Filer bug, I'll take, and fix upstream if necessary.
function getxattr_file (context, path, name, callback) {
path = normalize(path);
function get_xattr(error, node) {
var xattr = (node ? node.xattrs[name] : null);
if (error) {
callback (error);
}
else if (!node.xattrs.hasOwnProperty(name)) { // <----TypeError: Cannot call method 'hasOwnProperty' of undefined
cc @modeswitch
var xattr = (node ? node.xattrs[name] : null);
This looks suspicious and would cause your error if node is undefined.
@k88hudson Can you breakpoint your code and paste the value of node
for me? All nodes should have a non-trivial value for xattrs
.
I think I tracked this down to an error on our part -- here's the STR:
Because of a configuration error, we ended up calling
sync.connect(URL);
Where URL
was undefined
No warning was thrown, but I think this was the cause of the crash.
@humphd @alicoding this is no longer critical for me, but you may want to add a test case/patch for the undefined
case
When trying to do
MakeDrive.fs().sync.connect(undefined);
I get
DOMException: Failed to construct 'WebSocket': The URL 'undefined' is invalid.
I will try to reproduce in webmaker.app to see if I can hit that.
It still looks like there's a filer bug in here, possibly an edge case that needs handling.
@alicoding, once @modeswitch republishes filer, can you update our version of filer here? It should help us track down a bug like this again in future.
@alicoding do we still need this bug? Or have we safely dealt with it through other fixes at this point?
Never hit this thing again, so I think we can close.