otetard / ownpad

Ownpad is a Nextcloud application that allows to create and open Etherpad and Ethercalc documents.
GNU Affero General Public License v3.0
57 stars 24 forks source link

Export to Excel results in Error: Can't set headers after they are sent #81

Open kruthoff opened 5 years ago

kruthoff commented 5 years ago

Thank you otetard for the ethercalc integration into Nextcloud!

It works great here, except when I want to Save/Export a sheet to Excel. The ethercalc stops with this stacktrace (see below).

Exporting a sheet directly out of the ethercalc app without using Nextcloud works, on the other hand.

Any help in resolving this issue is much appreciated!

Hint, maybe? http://www.nodejsrecipes.com/recipes/7042340/error-cant-set-headers-after-they-are-sent-to-the-client

Connected to Redis Server: localhost:6379 join [log-mj88kke7ni2gx9r8.1_formdata] [user-0.3155624284405858] join [log-mj88kke7ni2gx9r8.1] [user-0.3155624284405858] /home/pi/node_modules/ethercalc/node_modules/redis/index.js:602 throw err; Error: Can't set headers after they are sent. at validateHeader (_http_outgoing.js:491:11) at ServerResponse.setHeader (_http_outgoing.js:498:3) at ServerResponse.res.setHeader (/home/pi/node_modules/ethercalc/node_modules/zappajs/node_modules/express/node_modules/connect/lib/patch.js:133:22) at ServerResponse.res.set.res.header (/home/pi/node_modules/ethercalc/node_modules/zappajs/node_modules/express/lib/response.js:578:10) at ServerResponse.res.contentType.res.type (/home/pi/node_modules/ethercalc/node_modules/zappajs/node_modules/express/lib/response.js:447:15) at /home/pi/node_modules/ethercalc/main.js:136:32 at try_callback (/home/pi/node_modules/ethercalc/node_modules/redis/index.js:592:9) at RedisClient.return_reply (/home/pi/node_modules/ethercalc/node_modules/redis/index.js:685:13) at ReplyParser.<anonymous> (/home/pi/node_modules/ethercalc/node_modules/redis/index.js:321:14) at emitOne (events.js:116:13) at ReplyParser.emit (events.js:211:7) at ReplyParser.send_reply (/home/pi/node_modules/ethercalc/node_modules/redis/lib/parser/javascript.js:300:10) at ReplyParser.execute (/home/pi/node_modules/ethercalc/node_modules/redis/lib/parser/javascript.js:203:22) at RedisClient.on_data (/home/pi/node_modules/ethercalc/node_modules/redis/index.js:547:27) at Socket.<anonymous> (/home/pi/node_modules/ethercalc/node_modules/redis/index.js:102:14) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) at Socket.Readable.push (_stream_readable.js:208:10) at TCP.onread (net.js:607:20)