GithubHelp home page GithubHelp logo

bailleys-api-v2's People

Contributors

bahriid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bailleys-api-v2's Issues

[BUG] Connection Closed when sending message to groups

When trying to send any messages to groups, the request takes a long time and returns this error. how can i resolve this?

"err":{"type":"Error","message":"Connection Closed","stack":"Error: Connection Closed\n at sendRawMessage (/var/app/current/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:54:19)\n at sendNode (/var/app/current/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:73:16)\n at query (/var/app/current/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:137:15)\n at groupQuery (/var/app/current/node_modules/@whiskeysockets/baileys/lib/Socket/groups.js:12:55)\n at Object.groupMetadata (/var/app/current/node_modules/@whiskeysockets/baileys/lib/Socket/groups.js:22:30)\n at jidExists (/var/app/current/dist/wa.js:251:41)\n at send (/var/app/current/dist/controllers/message.js:37:49)\n at Layer.handle [as handle_request] (/var/app/current/node_modules/express/lib/router/layer.js:95:5)\n at next (/var/app/current/node_modules/express/lib/router/route.js:144:13)\n at validate (/var/app/current/dist/middlewares/session-validator.js:7:5)","data":null,"isBoom":true,"isServer":false,"output":{"statusCode":428,"payload":{"statusCode":428,"error":"Precondition Required","message":"Connection Closed"},"headers":{}}},"msg":"An error occured during message send Error: Connection Closed"}

I have tried defaultQueryTimeoutMs: undefined and defaultQueryTimeoutMs: 0

but nothing worked

everything was ok since yesterday, and it stopped without any updates or any adjustments

my makeWASocket

const socket = makeWASocket({
    printQRInTerminal: true,
    browser: Browsers.ubuntu('Chrome'),
    generateHighQualityLinkPreview: true,
    ...socketConfig,
    auth: {
      creds: state.creds,
      keys: makeCacheableSignalKeyStore(state.keys, logger),
    },
    logger,
    defaultQueryTimeoutMs: 0,
    shouldIgnoreJid: (jid) => isJidBroadcast(jid),
    getMessage: async (key) => {
      const data = await prisma.message.findFirst({
        where: { remoteJid: key.remoteJid!, id: key.id!, sessionId },
      });
      return (data?.message || undefined) as proto.IMessage | undefined;
    },
  });

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.