Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-947

Querying collections with unicode names throws error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.1.0
    • Component/s: Wire Protocol
    • Labels:
      None
    • Environment:
      Ubuntu 14.04, Ruby 2.1.6
    • # Replies:
      11
    • Last comment by Customer:
      true
    • Sprint:
      Ruby Sprint 21, Ruby Sprint 24

      Description

      This seems to be an encoding issue, when the driver attempts to serialize to BSON it gets an encoding mismatch. Here's a chunk of stack trace:

      Encoding::CompatibilityError: incompatible character encodings: ASCII-8BIT and UTF-8
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/protocol/serializers.rb:77:in `serialize'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/protocol/message.rb:155:in `block in serialize_fields'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/protocol/message.rb:141:in `each'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/protocol/message.rb:141:in `serialize_fields'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/protocol/message.rb:70:in `serialize'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/server/connection.rb:123:in `block in write'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/server/connection.rb:122:in `each'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/server/connection.rb:122:in `write'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/server/connectable.rb:66:in `block in dispatch'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/loggable.rb:44:in `log'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/loggable.rb:65:in `log_debug'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/server/connectable.rb:65:in `dispatch'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/operation/read/query.rb:61:in `block in execute_message'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/server/connection_pool.rb:99:in `with_connection'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/server/context.rb:63:in `with_connection'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/operation/read/query.rb:60:in `execute_message'

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since reply:
                  3 years, 4 weeks, 4 days ago
                  Date of 1st Reply: