Description
On the Emoticons page (/emoticons), clicking the Trash icon for a custom emoticon results in a spinner being displayed. However, the page never refreshes and the emoticon is not deleted.
Root cause
A small image causes this problem.
Affected versions
- HipChat Server 1.3.4
- HipChat Server 1.3.5
- HipChat Server 1.3.7
- HipChat Server 1.3.8
- HipChat Server 1.3.9
- HipChat Server 1.4.0
- HipChat Server 1.4.1
Errors in /var/log/hipchat/web.log
2015-11-09T01:02:07.977846+00:00 server-hanis web[9363]: emoticons/delete#REQ8C46F9 uid-1 18ms [info] Deleting emoticon from S3 -- ID: 211 -- PATH: 1/fonzie.png
2015-11-09T01:02:07.978011+00:00 server-hanis web[9363]: emoticons/delete#REQ8C46F9 uid-1 18ms [info] Deleting hi-res image version: 1/fonzie.png
2015-11-09T01:02:07.982846+00:00 server-hanis web[9363]: emoticons/delete#REQ8C46F9 uid-1 23ms [alert] Uncaught Exception: S3::deleteObject(): [404] Unexpected HTTP status in file /hipchat-scm/web/system/core/Kohana.php on line 865\n\n0: in Kohana::exception_handler()\n1: /hipchat-scm/web/application/vendor/S3.php:326 -> trigger_error()\n2: /hipchat-scm/web/application/vendor/S3.php:1109 -> __triggerError()\n3: /hipchat-scm/web/application/libraries/HipchatS3.php:125 -> deleteObject()\n4: /hipchat-scm/web/application/controllers/emoticons.php:119 -> deleteEmoticon()\n5: in Emoticons_Controller::delete()\n6: /hipchat-scm/web/system/core/Kohana.php:284 -> invokeArgs()\n7: in Kohana::instance()\n8: /hipchat-scm/web/system/core/Event.php:209 -> call_user_func()\n9: /hipchat-scm/web/system/core/Bootstrap.php:55 -> run()\n10: /hipchat-scm/web/www/index.php:109 -> require()\n\nurl: https://server-hanis.hipch.at/emoticons/delete\nmethod: POST\nreferrer: https://server-hanis.hipch.at/emoticons\nserver: \nremote_addr: 104.192.142.137\nuser_agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36\nx_hipchat_request: public\nrequest_data: {"id":"211","xsrf_token":"385884227"}
Workaround
- Snap-shot your instance (if you don't have one already)
- Log into the console and run this command (For 1.3.7, kindly reach out to the Support team on how you can get the database password):
mysql -uroot -pyesiwishthat hipchat
- Then view the emoticon id's
select * FROM emoticons;
- Find the id of the emoticon you want to delete and run this command:
delete from emoticons where id=<emoticon_id>;
- Then exit the database
exit