Skip to content

query using in operator throws Identifier expects Buffer #234

Closed

Description

@dashameter

Using an array of buffer identity Ids:

ownerIds :>>  (5) [Uint8Array(32), Uint8Array(32), Uint8Array(32), Uint8Array(32), Uint8Array(32)]

And a query using the in operator according to https://dashplatform.readme.io/docs/reference-query-syntax#operator-examples

        {
          where: [["$ownerId", "in", ownerIds]],
        }

throws:

Uncaught (in promise) IdentifierError: Identifier expects Buffer
    at new Identifier (webpack-internal:///./node_modules/@dashevo/dpp/lib/identifier/Identifier.js:18:11)
    at Function.from (webpack-internal:///./node_modules/@dashevo/dpp/lib/identifier/Identifier.js:106:10)
    at convertIdentifierProperties (webpack-internal:///./node_modules/dash/build/src/SDK/Client/Platform/methods/documents/get.js:93:55)
    at eval (webpack-internal:///./node_modules/dash/build/src/SDK/Client/Platform/methods/documents/get.js:130:88)
    at Array.map (<anonymous>)
    at Platform.eval (webpack-internal:///./node_modules/dash/build/src/SDK/Client/Platform/methods/documents/get.js:130:49)
    at step (webpack-internal:///./node_modules/dash/build/src/SDK/Client/Platform/methods/documents/get.js:33:23)
    at Object.eval [as next] (webpack-internal:///./node_modules/dash/build/src/SDK/Client/Platform/methods/documents/get.js:14:53)
    at fulfilled (webpack-internal:///./node_modules/dash/build/src/SDK/Client/Platform/methods/documents/get.js:5:58)
IdentifierError @ IdentifierError.js?93a2:12
Identifier @ Identifier.js?3e2b:18
from @ Identifier.js?3e2b:106
convertIdentifierProperties @ get.js?ae15:93

Same happens for an Array of String identityIds.

see: https://discord.com/channels/670271785974890526/718217459144065045/847055564805767178 and https://discord.com/channels/670271785974890526/670599939528851476/937918648717303838

Activity

  1. added
    bug
    on Feb 1, 2022
  2. dash-maverick commented on Mar 31, 2022

    @dash-maverick
  3. dash-maverick commented on Apr 1, 2022

    @dash-maverick

    please try a retest considering new updated in the docs for v0.22

  4. thephez commented on Apr 4, 2022

    @thephez
    Collaborator

    IIRC this was a platform bug, not an issue with the actual query. I doubt the updated docs will have changed anything, but perhaps the underlying issue was fixed also.

  5. dash-maverick commented on Apr 6, 2022

    @dash-maverick

    Hey, may be related to #315 . Please check your index definitions

  6. shumkov commented on Sep 26, 2024

    @shumkov
    Collaborator

    It fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions