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

Bug 516056

Summary: Importing a zip file is broken on node server.
Product: [ECD] Orion Reporter: libing wang <libingw>
Component: NodeAssignee: XinYi Jiang <xinyij>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Michael_Rennie, remy.suen, xinyij
Version: unspecified   
Target Milestone: 16.0   
Hardware: PC   
OS: Mac OS X   
See Also: https://github.com/eclipse/orion.client/pull/72
Whiteboard:
Attachments:
Description Flags
the file to import none

Description libing wang CLA 2017-05-02 11:53:47 EDT
Created attachment 268121 [details]
the file to import

Use the attached zip and import into a folder in orion.eclipse.org. It failed.
Comment 1 libing wang CLA 2017-05-02 11:54:40 EDT
Seems that the java server imported the zip file but it should create a top folder containing all the files.
Comment 2 Remy Suen CLA 2017-05-02 18:09:30 EDT
Error: Error: invalid signature: 0x4b500003
    at lib\xfer.js:199:10)
    at emitOne (events.js:101:20)
    at Parse.emit (events.js:188:7)
    at node_modules\unzip2\lib\parse.js:64:12
    at runCallback (timers.js:649:20)
    at tryOnImmediate (timers.js:622:5)

An error is being thrown during the unzipping process.

https://github.com/eclipse/orion.client/blob/4e972425e8936973cd8f6b2a4d6d4f9d7f7bc351/modules/orionode/lib/xfer.js#L198-L208

However, due to a bug in the error handling code, the client gets a 200 sent back instead of a 4xx so it assumes the unzip has completed successfully and the error is not reported back in the browser UI.
Comment 3 Eclipse Genie CLA 2017-06-19 15:43:24 EDT
GitHub Pull Request 72 created by [soulbeing]
https://github.com/eclipse/orion.client/pull/72
Comment 4 Michael Rennie CLA 2017-08-18 10:47:38 EDT
The PR was merged.