Rocket.chat: HipChat Cloud import fails (rooms -> channels)

Created on 13 Oct 2017  Â·  3Comments  Â·  Source: RocketChat/Rocket.Chat

Description:

Importing a HipChat (Cloud, not Enterprise) export file fails. Debug shows that the HipChat rooms have not been parsed (users and messages may be OK).

Server Setup Information:

  • Version of Rocket.Chat Server: 0.58.4
  • Operating System: Linux 64 bit (Ubuntu 16.04)
  • Deployment Method(snap/docker/tar/etc): snap
  • Number of Running Instances: 1
  • Node Version: 4.8.4

Steps to Reproduce:

  1. Generate an export file from a HipChat Cloud group.
  2. In Rocket.chat, go to Administration > Import and hit the HipChat button (not HipChat Enterprise).
  3. Hit the 'Choose File...' button and select the HipChat export file for upload.

Expected behavior:

Import to succeed, with users and channels created, and channels populated with messages.

Actual behavior:

Error message on screen: "The file uploaded isn't a valid HipChat export file".
Logs show that the users and messages appear to have been parsed successfully, but no channels ("rooms" in HipChat terms) have been parsed.

Relevant logs:

Server log (debug level):

[34mI20171013-14:20:42.330(11) [34mHipChat Importer âž” debug Uploaded file information is: { ext: 'zip', mime: 'application/zip' } 
[34mI20171013-14:20:42.332(11) [34mHipChat Importer âž” debug Expected file type is: application/zip 
[34mI20171013-14:20:42.335(11) [34mHipChat Importer âž” debug HipChat is now at importer_preparing_started. 
[34mI20171013-14:20:43.826(11) [34mHipChat Importer âž” debug HipChat is now at importer_preparing_channels. 
[34mI20171013-14:20:45.218(11) [34mHipChat Importer âž” debug HipChat is now at importer_preparing_users. 
[34mI20171013-14:20:45.245(11) [34mHipChat Importer âž” debug HipChat is now at importer_preparing_messages. 
[34mI20171013-14:21:07.739(11) [35mHipChat Importer âž” warn The loaded users count 59, the loaded channels 0, and the loaded messages 56035 
[34mI20171013-14:21:07.745(11) [34mHipChat Importer âž” debug HipChat is now at importer_import_failed. 
import bug

Most helpful comment

@dasgarner indeed the tempRooms definition as const seems to be the problem. It works for me fixing this w/o let and this from const to let.

All 3 comments

I also have this issue

I'm no expert but I think the const on this line is re-declaring tempRooms in a local scope, and therefore the tempRooms declared above is always empty.

Edit: and indeed it should be let tempRooms rather than const

@dasgarner indeed the tempRooms definition as const seems to be the problem. It works for me fixing this w/o let and this from const to let.

Sad that this has slipped under the radar :(

It's been broke for over a year due to the coffeescript to javascript conversion by @rodrigok https://github.com/RocketChat/Rocket.Chat/blame/8bee5761a78c83da7cdb52650daf3cd226906ace/packages/rocketchat-importer-hipchat/server.js

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danpospisil picture danpospisil  Â·  3Comments

Kiran-Rao picture Kiran-Rao  Â·  3Comments

zeigerpuppy picture zeigerpuppy  Â·  3Comments

karlprieb picture karlprieb  Â·  3Comments

brendanheywood picture brendanheywood  Â·  3Comments