mirror of
https://github.com/appy-one/acebase-server.git
synced 2026-05-25 06:02:16 -06:00
[GH-ISSUE #8] Admin UI export json header error #4
Labels
No labels
bug
enhancement
feature request
pull-request
types
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/acebase-server#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @theoparis on GitHub (Jul 7, 2021).
Original GitHub issue: https://github.com/appy-one/acebase-server/issues/8
Hi there. Thanks for making acebase, its amazing. I just ran into an issue when I click on the
You can export the value of this node to jsonbutton in the admin ui.This occurs in the acebase server file on line 2162. Everything else such as logging in and navigating seems to work fine.
Also, not sure if this is a super useful idea, but it would be nice to see acebase server be able to be used as a middleware, so you can use it in an existing express app instead of creating a new one and listening on a different port.
@theoparis commented on GitHub (Jul 7, 2021):
Seems like the solution is to use
Instead of using res.write();
and then in .export().then simply use
res.send(data)I'm making a fork with updated dependencies and latest nodejs in the dockerfile. It also fixes this issue. I can make a PR as well
@appy-one commented on GitHub (Jul 7, 2021):
Thanks, I'll take a look at it. Your proposed fix does not stream the output though, which is problematic when exporting large nodes!
@appy-one commented on GitHub (Jul 7, 2021):
I've found what might be causing this. If there is an error while streaming the output, it does
res.statusCode = 500inref.export's catch handler - which is obviously not allowed because it has been streaming data already. The error triggering this issue is probably a timeout for getting all data of a large node (or entire db?). How large is the data you are trying to export?@appy-one commented on GitHub (Jul 7, 2021):
I've fixed it by changing the stream to:
Commit will follow later today
@appy-one commented on GitHub (Jul 8, 2021):
Committed and published in
acebase-serverv1.2.3