ether / etherpad-lite

Etherpad: A modern really-real-time collaborative document editor.
http://docs.etherpad.org/
Apache License 2.0
16.54k stars 2.84k forks source link

Maximum call stack size exceeded when calling API function createGroupIfNotExistsFor #446

Closed Toumal closed 12 years ago

Toumal commented 12 years ago

This is on the latest revision, node 0.6.10:

Calling any group related API function results in a "RangeError: Maximum call stack size exceeded":

Ensure that all dependencies are up to date...
Ensure jQuery is downloaded and up to date...
Ensure prefixfree is downloaded and up to date...
Clear minfified cache...
ensure custom css/js files are created...
start...
[2012-02-12 11:21:46.566] [WARN] console - Can't get git version for server header
ENOENT, no such file or directory '/opt/etherpad/etherpad-lite/.git/HEAD'
[2012-02-12 11:21:46.570] [INFO] console - Report bugs at https://github.com/Pita/etherpad-lite/issues
[2012-02-12 11:21:46.726] [INFO] console - Server is listening at 0.0.0.0:9001
[2012-02-12 11:21:46.728] [INFO] console -    info  - 'socket.io started'
[2012-02-12 11:21:52.449] [INFO] API - REQUEST, createGroupIfNotExistsFor, {"groupMapper":"13","apikey":"rFqIF49IlsRy5frbAi1gzitSA8bKZVPD"}
[2012-02-12 11:21:52.452] [DEBUG] ueberDB - GET    - mapper2group:13 - null - from database
[2012-02-12 11:21:52.453] [DEBUG] ueberDB - SET    - group:g.bzghzNmJqJKBlRwK - {"pads":{}} - to buffer
[2012-02-12 11:21:52.453] [INFO] API - RESPONSE, createGroupIfNotExistsFor, {"code":0,"message":"ok","data":{"groupID":"g.bzghzNmJqJKBlRwK"}}
[2012-02-12 11:21:52.484] [ERROR] console - [RangeError: Maximum call stack size exceeded]
[2012-02-12 11:21:52.487] [INFO] console - graceful shutdown...
[2012-02-12 11:21:52.487] [INFO] ueberDB - Flushed 1 values

I'm using the php etherpad lite client, doing the following:

$this->etherpadInstance = new EtherpadLiteClient();
try {
    $mappedGroup = $this->etherpadInstance->createGroupIfNotExistsFor(SF::uid());
    $groupID = $mappedGroup->groupID;
} catch (Exception $e) {}

Etherpad works fine via the web frontend, no issues creating pads and editing them...

Anyone have any clues for me what I'm doing wrong?

jhollinger commented 12 years ago

Unable to duplicate on latest (8e6b451459). Is the problem present if you use the API directly through a browser? Does it happen with any value, and not just the return value of SF::uid()?

Toumal commented 12 years ago

I tried other values instead of 13, and also random strings, email addresses....

I also tried createGroup() - same problem. Reinstalled nodeJS, nothing. Also tried with an older 0.6.6 of nodeJS, same behavior...

jhollinger commented 12 years ago

Try running node --trace server.js and see what the backtrace looks like on the error.

Toumal commented 12 years ago
                 ...(this=0x1700cd000061, Content-Type, <undefined>) {

5483: ...(this=0x1700cd000061, Content-Type) { 5484: ...toLowerCase(this=Content-Type) { 5484: ...} -> content-type 5483: ...} -> application/json; charset=utf-8 5482: ...} -> application/json; charset=utf-8 5482: ...(this=0x1700cd000061, Content-Length, ) { 5483: ...(this=0x1700cd000061, Content-Length) { 5484: ...toLowerCase(this=Content-Length) { 5484: ...} -> content-length 5483: ...} -> 65 5482: ...} -> 65 5482: ...(this=0x1700cd000061, {"code":0,"message":"ok","data":{"groupID":"g.8ZX3RGCgudARiFJN"}}, ) { 5483: ...(this=0x1700cd000061, {"code":0,"message":"ok","data":{"groupID":"g.8ZX3RGCgudARiFJN"}}, ) { 5484: ...(this=0x1700cd000061, {"code":0,"message":"ok","data":{"groupID":"g.8ZX3RGCgudARiFJN"}}, , ) { 5485: ...(this=0x1700cd000061, Content-Type, ) { 5486: ...(this=0x1700cd000061, Content-Type) { 5487: ...toLowerCase(this=Content-Type) { 5487: ...} -> content-type 5486: ...} -> application/json; charset=utf-8 5485: ...} -> application/json; charset=utf-8 5485: ...(this=0x1700cd000061, Content-Length, ) { 5486: ...(this=0x1700cd000061, Content-Length) { 5487: ...toLowerCase(this=Content-Length) { 5487: ...} -> content-length 5486: ...} -> 65 5485: ...} -> 65 5485: ...(this=0x1700cd000061, {"code":0,"message":"ok","data":{"groupID":"g.8ZX3RGCgudARiFJN"}}, ) { 5486: ...(this=0x1700cd000061, {"code":0,"message":"ok","data":{"groupID":"g.8ZX3RGCgudARiFJN"}}, ) { 5487: ...(this=0x1700cd000061, {"code":0,"message":"ok","data":{"groupID":"g.8ZX3RGCgudARiFJN"}}, , ) { 5488: ...(this=0x1700cd000061, Content-Type, ) { 5489: ...(this=0x1700cd000061, Content-Type) { 5490: ...toLowerCase(this=Content-Type) { 5490: ...} -> content-type 5489: ...} -> application/json; charset=utf-8 5488: ...} -> application/json; charset=utf-8 5488: ...(this=0x1700cd000061, Content-Length, ) { 5489: ...(this=0x1700cd000061, Content-Length) { 5490: ...toLowerCase(this=Content-Length) { 5490: ...} -> content-length 5489: ...} -> 65 5488: ...} -> 65 5488: ...(this=0x1700cd000061, {"code":0,"message":"ok","data":{"groupID":"g.8ZX3RGCgudARiFJN"}}, ) { 5489: ...(this=0x1700cd000061, {"code":0,"message":"ok","data":{"groupID":"g.8ZX3RGCgudARiFJN"}}, ) { 5490: ...(this=0x1700cd000061, {"code":0,"message":"ok","data":{"groupID":"g.8ZX3RGCgudARiFJN"}}, , ) { 5491: ...(this=0x1700cd000061, Content-Type, ) { 5492: ...(this=0x1700cd000061, Content-Type) { 5493: ...toLowerCase(this=Content-Type) { 5493: ...} -> content-type 5492: ...} -> application/json; charset=utf-8 5491: ...} -> application/json; charset=utf-8 5491: ...(this=0x1700cd000061, Content-Length, ) { 5492: ...(this=0x1700cd000061, Content-Length) { 5493: ...toLowerCase(this=Content-Length) { 5493: ...} -> content-length 5492: ...} -> 65 5491: ...} -> 65 5491: ...(this=0x1700cd000061, {"code":0,"message":"ok","data":{"groupID":"g.8ZX3RGCgudARiFJN"}}, ) { 5492: ...(this=0x1700cd000061, {"code":0,"message":"ok","data":{"groupID":"g.8ZX3RGCgudARiFJN"}}, ) { 5493: ...(this=0x1700cd000061, {"code":0,"message":"ok","data":{"groupID":"g.8ZX3RGCgudARiFJN"}}, , ) { 5494: ...(this=0x1700cd000061, Content-Type, ) { 5495: ...(this=0x1700cd000061, Content-Type) { 5496: ...toLowerCase(this=Content-Type) { 5496: ...} -> content-type 5495: ...} -> application/json; charset=utf-8 5494: ...} -> application/json; charset=utf-8 5494: ...(this=0x1700cd000061, Content-Length, ) { 5495: ...(this=0x1700cd000061, Content-Length) { 5496: ...toLowerCase(this=Content-Length) { 5496: ...} -> content-length 5495: ...} -> 65 5494: ...} -> 65


Ends with this: (well aside from the graceful shutdown messages)

20: (this=0x1700cc02ad61, 0x1700cc02ac91) { 20: } -> 21: (this=0x1700cc02ad61) { 21: } -> 21: (this=0x1700cc02ad61) { 21: } -> 0x1700cc02ac91 20: freeze(this=, 0x1700cc02acb1) { 21: getOwnPropertyNames(this=, 0x1700cc02acb1) { 21: } -> 0x1700cc08e689 21: GetOwnProperty(this=, 0x1700cc02acb1, 0) { 23: (this=0x1700cc08e809, Illegal access to a strict mode caller function.) { 23: } -> 23: (this=0x1700cc08e809, ) { 23: } -> 21: } -> 0x1700cc08e809 21: (this=0x1700cc08e809) { 21: } -> 21: (this=0x1700cc08e809, ) { 21: } -> 23: (this=0x1700cc08e8f9, Illegal access to a strict mode caller function.) { 23: } -> 23: (this=0x1700cc08e8f9, ) { 23: } -> 22: SameValue(this=, , ) { 22: } -> 22: SameValue(this=, , ) { 22: } -> 22: (this=0x1700cc08e809) { 22: } -> 22: (this=0x1700cc08e809) { 22: } -> Illegal access to a strict mode caller function. 21: GetOwnProperty(this=, 0x1700cc02acb1, length) { 23: (this=0x1700cc08ed71, 1) { 23: } -> 23: (this=0x1700cc08ed71, ) { 23: } -> 21: } -> 0x1700cc08ed71 21: (this=0x1700cc08ed71) { 21: } -> 21: (this=0x1700cc08ed71, ) { 21: } -> 23: (this=0x1700cc08ee61, 1) { 23: } -> 23: (this=0x1700cc08ee61, ) { 23: } -> 22: SameValue(this=, , ) { 22: } -> 22: SameValue(this=, , ) { 22: } -> 22: (this=0x1700cc08ed71) { 22: } -> 22: (this=0x1700cc08ee61) { 22: } -> 22: SameValue(this=, , ) { 22: } -> 22: (this=0x1700cc08ee61) { 22: } -> 22: (this=0x1700cc08ee61) { 22: } -> 22: (this=0x1700cc08ed71) { 22: } -> 22: (this=0x1700cc08ed71) { 22: } -> 1 20: } -> 0x1700cc02acb1 20: (this=0x1700cc02ad61, 0x1700cc02acb1) { 20: } -> 21: (this=0x1700cc02ad61) { 21: } -> 21: (this=0x1700cc02ad61) { 21: } -> 0x1700cc02acb1 20: freeze(this=, 0x1700cc02acd1) { 21: getOwnPropertyNames(this=, 0x1700cc02acd1) { 21: } -> 0x1700cc08f2f9 21: GetOwnProperty(this=, 0x1700cc02acd1, 0) { 23: (this=0x1700cc08f479, Illegal let declaration in unprotected statement context.) { 23: } -> 23: (this=0x1700cc08f479, ) { 23: } -> 21: } -> 0x1700cc08f479 21: (this=0x1700cc08f479) { 21: } -> 21: (this=0x1700cc08f479, ) { 21: } -> 23: (this=0x1700cc08f569, Illegal let declaration in unprotected statement context.) { 23: } -> 23: (this=0x1700cc08f569, ) { 23: } -> 22: SameValue(this=, , ) { 22: } -> 22: SameValue(this=, , ) { 22: } -> 22: (this=0x1700cc08f479) { 22: } -> 22: (this=0x1700cc08f479) { 22: } -> Illegal let declaration in unprotected statement context. 21: GetOwnProperty(this=, 0x1700cc02acd1, length) { 23: (this=0x1700cc08f9e1, 1) { 23: } -> 23: (this=0x1700cc08f9e1, ) { 23: } -> 21: } -> 0x1700cc08f9e1 21: (this=0x1700cc08f9e1) { 21: } -> 21: (this=0x1700cc08f9e1, ) { 21: } -> 23: (this=0x1700cc08fad1, 1) { 23: } -> 23: (this=0x1700cc08fad1, ) { 23: } -> 22: SameValue(this=, , ) { 22: } -> 22: SameValue(this=, , ) { 22: } -> 22: (this=0x1700cc08f9e1) { 22: } -> 22: (this=0x1700cc08fad1) { 22: } -> 22: SameValue(this=, , ) { 22: } -> 22: (this=0x1700cc08fad1) { 22: } -> 22: (this=0x1700cc08fad1) { 22: } -> 22: (this=0x1700cc08f9e1) { 22: } -> 22: (this=0x1700cc08f9e1) { 22: } -> 1 20: } -> 0x1700cc02acd1 20: (this=0x1700cc02ad61, 0x1700cc02acd1) { 20: } -> 21: (this=0x1700cc02ad61) { 21: } -> 21: (this=0x1700cc02ad61) { 21: } -> 0x1700cc02acd1 20: freeze(this=, 0x1700cc02acf1) { 21: getOwnPropertyNames(this=, 0x1700cc02acf1) { 21: } -> 0x1700cc08ff69 21: GetOwnProperty(this=, 0x1700cc02acf1, 0) { 23: (this=0x1700cc0900e9, Cannot prevent extension of an object with external array elements) { 23: } -> 23: (this=0x1700cc0900e9, ) { 23: } -> 21: } -> 0x1700cc0900e9 21: (this=0x1700cc0900e9) { 21: } -> 21: (this=0x1700cc0900e9, ) { 21: } -> 23: (this=0x1700cc0901d9, Cannot prevent extension of an object with external array elements) { 23: } -> 23: (this=0x1700cc0901d9, ) { 23: } -> 22: SameValue(this=, , ) { 22: } -> 22: SameValue(this=, , ) { 22: } -> 22: (this=0x1700cc0900e9) { 22: } -> 22: (this=0x1700cc0900e9) { 22: } -> Cannot prevent extension of an object with external array elements 21: GetOwnProperty(this=, 0x1700cc02acf1, length) { 23: (this=0x1700cc090651, 1) { 23: } -> 23: (this=0x1700cc090651, ) { 23: } -> 21: } -> 0x1700cc090651 21: (this=0x1700cc090651) { 21: } -> 21: (this=0x1700cc090651, ) { 21: } -> 23: (this=0x1700cc090741, 1) { 23: } -> 23: (this=0x1700cc090741, ) { 23: } -> 22: SameValue(this=, , ) { 22: } -> 22: SameValue(this=, , ) { 22: } -> 22: (this=0x1700cc090651) { 22: } -> 22: (this=0x1700cc090741) { 22: } -> 22: SameValue(this=, , ) { 22: } -> 22: (this=0x1700cc090741) { 22: } -> 22: (this=0x1700cc090741) { 22: } -> 22: (this=0x1700cc090651) { 22: } -> 22: (this=0x1700cc090651) { 22: } -> 1 20: } -> 0x1700cc02acf1 20: (this=0x1700cc02ad61, 0x1700cc02acf1) { 20: } -> 21: (this=0x1700cc02ad61) { 21: } -> 21: (this=0x1700cc02ad61) { 21: } -> 0x1700cc02acf1 20: freeze(this=, 0x1700cc02ad11) { 21: getOwnPropertyNames(this=, 0x1700cc02ad11) { 21: } -> 0x1700cc090bd9 21: GetOwnProperty(this=, 0x1700cc02ad11, 0) { 23: (this=0x1700cc090d59, Cannot redefine a property of an object with external array elements) { 23: } -> 23: (this=0x1700cc090d59, ) { 23: } -> 21: } -> 0x1700cc090d59 21: (this=0x1700cc090d59) { 21: } -> 21: (this=0x1700cc090d59, ) { 21: } -> 23: (this=0x1700cc090e49, Cannot redefine a property of an object with external array elements) { 23: } -> 23: (this=0x1700cc090e49, ) { 23: } -> 22: SameValue(this=, , ) { 22: } -> 22: SameValue(this=, , ) { 22: } -> 22: (this=0x1700cc090d59) { 22: } -> 22: (this=0x1700cc090d59) { 22: } -> Cannot redefine a property of an object with external array elements 21: GetOwnProperty(this=, 0x1700cc02ad11, length) { 23: (this=0x1700cc0912c1, 1) { 23: } -> 23: (this=0x1700cc0912c1, ) { 23: } -> 21: } -> 0x1700cc0912c1 21: (this=0x1700cc0912c1) { 21: } -> 21: (this=0x1700cc0912c1, ) { 21: } -> 23: (this=0x1700cc0913b1, 1) { 23: } -> 23: (this=0x1700cc0913b1, ) { 23: } -> 22: SameValue(this=, , ) { 22: } -> 22: SameValue(this=, , ) { 22: } -> 22: (this=0x1700cc0912c1) { 22: } -> 22: (this=0x1700cc0913b1) { 22: } -> 22: SameValue(this=, , ) { 22: } -> 22: (this=0x1700cc0913b1) { 22: } -> 22: (this=0x1700cc0913b1) { 22: } -> 22: (this=0x1700cc0912c1) { 22: } -> 22: (this=0x1700cc0912c1) { 22: } -> 1 20: } -> 0x1700cc02ad11 20: (this=0x1700cc02ad61, 0x1700cc02ad11) { 20: } -> 21: (this=0x1700cc02ad61) { 21: } -> 21: (this=0x1700cc02ad61) { 21: } -> 0x1700cc02ad11 20: FormatString(this=, 0x1700cc02a791, 0x1700cc000069) { 20: } -> Maximum call stack size exceeded 19: } -> Maximum call stack size exceeded 17: ToUint32(this=0x3cb33e0ae8f1, 0) { 17: ToUint32(this=0x3cb33e0ae8f1, 0) { 16: } -> RangeError: Maximum call stack size exceeded 15: } -> RangeError: Maximum call stack size exceeded 14: } -> [RangeError: Maximum call stack size exceeded] 13: } -> [RangeError: Maximum call stack size exceeded] 12: } -> [RangeError: Maximum call stack size exceeded] 11: } -> 10: } -> 9: } -> [RangeError: Maximum call stack size exceeded] 8: } -> [2012-02-13 14:33:23.777] [ERROR] console - [RangeError: Maximum call stack size exceeded]

I really appreciate your time and help!

Toumal commented 12 years ago

Any idea what's the cause? Is there any other part of the log that I should post to help shed more light on it?

jhollinger commented 12 years ago

Looking at the log entry you posted, it almost looks like eplite returns the JSON response and then crashes. Is that the case or not?

Also, does this still happen on the latest revision? If so, please specify the revision you're referring to, since "latest" is a moving target.

Toumal commented 12 years ago

I'm a git newbie, forgive my lack of specific revision... For what it's worth, I made an update today, same result.

And yeah, It does seem to generate the API - RESPONSE correctly and then crash.

Is there anything node.js related that I should reinstall or wipe or something? This is on ubuntu linux btw.

jhollinger commented 12 years ago

node 0.6.10 is pretty recent, I think. Can't imagine that a reinstall would help. But it's easy, couldn't hurt.

You say it correctly generates the response, which makes me wonder if it's a problem outside of eplite. Sure you have the latest dependencies installed with bin/installDeps.sh? (I'm grasping at straws here)

Toumal commented 12 years ago

Yeah. Is there maybe a way I could erase all the dependencies and have them redownloaded? (Sorry, quite new to node.js too)

jhollinger commented 12 years ago

In the root of your eplite dir, remove the node_modules directory. Then just run bin/installDeps.sh.

Toumal commented 12 years ago

Ok, did that, also did a clean checkout and reinstalled node.js

My config is default, with mysql (same effect with the dirty db) and that seems to work because it retrieves the mapper2group bit from the db successfully.

Same effect.

PHP reports this:

fopen(http://blablabla.com:9001/api/1/createGroupIfNotExistsFor) [function.fopen]: failed to open stream: HTTP request failed!

This is what I get in the logs:

[2012-02-21 15:14:38.785] [INFO] console - Your Etherpad Lite git version is 10cbb48 [2012-02-21 15:14:38.788] [INFO] console - Report bugs at https://github.com/Pita/etherpad-lite/issues [2012-02-21 15:14:38.986] [INFO] console - Server is listening at 0.0.0.0:9001 [2012-02-21 15:14:38.987] [INFO] console - info - 'socket.io started' [2012-02-21 15:14:43.081] [INFO] API - REQUEST, createGroupIfNotExistsFor, {"groupMapper":"13","apikey":"rFqIF49IlsRy5frbAi1gzitSA8bKZVPD"} [2012-02-21 15:14:43.087] [DEBUG] ueberDB - GET - mapper2group:13 - "g.srx6RjSTUxHFWfrw" - from database [2012-02-21 15:14:43.087] [INFO] API - RESPONSE, createGroupIfNotExistsFor, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}} [2012-02-21 15:14:43.110] [ERROR] console - [RangeError: Maximum call stack size exceeded] [2012-02-21 15:14:43.113] [INFO] console - graceful shutdown... [2012-02-21 15:14:43.113] [INFO] console - db sucessfully closed.

This is what I get:

[2012-02-21 15:09:47.102] [INFO] console - Your Etherpad Lite git version is 10cbb48 [2012-02-21 15:09:47.112] [INFO] console - Report bugs at https://github.com/Pita/etherpad-lite/issues [2012-02-21 15:09:47.650] [INFO] console - Server is listening at 0.0.0.0:9001 [2012-02-21 15:09:47.651] [INFO] console - info - 'socket.io started' [2012-02-21 15:09:57.991] [INFO] API - REQUEST, createGroupIfNotExistsFor, {"groupMapper":"13","apikey":"rFqIF49IlsRy5frbAi1gzitSA8bKZVPD"} [2012-02-21 15:09:57.994] [DEBUG] ueberDB - GET - mapper2group:13 - "g.srx6RjSTUxHFWfrw" - from database [2012-02-21 15:09:58.001] [INFO] API - RESPONSE, createGroupIfNotExistsFor, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}} [2012-02-21 15:09:58.019] [ERROR] console - [RangeError: Maximum call stack size exceeded] [2012-02-21 15:09:58.022] [INFO] console - graceful shutdown... [2012-02-21 15:09:58.064] [INFO] console - db sucessfully closed.

Toumal commented 12 years ago

This is the part of the trace log where things go haywire. It starts doing the log output and building the http response, and then it just loops:

23: (this=0x190ae78b54a1, .[32m[2012-02-21 15:22:00.594] [INFO] API - .[39mRESPONSE, createGroupIfNotExistsFor, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}) { 24: replace(this=.[32m[2012-02-21 15:22:00.594] [INFO] API - .[39mRESPONSE, createGroupIfNotExistsFor, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, 0x1c5bf38e9281, 0x296d95049371) { 25: StringReplaceGlobalRegExpWithFunction(this=, .[32m[2012-02-21 15:22:00.594] [INFO] API - .[39mRESPONSE, createGroupIfNotExistsFor, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}} , 0x1c5bf38e9281, 0x296d95049371) { 25: } -> .[32m[2012-02-21 15:22:00.594] [INFO] API - .[39mRESPONSE, createGroupIfNotExistsFor, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}} 24: } -> .[32m[2012-02-21 15:22:00.594] [INFO] API - .[39mRESPONSE, createGroupIfNotExistsFor, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}} 23: } -> .[32m[2012-02-21 15:22:00.594] [INFO] API - .[39mRESPONSE, createGroupIfNotExistsFor, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}} 23: (this=0x20a7c51f67f1, .[32m[2012-02-21 15:22:00.594] [INFO] API - .[39mRESPONSE, createGroupIfNotExistsFor, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}} , , ) { 24: new Buffer(this=0x296d95049521, .[32m[2012-02-21 15:22:00.594] [INFO] API - .[39mRESPONSE, createGroupIfNotExistsFor, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}} , , ) { 25: isArrayIsh(this=0x1f3d7da17bf1, .[32m[2012-02-21 15:22:00.594] [INFO] API - .[39mRESPONSE, createGroupIfNotExistsFor, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}} ) { 26: isArray(this=0x1f3d7da08089, .[32m[2012-02-21 15:22:00.594] [INFO] API - .[39mRESPONSE, createGroupIfNotExistsFor, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}} ) { 26: } -> 26: isBuffer(this=0x190ae78a8921, .[32m[2012-02-21 15:22:00.594] [INFO] API - .[39mRESPONSE, createGroupIfNotExistsFor, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}} ) { 26: } -> 25: } -> 25: (this=0x296d95049521, .[32m[2012-02-21 15:22:00.594] [INFO] API - .[39mRESPONSE, createGroupIfNotExistsFor, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}} , 0, , ) { 27: NonNumberToNumber(this=, ) { 27: } -> -nan 26: toLowerCase(this=utf8) { 26: .[32m[2012-02-21 15:22:00.594] [INFO] API - .[39mRESPONSE, createGroupIfNotExistsFor, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}} } -> utf8 25: } -> 152 24: } -> 24: (this=0x190ae78a8981, 1, 0x296d95049521, 0, 152, ) { 25: isBuffer(this=0x190ae78a8921, 0x296d95049521) { 25: } -> 24: } -> 152 23: } -> 22: } -> 21: } -> 20: } -> 19: } -> 18: } -> 18: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, , ) { 19: (this=0x296d9501b7c9, Content-Type, ) { 20: (this=0x296d9501b7c9, Content-Type) { 21: toLowerCase(this=Content-Type) { 21: } -> content-type 20: } -> application/json; charset=utf-8 19: } -> application/json; charset=utf-8 19: (this=0x296d9501b7c9, Content-Length, ) { 20: (this=0x296d9501b7c9, Content-Length) { 21: toLowerCase(this=Content-Length) { 21: } -> content-length 20: } -> 19: } -> 19: isBuffer(this=0x190ae78a8921, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}) { 19: } -> 19: (this=0x296d9501b7c9, Content-Length, 65) { 20: (this=0x296d9501b7c9, Content-Length, 65) { 21: toLowerCase(this=Content-Length) { 21: } -> content-length 21: (this=0x296d9501b7c9, Content-Length, 65) { 22: toLowerCase(this=Content-Length) { 22: } -> content-length 21: } -> 20: } -> 19: } -> 0x296d9501b7c9 19: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 20: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 21: (this=0x296d9501b7c9) { 22: (this=0x296d9501b7c9, 200, ) { 23: (this=0x296d9501b7c9, 200) { 24: (this=0x296d9501b7c9) { 25: (this=0x296d9501b7c9) { 25: } -> 25: (this=0x296d9501b7c9) { 26: keys(this=0x1f3d7da06299, 0x296d95020e69) { 26: } -> 0x296d9504b5b1 25: } -> 0x296d9504b4d9 24: } -> 0x296d9504b4d9 24: toString(this=200, ) { 24: } -> 200 24: (this=0x296d9501b7c9, HTTP/1.1 200 OK , 0x296d9504b4d9) { 25: keys(this=0x1f3d7da06299, 0x296d9504b4d9) { 25: } -> 0x296d9504bb81 25: isArray(this=0x1f3d7da08089, 0x296d9504b4d9) { 25: } -> 25: isArray(this=0x1f3d7da08089, Express) { 25: } -> 25: store(this=0x1f3d7da17bf1, X-Powered-By, Express) { 26: test(this=0x3e4f925e7a61, X-Powered-By) { 26: } -> 26: test(this=0x3e4f925e7891, X-Powered-By) { 26: } -> 26: test(this=0x3e4f925e7ca1, X-Powered-By) { 26: } -> 26: test(this=0x3e4f925e7a19, X-Powered-By) { 26: } -> 25: } -> 25: isArray(this=0x1f3d7da08089, Etherpad-Lite 10cbb48 (http://j.mp/ep-lite)) { 25: } -> 25: store(this=0x1f3d7da17bf1, Server, Etherpad-Lite 10cbb48 (http://j.mp/ep-lite)) { 26: test(this=0x3e4f925e7a61, Server) { 26: } -> 26: test(this=0x3e4f925e7891, Server) { 26: } -> 26: test(this=0x3e4f925e7ca1, Server) { 26: } -> 26: test(this=0x3e4f925e7a19, Server) { 26: } -> 25: } -> 25: isArray(this=0x1f3d7da08089, application/json; charset=utf-8) { 25: } -> 25: store(this=0x1f3d7da17bf1, Content-Type, application/json; charset=utf-8) { 26: test(this=0x3e4f925e7a61, Content-Type) { 26: } -> 26: test(this=0x3e4f925e7891, Content-Type) { 26: } -> 26: test(this=0x3e4f925e7ca1, Content-Type) { 26: } -> 26: test(this=0x3e4f925e7a19, Content-Type) { 26: } -> 25: } -> 25: isArray(this=0x1f3d7da08089, 65) { 25: } -> 25: store(this=0x1f3d7da17bf1, Content-Length, 65) { 26: test(this=0x3e4f925e7a61, Content-Length) { 26: } -> 26: test(this=0x3e4f925e7891, Content-Length) { 26: } -> 26: test(this=0x3e4f925e7ca1, Content-Length) { 26: } -> 25: } -> 24: } -> 23: } -> 22: } -> 21: } -> 21: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 22: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, , ) { 23: (this=0x296d9501b7c9, Content-Type, ) { 24: (this=0x296d9501b7c9, Content-Type) { 25: toLowerCase(this=Content-Type) { 25: } -> content-type 24: } -> application/json; charset=utf-8 23: } -> application/json; charset=utf-8 23: (this=0x296d9501b7c9, Content-Length, ) { 24: (this=0x296d9501b7c9, Content-Length) { 25: toLowerCase(this=Content-Length) { 25: } -> content-length 24: } -> 65 23: } -> 65 23: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 24: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 25: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, , ) { 26: (this=0x296d9501b7c9, Content-Type, ) { 27: (this=0x296d9501b7c9, Content-Type) { 28: toLowerCase(this=Content-Type) { 28: } -> content-type 27: } -> application/json; charset=utf-8 26: } -> application/json; charset=utf-8 26: (this=0x296d9501b7c9, Content-Length, ) { 27: (this=0x296d9501b7c9, Content-Length) { 28: toLowerCase(this=Content-Length) { 28: } -> content-length 27: } -> 65 26: } -> 65 26: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 27: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 28: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, , ) { 29: (this=0x296d9501b7c9, Content-Type, ) { 30: (this=0x296d9501b7c9, Content-Type) { 31: toLowerCase(this=Content-Type) { 31: } -> content-type 30: } -> application/json; charset=utf-8 29: } -> application/json; charset=utf-8 29: (this=0x296d9501b7c9, Content-Length, ) { 30: (this=0x296d9501b7c9, Content-Length) { 31: toLowerCase(this=Content-Length) { 31: } -> content-length 30: } -> 65 29: } -> 65 29: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 30: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 31: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, , ) { 32: (this=0x296d9501b7c9, Content-Type, ) { 33: (this=0x296d9501b7c9, Content-Type) { 34: toLowerCase(this=Content-Type) { 34: } -> content-type 33: } -> application/json; charset=utf-8 32: } -> application/json; charset=utf-8 32: (this=0x296d9501b7c9, Content-Length, ) { 33: (this=0x296d9501b7c9, Content-Length) { 34: toLowerCase(this=Content-Length) { 34: } -> content-length 33: } -> 65 32: } -> 65 32: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 33: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 34: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, , ) { 35: (this=0x296d9501b7c9, Content-Type, ) { 36: (this=0x296d9501b7c9, Content-Type) { 37: toLowerCase(this=Content-Type) { 37: } -> content-type 36: } -> application/json; charset=utf-8 35: } -> application/json; charset=utf-8 35: (this=0x296d9501b7c9, Content-Length, ) { 36: (this=0x296d9501b7c9, Content-Length) { 37: toLowerCase(this=Content-Length) { 37: } -> content-length 36: } -> 65 35: } -> 65 35: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 36: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 37: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, , ) { 38: (this=0x296d9501b7c9, Content-Type, ) { 39: (this=0x296d9501b7c9, Content-Type) { 40: toLowerCase(this=Content-Type) { 40: } -> content-type 39: } -> application/json; charset=utf-8 38: } -> application/json; charset=utf-8 38: (this=0x296d9501b7c9, Content-Length, ) { 39: (this=0x296d9501b7c9, Content-Length) { 40: toLowerCase(this=Content-Length) { 40: } -> content-length 39: } -> 65 38: } -> 65 38: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 39: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 40: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, , ) { 41: (this=0x296d9501b7c9, Content-Type, ) { 42: (this=0x296d9501b7c9, Content-Type) { 43: toLowerCase(this=Content-Type) { 43: } -> content-type 42: } -> application/json; charset=utf-8 41: } -> application/json; charset=utf-8 41: (this=0x296d9501b7c9, Content-Length, ) { 42: (this=0x296d9501b7c9, Content-Length) { 43: toLowerCase(this=Content-Length) { 43: } -> content-length 42: } -> 65 41: } -> 65 41: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 42: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 43: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, , ) { 44: (this=0x296d9501b7c9, Content-Type, ) { 45: (this=0x296d9501b7c9, Content-Type) { 46: toLowerCase(this=Content-Type) { 46: } -> content-type 45: } -> application/json; charset=utf-8 44: } -> application/json; charset=utf-8 44: (this=0x296d9501b7c9, Content-Length, ) { 45: (this=0x296d9501b7c9, Content-Length) { 46: toLowerCase(this=Content-Length) { 46: } -> content-length 45: } -> 65 44: } -> 65 44: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 45: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 46: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, , ) { 47: (this=0x296d9501b7c9, Content-Type, ) { 48: (this=0x296d9501b7c9, Content-Type) { 49: toLowerCase(this=Content-Type) { 49: } -> content-type 48: } -> application/json; charset=utf-8 47: } -> application/json; charset=utf-8 47: (this=0x296d9501b7c9, Content-Length, ) { 48: (this=0x296d9501b7c9, Content-Length) { 49: toLowerCase(this=Content-Length) { 49: } -> content-length 48: } -> 65 47: } -> 65 47: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 48: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 49: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, , ) { 50: (this=0x296d9501b7c9, Content-Type, ) { 51: (this=0x296d9501b7c9, Content-Type) { 52: toLowerCase(this=Content-Type) { 52: } -> content-type 51: } -> application/json; charset=utf-8 50: } -> application/json; charset=utf-8 50: (this=0x296d9501b7c9, Content-Length, ) { 51: (this=0x296d9501b7c9, Content-Length) { 52: toLowerCase(this=Content-Length) { 52: } -> content-length 51: } -> 65 50: } -> 65 50: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 51: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 52: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, , ) { 53: (this=0x296d9501b7c9, Content-Type, ) { 54: (this=0x296d9501b7c9, Content-Type) { 55: toLowerCase(this=Content-Type) { 55: } -> content-type 54: } -> application/json; charset=utf-8 53: } -> application/json; charset=utf-8 53: (this=0x296d9501b7c9, Content-Length, ) { 54: (this=0x296d9501b7c9, Content-Length) { 55: toLowerCase(this=Content-Length) { 55: } -> content-length 54: } -> 65 53: } -> 65 53: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 54: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, ) { 55: (this=0x296d9501b7c9, {"code":0,"message":"ok","data":{"groupID":"g.srx6RjSTUxHFWfrw"}}, , ) { 56: (this=0x296d9501b7c9, Content-Type, ) { 57: (this=0x296d9501b7c9, Content-Type) { 58: toLowerCase(this=Content-Type) { 58: } -> content-type 57: } -> application/json; charset=utf-8 56: } -> application/json; charset=utf-8 56: (this=0x296d9501b7c9, Content-Length, ) { 57: (this=0x296d9501b7c9, Content-Length) { 58: toLowerCase(this=Content-Length) { 58: } -> content-length 57: } -> 65 56: } -> 65

jhollinger commented 12 years ago

Sure wish I could duplicate this. Here are some thoughts:

  1. does this happen on existing groups, or just new groups?
  2. Look in node/db/PadManager.js in the exports.createGroupIfNotExistsFor function. Put in some debug prints (or use a debugger) and see what's what when things go to pot. If that function seems okay (and it looks like it is), then find the caller, and debug the callback it's passing.
Toumal commented 12 years ago

Just FYI, I found that when I clear my database I can fetch the list, but as soon as I try to insert a new pad via the API I get the error again. This is the content of my db:

mysql> select * from store; +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | key | value | +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | MYSQL_MIGRATION_LEVEL | 1 | | author2sessions:a.9lnU4M9wVGDSiRBQ | {"sessionIDs":{"s.4IWBtEDuKBGUK5YP":1,"s.zKPYDNCuvPvyGeQd":1,"s.A5VaazC0mgz2cpwR":1,"s.jzLVgf74gkY0pM7l":1,"s.9nubsHiFVp4nnUH2":1,"s.FLU6Q9olZu9vEv0O":1,"s.l8MHIiKRsHuHf6l4":1,"s.UgCfeb7TCeC3FRe9":1,"s.78FquMjpH8QJxZYm":1,"s.if17FFpgQBG5ho4U":1,"s.TYTtWUeWdbuGZeax":1,"s.Cizi37JnqXOHBQHD":1,"s.kHSOEjOM8gTrtAYf":1}} | | globalAuthor:a.9lnU4M9wVGDSiRBQ | {"colorId":30,"name":"13","timestamp":1331491359546} | | group2sessions:g.9H16WKS4g7eSId0Q | {"sessionIDs":{"s.4IWBtEDuKBGUK5YP":1,"s.zKPYDNCuvPvyGeQd":1,"s.A5VaazC0mgz2cpwR":1,"s.jzLVgf74gkY0pM7l":1,"s.9nubsHiFVp4nnUH2":1,"s.FLU6Q9olZu9vEv0O":1,"s.l8MHIiKRsHuHf6l4":1,"s.UgCfeb7TCeC3FRe9":1,"s.78FquMjpH8QJxZYm":1,"s.if17FFpgQBG5ho4U":1,"s.TYTtWUeWdbuGZeax":1,"s.Cizi37JnqXOHBQHD":1,"s.kHSOEjOM8gTrtAYf":1}} | | group:g.9H16WKS4g7eSId0Q | {"pads":{}} | | mapper2author:Toumal | "a.9lnU4M9wVGDSiRBQ" | | mapper2group:13 | "g.9H16WKS4g7eSId0Q" | | session:s.4IWBtEDuKBGUK5YP | {"groupID":"g.9H16WKS4g7eSId0Q","authorID":"a.9lnU4M9wVGDSiRBQ","validUntil":1331506800} | | session:s.78FquMjpH8QJxZYm | {"groupID":"g.9H16WKS4g7eSId0Q","authorID":"a.9lnU4M9wVGDSiRBQ","validUntil":1331506800} | | session:s.9nubsHiFVp4nnUH2 | {"groupID":"g.9H16WKS4g7eSId0Q","authorID":"a.9lnU4M9wVGDSiRBQ","validUntil":1331506800} | | session:s.A5VaazC0mgz2cpwR | {"groupID":"g.9H16WKS4g7eSId0Q","authorID":"a.9lnU4M9wVGDSiRBQ","validUntil":1331506800} | | session:s.Cizi37JnqXOHBQHD | {"groupID":"g.9H16WKS4g7eSId0Q","authorID":"a.9lnU4M9wVGDSiRBQ","validUntil":1331506800} | | session:s.FLU6Q9olZu9vEv0O | {"groupID":"g.9H16WKS4g7eSId0Q","authorID":"a.9lnU4M9wVGDSiRBQ","validUntil":1331506800} | | session:s.TYTtWUeWdbuGZeax | {"groupID":"g.9H16WKS4g7eSId0Q","authorID":"a.9lnU4M9wVGDSiRBQ","validUntil":1331506800} | | session:s.UgCfeb7TCeC3FRe9 | {"groupID":"g.9H16WKS4g7eSId0Q","authorID":"a.9lnU4M9wVGDSiRBQ","validUntil":1331506800} | | session:s.if17FFpgQBG5ho4U | {"groupID":"g.9H16WKS4g7eSId0Q","authorID":"a.9lnU4M9wVGDSiRBQ","validUntil":1331506800} | | session:s.jzLVgf74gkY0pM7l | {"groupID":"g.9H16WKS4g7eSId0Q","authorID":"a.9lnU4M9wVGDSiRBQ","validUntil":1331506800} | | session:s.kHSOEjOM8gTrtAYf | {"groupID":"g.9H16WKS4g7eSId0Q","authorID":"a.9lnU4M9wVGDSiRBQ","validUntil":1331506800} | | session:s.l8MHIiKRsHuHf6l4 | {"groupID":"g.9H16WKS4g7eSId0Q","authorID":"a.9lnU4M9wVGDSiRBQ","validUntil":1331506800} | | session:s.zKPYDNCuvPvyGeQd | {"groupID":"g.9H16WKS4g7eSId0Q","authorID":"a.9lnU4M9wVGDSiRBQ","validUntil":1331506800} | +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Toumal commented 12 years ago

I did some debugging and the CreateGroupIfNotExistsFor function seems fine.

It crashes in server.js right at the res._send(response) line:

//This is for making an api call, collecting all post information and passing it to the apiHandler
var apiCaller = function(req, res, fields)
{
  apiLogger.info("API CALL");
  res.header("Content-Type", "application/json; charset=utf-8");

  apiLogger.info("REQUEST, " + req.params.func + ", " + JSON.stringify(fields));

  //wrap the send function so we can log the response
  res._send = res.send;
  res.send = function(response)
  {
    apiLogger.info("Before stringify");
    response = JSON.stringify(response);
    apiLogger.info("RESPONSE, " + req.params.func + ", " + response);

    //is this a jsonp call, if yes, add the function call
    apiLogger.info("Before jsonp");
    if(req.query.jsonp)
      response = req.query.jsonp + "(" + response + ")";

    apiLogger.info("Before send");
    --------------------------This is the last seen log output ---------------------------------------
    res._send(response);
  }

  //call the api handler
    apiLogger.info("Before handle call");
  apiHandler.handle(req.params.func, fields, req, res);
    apiLogger.info("After handle call");
}

Console output:

[2012-03-11 14:01:19.703] [INFO] API - API POST CALL [2012-03-11 14:01:19.705] [INFO] API - API CALL [2012-03-11 14:01:19.705] [INFO] API - REQUEST, createGroupIfNotExistsFor, {"groupMapper":"13","apikey":"rFqIF49IlsRy5frbAi1gzitSA8bKZVPD"} [2012-03-11 14:01:19.705] [INFO] API - Before handle call [2012-03-11 14:01:19.707] [INFO] API - After handle call [2012-03-11 14:01:19.711] [DEBUG] ueberDB - GET - mapper2group:13 - null - from database [2012-03-11 14:01:19.712] [DEBUG] ueberDB - SET - group:g.loAuZDZyATt3pXP9 - {"pads":{}} - to buffer [2012-03-11 14:01:19.712] [INFO] API - Before stringify [2012-03-11 14:01:19.713] [INFO] API - RESPONSE, createGroupIfNotExistsFor, {"code":0,"message":"ok","data":{"groupID":"g.loAuZDZyATt3pXP9"}} [2012-03-11 14:01:19.713] [INFO] API - Before jsonp [2012-03-11 14:01:19.713] [INFO] API - Before send [2012-03-11 14:01:19.749] [ERROR] console - [RangeError: Maximum call stack size exceeded] [2012-03-11 14:01:19.752] [INFO] console - graceful shutdown... [2012-03-11 14:01:19.768] [INFO] ueberDB - Flushed 1 values

I'm sorry I'm not well versed with node.js, any hints on how I can debug the response handling? It's rather opaque to me at the moment...

Toumal commented 12 years ago

At the risk of being a nuisance, I'd very much like to find the reason behind this error and I'd appreciate any pointers.

jhollinger commented 12 years ago

No, you're definitely not being a nuisance. Sorry it's taken me so long to look into this. I've just started a new job and haven't had much time for open source lately.

It looks like an infinite recursive loop, but I'm not totally sure how it's happening. You'll have to be my eyes and ears since I still can't duplicate this. I've put a branch up at https://github.com/jhollinger/etherpad-lite/tree/bad. Check it out (either literally or just copy my changes) and see if it has any effect.

jhollinger commented 12 years ago

@Toumal, can you confirm that the above patch fixes this?

Toumal commented 12 years ago

Yes! Awesome, thanks a lot!