Skip to content
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

After updating 1.0.29 show axios error 429 #70

Open
lavahasif opened this issue Aug 11, 2022 · 3 comments
Open

After updating 1.0.29 show axios error 429 #70

lavahasif opened this issue Aug 11, 2022 · 3 comments

Comments

@lavahasif
Copy link

lavahasif commented Aug 11, 2022

After updating 1.0.29 showing this kind of error while showing qr code

Webhooktest Return object  {
  onType: 'interfaceChange',
  session: 'user',
  result: { displayInfo: 'CONNECTING', mode: 'QR', info: 'OPENING' },
  token: '5cc32e366c87c4cb49e4309b75f57d64'
}
Webhooktest Return object  {
  onType: 'interfaceChange',
  session: 'user',
  result: { displayInfo: 'CONNECTING', mode: 'QR', info: 'PAIRING' },
  token: '5cc32e366c87c4cb49e4309b75f57d64'
}
node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "AxiosError: Request failed with status code 429".] {
  code: 'ERR_UNHANDLED_REJECTION'
}
disconnect
child process exited with code 1

image

Reproduce code

const hydraBot = require('hydra-bot');
var serveStatic = require( "serve-static" );
(async () => {
  // start Web Service
  const WS = hydraBot.initWs(
      {
        port: '8080',
        url: '', // point a URL to receive a callback!
        authentication: true, // ask for authentication in routes
        pathNameToken: "token", // The path and name of the folder where the client tokens will be saved
        printQRInTerminal: true, // The QR CODE will be printed on the terminal if true
        updatesLog: true, // Logs info updates automatically in terminal
        timeAutoClose: 60000, // If you don't read the QR CODE by default 60 seconds, it will automatically close the client's browser to save memory, if you want to disable it, set 0 or false
        mkdirFolderToken: 'E:\\', // Token folder path, only inside the project
        puppeteerOptions: {
          headless: true, // Start the project with the browser open or not!
          args: [], // Additional arguments to pass to the browser instance. adding any parameter you will replace the default args of the project
          executablePath: 'useChrome' // The browser that will be used for the project, you can specify a path, if you don't pass any parameters it will open the installed browser.
        }
      }
      );
      
      
})();

@jonalan7
Copy link
Owner

put your code so we can help

@lavahasif
Copy link
Author

this only i used

const hydraBot = require('hydra-bot');
var serveStatic = require( "serve-static" );
(async () => {
  // start Web Service
  const WS = hydraBot.initWs(
      {
        port: '8080',
        url: '', // point a URL to receive a callback!
        authentication: true, // ask for authentication in routes
        pathNameToken: "token", // The path and name of the folder where the client tokens will be saved
        printQRInTerminal: true, // The QR CODE will be printed on the terminal if true
        updatesLog: true, // Logs info updates automatically in terminal
        timeAutoClose: 60000, // If you don't read the QR CODE by default 60 seconds, it will automatically close the client's browser to save memory, if you want to disable it, set 0 or false
        mkdirFolderToken: 'E:\\', // Token folder path, only inside the project
        puppeteerOptions: {
          headless: true, // Start the project with the browser open or not!
          args: [], // Additional arguments to pass to the browser instance. adding any parameter you will replace the default args of the project
          executablePath: 'useChrome' // The browser that will be used for the project, you can specify a path, if you don't pass any parameters it will open the installed browser.
        }
      }
      );
      
      
})();

@lavahasif
Copy link
Author

solution

image

Temporary solution . i did like this inside nodemodule hydrabot.now i can send message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants