fb-sleep-stats icon indicating copy to clipboard operation
fb-sleep-stats copied to clipboard

StatusCodeError: 504 and TypeError: Cannot read property '0' of undefined

Open gitgiteat opened this issue 8 years ago • 7 comments

May I ask why does it always show something like this?😅

error_pic

gitgiteat avatar Aug 02 '16 17:08 gitgiteat

I just ran fb-sleep-stats today and I get the same two errors (I assume, it is a bit hard to tell from your screenshot :) )

It seems fb-sleep is complaining, maybe because the return from facebook is not as expected(it returns an error site) or the url used in fbSleep.getBuddyListhas changed? I get the following two erros

Error getting buddyList. Will fallback to other means of retrieving friends [TypeError: Cannot read property '0' of undefined]
8/10/2016, 11:27:13 PM  - Active users:  11 / 82

and

Error getting buddyList. Will fallback to other means of retrieving friends { [StatusCodeError: 504 - <!DOCTYPE html>
.... raw html ...]}
8/10/2016, 11:20:03 PM  - Active users:  17 / 82

See http://pastebin.com/padHzvJh for the log (I changed xs and c_user). The first three and the last lines are from stdout, everything else from stderr.

But the program still works; fbSleep uses fallback mode, fbSleep.fetchActiveUsers and fbSleep.getLastActiveTimes, and gets info about some of the users.

Best, Paw

Btw. Søren It is a quite nice and good idea you got.

pawsen avatar Aug 10 '16 21:08 pawsen

Yeah, I'm having the exactly same problem. Sometimes it gives a bunch of error lines but sometimes it gives just '...Will Fallback to other means...' message. It still works but it gets stuck for a while before showing the error lines

destedge avatar Aug 19 '16 11:08 destedge

up i have the same problem, nothing work anymore ! something more to add on my todo list :)

linksilver avatar Aug 19 '16 11:08 linksilver

Is it fixed yet?

d3vilsn0w avatar Sep 11 '16 21:09 d3vilsn0w

Hi guys, I kinda resolved this one, you just need to add clientid property in index.js, add clientid after partition parameter in getLoadBalancerInfo line 52 and after that in the function call line 88. You can add in your development.json config file, clientid property and then call it from there. You can find your clientid if you do Inspect at messenger webpage go to Network and search for pull requests. Now there aren't any errors related to the format of the requests but there are sill errors related to the getting user list call.

abukva avatar Jan 02 '17 18:01 abukva

@abukva thanks a ton for resolving this - can you please add more detail to your solution for a complete newbie?

leflex avatar Feb 14 '18 18:02 leflex

1 problem is also, https://5-edge-chat.facebook.com is hardcoded in the module, but when I tested it, that one didn't work anymore, so I went to nr 4 (check with dev tools). Its in the same spot as abukva's comment

gplv2 avatar Feb 03 '20 14:02 gplv2