Skip to content
GitLab
项目 群组 主题 代码片段
  • /
  • 帮助
    • 帮助
    • 支持
    • 社区论坛
    • 提交反馈
  • 登录
  • L large
  • 项目信息
    • 项目信息
    • 动态
    • 标记
    • 成员
  • 仓库
    • 仓库
    • 文件
    • 提交
    • 分支
    • 标签
    • 贡献者统计
    • 分支图
    • 比较修订版本
  • 议题 21
    • 议题 21
    • 列表
    • 看板
    • 服务台
    • 里程碑
  • 合并请求 12
    • 合并请求 12
  • CI/CD
    • CI/CD
    • 流水线
    • 作业
    • 产物
    • 计划
  • 部署
    • 部署
    • 环境
    • 发布
  • 软件包与镜像库
    • 软件包与镜像库
    • 软件包库
    • 容器镜像库
    • Terraform 模块
    • 模型实验
  • 监控
    • 监控
    • 事件
  • 分析
    • 分析
    • 价值流
    • CI/CD
    • 仓库
  • Wiki
    • Wiki
  • 代码片段
    • 代码片段
  • 动态
  • 分支图
  • 创建新议题
  • 作业
  • 提交
  • 议题看板
收起侧边栏
  • 王权利
  • large
  • 议题
  • #9030

Comment with unicode emoji result in 500 Internal Server Error

Created by: Senorsen

When using unicode emoji (👍) in Android or iOS phone (which can input unicode emoji characters) , there's a 500 Internal Server Error and the ajax refresh fails.

I'm using GitLab 7.9.0.rc3 68dcfab which uses MySQL.

part of production.log:

Started POST "/qsc-mobile/qsc-mobile-ios/notes" for 127.0.0.1 at 2015-03-26 08:07:12 +0800
Processing by Projects::NotesController#create as JSON
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"hidden", "target_type"=>"commit", "target_id"=>"hidden", "note"=>{"commit_id"=>"hidden", "noteable_id"=>"", "noteable_type"=>"Commit", "note"=>"👍"}, "commit"=>"Add Comment", "namespace_id"=>"qsc-mobile", "project_id"=>"qsc-mobile-ios"}
Mysql2::Error: Incorrect string value: '\xF0\x9F\x91\x8D' for column 'note' at row 1: INSERT INTO `notes` (`author_id`, `commit_id`, `created_at`, `note`, `noteable_type`, `project_id`, `st_diff`, `system`, `updated_at`) VALUES (21, 'hidden', '2015-03-26 00:07:12', '👍', 'Commit', 2, NULL, 0, '2015-03-26 00:07:12')

Sent mail to xxxx@gmail.com (1582.0ms)
Completed 500 Internal Server Error in 113ms

ActiveRecord::StatementInvalid (Mysql2::Error: Incorrect string value: '\xF0\x9F\x91\x8D' for column 'note' at row 1: INSERT INTO `notes` (`author_id`, `commit_id`, `created_at`, `note`, `noteable_type`, `project_id`, `st_diff`, `system`, `updated_at`) VALUES (21, 'hidden', '2015-03-26 00:07:12', '👍', 'Commit', 2, NULL, 0, '2015-03-26 00:07:12')):
  app/services/notes/create_service.rb:8:in `execute'
  app/controllers/projects/notes_controller.rb:24:in `create'
  lib/gitlab/middleware/timeout.rb:9:in `call'



Sent mail to yyyy@gmail.com (1623.4ms)

Sent mail to xxxx@me.com (1698.1ms)

Thanks.

指派人
分配到
工时统计