So mongoose was working just fine for more than 2 months, but suddenly crashed with this error
/home/container/node_modules/mongodb/lib/cmap/connection.js:210
callback(new error_1.MongoServerError(document));
^
MongoServerError: bad auth : Authentication failed.
at Connection.onMessage (/home/container/node_modules/mongodb/lib/cmap/connection.js:210:30)
at MessageStream.<anonymous> (/home/container/node_modules/mongodb/lib/cmap/connection.js:63:60)
at MessageStream.emit (node:events:527:28)
at processIncomingData (/home/container/node_modules/mongodb/lib/cmap/message_stream.js:132:20)
at MessageStream._write (/home/container/node_modules/mongodb/lib/cmap/message_stream.js:33:9)
at writeOrBuffer (node:internal/streams/writable:390:12)
at _write (node:internal/streams/writable:331:10)
at MessageStream.Writable.write (node:internal/streams/writable:335:10)
at TLSSocket.ondata (node:internal/streams/readable:777:22)
at TLSSocket.emit (node:events:527:28) {
ok: 0,
code: 8000,
codeName: 'AtlasError',
[Symbol(errorLabels)]: Set(1) { 'HandshakeError' }
}
Anyone knows what is the issue?
My IP is configured as access from anywhere correctly
Using connection to application, my uri is well configured and copy pasted to my project, and again the connection was perfect for 2months but stopped out of nowhere
Related
I'm trying to make a mineflayer bot but it seems to keep sending the same error. Here is the code:
const mineflayer = require('mineflayer')
const bot = mineflayer.createBot({
host: 'localhost',
port: ,
username: 'Test_Bot'
})
And here is the error:
Error: Unsupported brand channel name
at getBrandCustomChannelName (/Users/jeonghunchae/Desktop/Bots/node_modules/mineflayer/lib/plugins/game.js:22:11)
at inject (/Users/jeonghunchae/Desktop/Bots/node_modules/mineflayer/lib/plugins/game.js:67:24)
at /Users/jeonghunchae/Desktop/Bots/node_modules/mineflayer/lib/plugin_loader.js:41:7
at Array.forEach (<anonymous>)
at injectPlugins (/Users/jeonghunchae/Desktop/Bots/node_modules/mineflayer/lib/plugin_loader.js:40:16)
at EventEmitter.onInjectAllowed (/Users/jeonghunchae/Desktop/Bots/node_modules/mineflayer/lib/plugin_loader.js:12:5)
at Object.onceWrapper (node:events:627:28)
at EventEmitter.emit (node:events:513:28)
at Client.next (/Users/jeonghunchae/Desktop/Bots/node_modules/mineflayer/lib/loader.js:124:9)
at Object.onceWrapper (node:events:627:28)
jeonghunchae#2015017 Bots %
Is there any way how I can fix this error?
First I tried to make a lan server in my world and it sent this error. Then I created a private server with online-mod: false but it still sent the same error.
I had the same Problem.
After a lot of research I found that I was not sure if my minecraft Version(1.19.2) was supported by Mineflayer.
After switching to 1.19 the error Message was gone.
I have Redis server running on localhost at port 6379 and I'm connecting to it like that:
const redisClient = redis.createClient({
url: `redis://localhost:6379`,
legacyMode: false
});
Although when I try to connect to it, it gives the following error:
TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received undefined
at new NodeError (node:internal/errors:371:5)
at _write (node:internal/streams/writable:312:13)
at WriteStream.Writable.write (node:internal/streams/writable:334:10)
at Commander.<anonymous> (C:\Users\atsukoro\Desktop\Projekty\simpleanilist\src\index.ts:42:24)
at Commander.emit (node:events:526:28)
at Commander.emit (node:domain:475:12)
at RedisSocket.<anonymous> (C:\Users\atsukoro\Desktop\Projekty\simpleanilist\node_modules\#redis\client\dist\lib\client\index.js:347:35)
at RedisSocket.emit (node:events:526:28)
at RedisSocket.emit (node:domain:475:12)
at RedisSocket._RedisSocket_connect (C:\Users\atsukoro\Desktop\Projekty\simpleanilist\node_modules\#redis\client\dist\lib\client\socket.js:114:14) {
code: 'ERR_INVALID_ARG_TYPE'
}
I found that legacyMode false will fix that issue but that didn't work either.
I did not have a problem connecting to Atlas previously from my wifi at home. But I have issues at Starbucks. I have now switched to google fiber and I am getting this error.
at Pool.<anonymous> (/Users/j/Desktop/projects/templateApp/node_modules/mongodb-core/lib/topologies/server.js:431:11)
at Pool.emit (events.js:182:13)
at connect (/Users/j/Desktop/projects/templateApp/node_modules/mongodb-core/lib/connection/pool.js:557:14)
at callback (/Users/j/Desktop/projects/templateApp/node_modules/mongodb-core/lib/connection/connect.js:109:5)
at runCommand (/Users/j/Desktop/projects/templateApp/node_modules/mongodb-core/lib/connection/connect.js:129:7)
at Connection.errorHandler (/Users/j/Desktop/projects/templateApp/node_modules/mongodb-core/lib/connection/connect.js:321:5)
at Object.onceWrapper (events.js:273:13)
at Connection.emit (events.js:182:13)
at TLSSocket.<anonymous> (/Users/j/Desktop/projects/templateApp/node_modules/mongodb-core/lib/connection/connection.js:350:12)
at Object.onceWrapper (events.js:273:13)
at TLSSocket.emit (events.js:182:13)
at _handle.close (net.js:596:12)
at TCP.done [as _onclose] (_tls_wrap.js:383:7)
name: 'MongoNetworkError',
errorLabels: [ 'TransientTransactionError' ],```
I have checked my strings and they are correct.
My connection code is:
```mongoose.connect(process.env.dataBaseConnection, {
dbName: process.env.dataBaseName,
useFindAndModify: false,
useNewUrlParser: true
});```
The issue was that I needed to white list my new ip address.
im using heroku to host my site however it keeps spitting out the same error which is
2018-05-06T19:28:52.212104+00:00 app[web.1]:AssertionError [ERR_ASSERTION]: false == true
2018-05-06T19:28:52.212106+00:00 app[web.1]:at Object.exports.connect (_tls_wrap.js:1036:3)
2018-05-06T19:28:52.212107+00:00 app[web.1]: at Socket. (/app/node_modules/pg/lib/connection.js:94:23)
2018-05-06T19:28:52.212109+00:00 app[web.1]:at Object.onceWrapper (events.js:315:30)
2018-05-06T19:28:52.212110+00:00 app[web.1]:at emitOne (events.js:116:13)
2018-05-06T19:28:52.212112+00:00 app[web.1]: at Socket.emit (events.js:211:7)
2018-05-06T19:28:52.212113+00:00 app[web.1]:at addChunk (_stream_readable.js:263:12)
2018-05-06T19:28:52.212115+00:00 app[web.1]:at readableAddChunk (_stream_readable.js:250:11)
2018-05-06T19:28:52.212116+00:00 app[web.1]:at Socket.Readable.push (_stream_readable.js:208:10)
2018-05-06T19:28:52.212118+00:00 app[web.1]: at TCP.onread >>(net.js:607:20)
this is how im connecting (taken straight off of herokus website)
const { Client } = require("pg");
const router = express.Router();
const pool = new Client({
connectionString: process.env.DATABASE_URL,
ssl: true,
});
pool.connect();
I found out what the error was:
the error was that i did not have a db create. i decided to use elephantSQL and from their i connected to elephantSQL with pgadmin and recreated my database. it works perfect now
to see how this works see : https://www.elephantsql.com/docs/pgadmin.html
im more than happy to answer some questions
OK, this isn't really a solution but it might help you out. This happens to me on node 8 (and 10) but when I downgraded to node 7 it seems to work fine. I'll be watching this post to see if someone comes up with a better fix.
I am getting the following error while connecting to the MongoDB through Node.js.
Error:
process.nextTick(function() { throw err; })
^
Error: connect UNKNOWN 127.0.0.1:27017 - Local (undefined:undefined)
at Object.exports._errnoException (util.js:870:11)
at exports._exceptionWithHostPort (util.js:893:20)
at connect (net.js:843:14)
at net.js:939:9
at doNTCallback0 (node.js:419:9)
at process._tickCallback (node.js:348:13)
I am running the my MongoDB using the command mongod --dbpath C:\new --journal.I am explaining my code below.
var mongo=require('mongojs');
var database='medilink';
var collections=['admin','supplier'];
var db=mongo("localhost:27017/"+database, collections);
Here i have one login app.When user is trying to login the above error is coming.Please help me to resolve this error.