Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 513719

Summary: If the diff is too big for the server to handle, "Disable no-extra parens" fix will result in something unexpected.
Product: [ECD] Orion Reporter: XinYi Jiang <xinyij>
Component: NodeAssignee: XinYi Jiang <xinyij>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: Michael_Rennie, remy.suen, snorthov
Version: 13.0   
Target Milestone: 15.0   
Hardware: PC   
OS: Mac OS X   
See Also: https://git.eclipse.org/r/94412
https://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=344763b6f7db4ed0f5998c4008cd11e2c0d4b80e
Whiteboard:
Bug Depends on:    
Bug Blocks: 514343    
Attachments:
Description Flags
Unexpected result none

Description XinYi Jiang CLA 2017-03-15 11:30:46 EDT
Created attachment 267276 [details]
Unexpected result

Steps:
1: In Node server
2: In Orion Editor open gitCommands.js file, you will see a whole page of blue curly lines, now use the "Disable no-extra- parens" quick fix from the right ruler.
3: You should be able to see the unexpected result as the screen shot.
Comment 1 Michael Rennie CLA 2017-03-15 11:53:50 EDT
Easily reproduced.

The problem is coming from the save request (you can confirm this by turning off auto-save - the shown error won't appear until you save).

It seems that the diff sent with the request is too large for our configured express to handle.
Comment 2 Michael Rennie CLA 2017-03-15 12:00:14 EDT
Looks like we would just need to bump up the payload limit size:

https://github.com/expressjs/body-parser#bodyparserjsonoptions
Comment 3 Steve Northover CLA 2017-03-28 16:16:21 EDT
Bumping the number up will fix this problem until we have to deal with a larger file.  We need a better error message.

For Electron, should there be any sort of limit?
Comment 4 Eclipse Genie CLA 2017-04-04 15:22:03 EDT
New Gerrit change created: https://git.eclipse.org/r/94412
Comment 5 XinYi Jiang CLA 2017-04-04 15:42:53 EDT
increase from 100kb to 200kb, and fixed endpoints error handling code.
Comment 7 XinYi Jiang CLA 2017-04-04 16:28:57 EDT
actually since Java server has no Json sise limitation, we decided to change it from 100kb to 10mb.