You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CastError: Cast to string failed for value "{ '0': 'test',
'1': 'test',
'2': 'test',
'3': 'test',
'4': 'test',
'5': 'test',
'6': 'test',
'7': 'test',
'8': 'test',
'9': 'test',
'10': 'test',
'11': 'test',
'12': 'test',
'13': 'test',
'14': 'test',
'15': 'test',
'16': 'test',
'17': 'test',
'18': 'test',
'19': 'test',
'20': 'test',
'21': 'test' }" at path "cId" for model "profiles"
at MongooseError.CastError (/Users/loicbisiere/projects/2PS/api/node_modules/mongoose/lib/error/cast.js:26:11)
at SchemaString.cast (/Users/loicbisiere/projects/2PS/api/node_modules/mongoose/lib/schema/string.js:455:9)
at SchemaString.castForQuery (/Users/loicbisiere/projects/2PS/api/node_modules/mongoose/lib/schema/string.js:509:15)
at SchemaString.handleArray (/Users/loicbisiere/projects/2PS/api/node_modules/mongoose/lib/schematype.js:908:18)
at SchemaString.castForQuery (/Users/loicbisiere/projects/2PS/api/node_modules/mongoose/lib/schema/string.js:503:20)
at cast (/Users/loicbisiere/projects/2PS/api/node_modules/mongoose/lib/cast.js:217:39)
at Query.cast (/Users/loicbisiere/projects/2PS/api/node_modules/mongoose/lib/query.js:2915:12)
at Query.find (/Users/loicbisiere/projects/2PS/api/node_modules/mongoose/lib/query.js:1168:10)
at /Users/loicbisiere/projects/2PS/api/node_modules/mongoose/lib/query.js:2728:21
From previous event:
at Query.exec (/Users/loicbisiere/projects/2PS/api/node_modules/mongoose/lib/query.js:2722:17)
at executeQuery (/Users/loicbisiere/projects/2PS/api/node_modules/feathers-mongoose/lib/service.js:134:18)
at Object._find (/Users/loicbisiere/projects/2PS/api/node_modules/feathers-mongoose/lib/service.js:159:14)
at Object.find (/Users/loicbisiere/projects/2PS/api/node_modules/feathers-mongoose/lib/service.js:165:25)
at /Users/loicbisiere/projects/2PS/api/node_modules/feathers-hooks/lib/hooks.js:101:31
at new Promise (/Users/loicbisiere/projects/2PS/api/node_modules/core-js/modules/es6.promise.js:191:7)
at /Users/loicbisiere/projects/2PS/api/node_modules/feathers-hooks/lib/hooks.js:85:16
at run (/Users/loicbisiere/projects/2PS/api/node_modules/core-js/modules/es6.promise.js:87:22)
at /Users/loicbisiere/projects/2PS/api/node_modules/core-js/modules/es6.promise.js:100:28
at flush (/Users/loicbisiere/projects/2PS/api/node_modules/core-js/modules/_microtask.js:18:9)
at _combinedTickCallback (node.js:376:9)
at process._tickCallback (node.js:407:11)
If $in array length > 21 crash, if $in array length <= 21 no problem.
System configuration
Module versions
feathers 2.1.1
feathers-mongoose 5.0.3
mongoose 4.9.2
NodeJS version:
v5.9.1
Operating System:
MaxOSX 10.11.6
The text was updated successfully, but these errors were encountered:
The issue is a limitation in the querystring module which limits the size of arrays to 20 items. The recommended solution is to implement your own query parser with the arrayLimit option set to a higher value.
Steps to reproduce
Generate this error:
If $in array length > 21 crash, if $in array length <= 21 no problem.
System configuration
Module versions
NodeJS version:
v5.9.1
Operating System:
MaxOSX 10.11.6
The text was updated successfully, but these errors were encountered: