-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CastError: Cast to number failed for value "NaN" at path "supply" #350
Comments
Hi lubhub612, I've had the same issue. After some debugging, I've found a solution. change line 17 in the lib/explorer.js file to: |
I like this correction. Not sure why it wouldn't be there in the first place. |
I've had the same issue. After change line 17 in the lib/explorer.js file to: TypeError: Cannot read property 'length' of undefined i use mongodb 4.2.3 |
Your issue is unrelated. You can check previous solved issues.
…On Tue, Mar 3, 2020, 3:57 PM emarkproject ***@***.***> wrote:
I've had the same issue. After change line 17 in the lib/explorer.js file
to:
return cb(0);
there is a new error:
~/explorer$ node scripts/sync.js index update
script launched with pid: 31339
/home/rumhocker/explorer/lib/explorer.js:582
module.exports.syncLoop(tx.vin.length, function (loop) {
^
TypeError: Cannot read property 'length' of undefined
at Object.prepare_vin (/home/rumhocker/explorer/lib/explorer.js:582:36)
at /home/rumhocker/explorer/lib/database.js:128:11
at Request._callback (/home/rumhocker/explorer/lib/explorer.js:212:16)
at Request.self.callback
(/home/rumhocker/explorer/node_modules/request/request.js:185:22)
at Request.emit (events.js:311:20)
at Request.
(/home/rumhocker/explorer/node_modules/request/request.js:1154:10)
at Request.emit (events.js:311:20)
at IncomingMessage.
(/home/rumhocker/explorer/node_modules/request/request.js:1076:12)
at Object.onceWrapper (events.js:417:28)
at IncomingMessage.emit (events.js:323:22)
at endReadableNT (_stream_readable.js:1204:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
i use mongodb 4.2.3
Is there anyone with an idea?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#350?email_source=notifications&email_token=AAG2F5CC2TMKTOWGPCGAFVLRFVVK5A5CNFSM4KVCLNKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENVDXFQ#issuecomment-594164630>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG2F5CPOPVQ7G6JBZXJCT3RFVVK5ANCNFSM4KVCLNKA>
.
|
Dup of #56 |
Error during Stats Update: { CastError: Cast to number failed for value "NaN" at path "supply"
at new CastError (/root/es/explorer/node_modules/mongoose/lib/error/cast.js:29:11)
at SchemaNumber.cast (/root/es/explorer/node_modules/mongoose/lib/schema/number.js:315:11)
at SchemaNumber.SchemaType.applySetters (/root/es/explorer/node_modules/mongoose/lib/schematype.js:969:12)
at SchemaNumber.SchemaType._castForQuery (/root/es/explorer/node_modules/mongoose/lib/schematype.js:1383:15)
at SchemaNumber.castForQuery (/root/es/explorer/node_modules/mongoose/lib/schema/number.js:367:14)
at SchemaNumber.SchemaType.castForQueryWrapper (/root/es/explorer/node_modules/mongoose/lib/schematype.js:1352:15)
at castUpdateVal (/root/es/explorer/node_modules/mongoose/lib/helpers/query/castUpdate.js:463:19)
at walkUpdatePath (/root/es/explorer/node_modules/mongoose/lib/helpers/query/castUpdate.js:290:22)
at castUpdate (/root/es/explorer/node_modules/mongoose/lib/helpers/query/castUpdate.js:81:18)
at model.Query._castUpdate (/root/es/explorer/node_modules/mongoose/lib/query.js:4442:10)
at castDoc (/root/es/explorer/node_modules/mongoose/lib/query.js:4470:18)
at model.Query.Query._findAndModify (/root/es/explorer/node_modules/mongoose/lib/query.js:3448:22)
at model.Query. (/root/es/explorer/node_modules/mongoose/lib/query.js:3001:8)
at model.Query._wrappedThunk [as _findOneAndUpdate] (/root/es/explorer/node_modules/mongoose/lib/helpers/query/wrapThunk.js:16:8)
at process.nextTick (/root/es/explorer/node_modules/kareem/index.js:369:33)
at process._tickCallback (internal/process/next_tick.js:61:11)
message: 'Cast to number failed for value "NaN" at path "supply"',
name: 'CastError',
stringValue: '"NaN"',
kind: 'number',
value: NaN,
path: 'supply',
reason: undefined }
events.js:174
throw er; // Unhandled 'error' event
^
TypeError: Cannot read property 'last' of undefined
at /root/es/explorer/lib/database.js:771:31
at /root/es/explorer/node_modules/mongoose/lib/model.js:4599:16
at model.Query.Query._findAndModify (/root/es/explorer/node_modules/mongoose/lib/query.js:3461:16)
at model.Query. (/root/es/explorer/node_modules/mongoose/lib/query.js:3001:8)
at model.Query._wrappedThunk [as _findOneAndUpdate] (/root/es/explorer/node_modules/mongoose/lib/helpers/query/wrapThunk.js:16:8)
at process.nextTick (/root/es/explorer/node_modules/kareem/index.js:369:33)
at process._tickCallback (internal/process/next_tick.js:61:11)
Emitted 'error' event at:
at /root/es/explorer/node_modules/mongoose/lib/model.js:4601:13
at model.Query.Query._findAndModify (/root/es/explorer/node_modules/mongoose/lib/query.js:3461:16)
[... lines matching original stack trace ...]
at process._tickCallback (internal/process/next_tick.js:61:11)
I facing this issue , any sugestions
The text was updated successfully, but these errors were encountered: