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).
Import to succeed, with users and channels created, and channels populated with messages.
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.
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.
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
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
Most helpful comment
@dasgarner indeed the
tempRoomsdefinition asconstseems to be the problem. It works for me fixing this w/oletand this fromconsttolet.