Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #9030

Closed
Open
Created Mar 26, 2015 by Administrator@rootOwner

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 [email protected] (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 [email protected] (1623.4ms)

Sent mail to [email protected] (1698.1ms)

Thanks.

Assignee
Assign to
Time tracking