RocketChat / RocketChat/Rocket.Chat
6.1.2: Data Export not working
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
After updating Rocket.Chat from 5.4.3. to 6.1.2, the links generated by (Avatar → "My Account" → "Preferences" → ) "My Data" point to empty web pages (according to Firefox' "Show Source") and don't begin any download.
(We last successfully tested this after updating from 5.4.1 to 5.4.2 back in February.)
Steps to reproduce:
- Go to Avatar → "My Account" → "Preferences" → "My Data"
- Click on either "Export my data (JSON)" or "Download my data (HTML)"
- If a recent export exists, the link will be shown; if not, it will be e-mailed to you after a couple of minutes
- Click that link
- See that the resulting page (
https://[your_rc_url]/data-export/[random_string]) is empty (according to "Show Source" in Firefox) / a minimal page with an empty body (according to "Inspect" in Firefox)—I haven't recently used those two features together in a similar scenario, so I don't know if that is the default behavior, see "Additional context" below.
Expected behavior:
A download of the zip file should begin.
Actual behavior:
We are using the default settings for that feature (empty paths in "Administration" → "Workspace" → "Settings" → "User Data Download" → "Open"). Those undocumented settings seem to write the files into /tmp/userData${random}/ and then create an archive from them in /tmp/zipFiles/. I don't know what happens next, because even with debug logging, the only thing in the logs is this:
{"level":35,"time":"2023-04-13T17:38:09.846Z","pid":25054,"hostname":"[my_hostname]","name":"Meteor","method":"getAvatarSuggestion","userId":"[my_userid]","userAgent":"Mozilla/5.0 […] Firefox/102.0","referer":"https://[my_rc_server.example]/account/profile","remoteIP":"[some_ip]","instanceId":"[my_instance_id]"}
{"level":40,"time":"2023-04-13T17:38:09.846Z","pid":25054,"hostname":"[my_hostname]","name":"DeprecationWarning","section":"METHOD","msg":"getAvatarSuggestion will be deprecated in future versions of Rocket.Chat"}
{"level":35,"time":"2023-04-13T17:38:11.431Z","pid":25054,"hostname":"[my_hostname]","name":"API","method":"GET","url":"/api/v1/users.getAvatarSuggestion","userId":"[my_userid]","userAgent":"Mozilla/5.0 […] Firefox/102.0","host":"[my_rc_server.example]","referer":"https://[my_rc_server.example]/account/profile","remoteIP":"[some_ip]","status":200,"responseTime":1593}
{"level":35,"time":"2023-04-13T17:38:13.136Z","pid":25054,"hostname":"[my_hostname]","name":"Meteor","method":"requestDataDownload","userId":"[my_userid]","userAgent":"Mozilla/5.0 […] Firefox/102.0","remoteIP":null,"instanceId":"[my_instance_id]"}
{"level":35,"time":"2023-04-13T17:38:25.715Z","pid":25054,"hostname":"[my_hostname]","name":"Meteor","method":"requestDataDownload","userId":"[my_userid]","userAgent":"Mozilla/5.0 […] Firefox/102.0","remoteIP":null,"instanceId":"[my_instance_id]"}
# me opening the Admin Workspace and seeing the "Go fully featured" nag screen
{"level":35,"time":"2023-04-13T17:38:36.024Z","pid":25054,"hostname":"[my_hostname]","name":"Meteor","method":"cloud:checkRegisterStatus","userId":"[my_userid]","userAgent":"Mozilla/5.0 […] Firefox/102.0","remoteIP":null,"instanceId":"[my_instance_id]"}
Server Setup Information:
- Version of Rocket.Chat Server: 6.1.2
- Operating System: Debian GNU/Linux 11 (bullseye)
- Deployment Method: rocketchatctl
- Number of Running Instances: 2 (one staging, one production)
- DB Replicaset Oplog: I don't know how to answer this.
- NodeJS Version: v14.19.3
- MongoDB Version: 5.0.9 / wiredTiger (oplog Enabled)
Client Setup Information
- Desktop App or Browser Version: Firefox 102.9.0esr
- Operating System: openSUSE Leap 15.4
Additional context
The server is behind a firewall (incoming and outgoing). The clients are using a VPN. Both are using proxies.
According to Firefox' Inspect, this is the contents of the download page (while show-source displays it as completely empty):
<html><head><link rel="stylesheet" href="resource://content-accessible/plaintext.css"><script src="moz-extension://48c3788a-b1ed-4211-89b8-dc999270c701/assets/prompt.js"></script></head><body><pre></pre></body></html>
Relevant logs:
Server log above.
Browser error log:
PushServiceWebSocket: beginWSSetup: Error opening websocket. asyncOpen failed
Exception { name: "NS_ERROR_SOCKET_CREATE_FAILED", message: "Component returned failure code: 0x804b0034 (NS_ERROR_SOCKET_CREATE_FAILED) [nsIWebSocketChannel.asyncOpen]", result: 2152398900, filename: "resource://gre/modules/PushServiceWebSocket.jsm", lineNumber: 540, columnNumber: 0, data: null, stack: "_beginWSSetup@resource://gre/modules/PushServiceWebSocket.jsm:540:16\n_onTimerFired@resource://gre/modules/PushServiceWebSocket.jsm:182:12\nobserve@resource://gre/modules/PushServiceWebSocket.jsm:155:12\n", location: XPCWrappedNative_NoHelper }
columnNumber: 0
data: null
filename: "resource://gre/modules/PushServiceWebSocket.jsm"
lineNumber: 540
location: XPCWrappedNative_NoHelper { QueryInterface: QueryInterface(), filename: Getter, name: Getter, … }
QueryInterface: function QueryInterface()
asyncCaller: null
asyncCause: null
caller: XPCWrappedNative_NoHelper { QueryInterface: QueryInterface(), filename: , name: , … }
columnNumber: 16
filename: "resource://gre/modules/PushServiceWebSocket.jsm"
formattedStack: "_beginWSSetup@resource://gre/modules/PushServiceWebSocket.jsm:540:16\n_onTimerFired@resource://gre/modules/PushServiceWebSocket.jsm:182:12\nobserve@resource://gre/modules/PushServiceWebSocket.jsm:155:12\n"
lineNumber: 540
name: "_beginWSSetup"
nativeSavedFrame: SavedFrame { source: "resource://gre/modules/PushServiceWebSocket.jsm", sourceId: 789, line: 540, … }
sourceId: 789
sourceLine: ""
toString: function toString()
<get asyncCaller()>: function asyncCaller()
<get asyncCause()>: function asyncCause()
<get caller()>: function caller()
<get columnNumber()>: function columnNumber()
<get filename()>: function filename()
<get formattedStack()>: function formattedStack()
<get lineNumber()>: function lineNumber()
<get name()>: function name()
<get nativeSavedFrame()>: function nativeSavedFrame()
<get sourceId()>: function sourceId()
<get sourceLine()>: function sourceLine()
<prototype>: Object { … }
message: "Component returned failure code: 0x804b0034 (NS_ERROR_SOCKET_CREATE_FAILED) [nsIWebSocketChannel.asyncOpen]"
name: "NS_ERROR_SOCKET_CREATE_FAILED"
result: 2152398900
stack: "_beginWSSetup@resource://gre/modules/PushServiceWebSocket.jsm:540:16\n_onTimerFired@resource://gre/modules/PushServiceWebSocket.jsm:182:12\nobserve@resource://gre/modules/PushServiceWebSocket.jsm:155:12\n"
<prototype>: ExceptionPrototype { toString: toString(), name: Getter, message: Getter, … }
columnNumber:
data:
filename:
lineNumber:
location:
message:
name:
result:
stack:
toString: function toString()
Symbol(Symbol.toStringTag): "Exception"
<get columnNumber()>: function columnNumber()
<get data()>: function data()
<get filename()>: function filename()
<get lineNumber()>: function lineNumber()
<get location()>: function location()
<get message()>: function message()
<get name()>: function name()
<get result()>: function result()
<get stack()>: function stack()
<set stack()>: function stack()
<prototype>: Object { … }
PushServiceWebSocket.jsm:543
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the export flow from Avatar → My Account → Preferences → My Data, then inspect the server logs and User Data Download settings described in the issue. Compare the generated data-export link with the expected response; done means both JSON and HTML export links download the generated zip archive.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100