Code Monkey home page Code Monkey logo

bas-remote-node's Introduction

Anurag's GitHub stats

bas-remote-node's People

Contributors

cheshirecaat avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bas-remote-node's Issues

Can't send data because WebSocket is not opened.

Hello. I experience occasional but quite often error on launch puppeteer-with-fingerprints plugin:

Version: [email protected]

Thread #0 failed: Error: Can't send data because WebSocket is not opened.
at exports.throwIf (C:\bots\test\node_modules\websocket-as-promised\src\utils.js:4:11)
at WebSocketAsPromised.send (C:\bots\test\node_modules\websocket-as-promised\src\index.js:252:5)
at SocketService.send (C:\bots\test\node_modules\bas-remote-node\src\services\socket.js:89:14)
at BasRemoteClient._send (C:\bots\test\node_modules\bas-remote-node\src\index.js:223:25)
at BasRemoteClient.send (C:\bots\test\node_modules\bas-remote-node\src\index.js:254:17)
at BasRemoteClient._startThread (C:\bots\test\node_modules\bas-remote-node\src\index.js:275:10)
at C:\bots\test\node_modules\bas-remote-node\src\index.js:190:12
at new Promise ()
at BasRemoteClient.runFunction (C:\bots\test\node_modules\bas-remote-node\src\index.js:189:21)
at C:\bots\test\node_modules\browser-with-fingerprints\src\plugin\connector\index.js:31:16

What could be a reason?

Timeout during client initialize

image

Система полностью чистая, на системе стоит нода, винрар, гит, вскод и ничего больше. В чём может быть проблема? На другом хосте всё работает. Возможно какая-то зависимость?

UnhandledPromiseRejectionWarning: Error: Timeout during client initialize

(node:2532) UnhandledPromiseRejectionWarning: Error: Timeout during client initialize
at Timeout._onTimeout (C:\Users\Administrator\Desktop\mysoft\node_modules\bas-remote-node\lib\index.js:143:48)
at listOnTimeout (internal/timers.js:557:17)
at processTimers (internal/timers.js:500:7)
(node:2532) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1323)

How fix it?

Error when running script on all devices but 1

{
"message": "Cannot connect to the WebSocket server (reason: connection failed)\nThis could be due to the fact that the engine was not downloaded or unpacked correctly.\nTry completely deleting the engine folder and restarting the code until it completes.\nIf this does not help, open an issue with a detailed description of the problem."
}

Exception while trying to stop function.

    const options = {
        scriptName: 'TestRemoteControl'
    };

    const client = new BasRemoteClient(options);

    await client.start();

    var promise1 = client.runFunction('GoogleSearch', {Query: 'cats'});
    
    promise1.Stop(); //stop also doesn't work

    await promise1;


    await client.close();

Following code will throw exception

UnhandledPromiseRejectionWarning: TypeError: promise1.Stop is not a function

Also, can you rename Stop method to stop

Error during running default example.

Execute script provided as quick example

const BasRemoteClient = require('bas-remote-node');

//Set script name, and optionally auth details (login, password) 
const options = {
    scriptName: 'TestRemoteControl' /* or 'YourScriptName' */
};

//Create client
const scriptClient = new BasRemoteClient(options);

//Start application, this may take some time
await scriptClient.start();

//Set parameters for function
const scriptParams = {
    Query: 'cats'
};

//Run function and wait for result
//Following function will return list of strings
const result = await scriptClient.runFunction(
    'GoogleSearch', /* or 'YourFunctionName' */
    scriptParams);

//Iterate and output results
result.forEach(link => {
    console.log(link);
});

await scriptClient.close();

Following error will be thrown:

(node:18544) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, rmdir '3afb1'
    at Object.rmdirSync (fs.js:684:3)
    at fs.readdirSync.map.filter.map.filter.forEach (d:\dev\BASRemoteControl\node\node_modules\bas-remote-node\lib\services\engine.js:104:20)
    at Array.forEach (<anonymous>)
    at EngineService._clearRunDirectory (d:\dev\BASRemoteControl\node\node_modules\bas-remote-node\lib\services\engine.js:103:14)
    at EngineService.start (d:\dev\BASRemoteControl\node\node_modules\bas-remote-node\lib\services\engine.js:45:14)

Please do at least initial testing before releasing/doing commit.

BAS Version?

What version of BAS does this use? I don't see anything regarding versions in the readme.

Error on await client.start()

I'm obtaining the following message when I try to proceed the .start() in one of my xmls. I'm not sure what's the reason.
"Script finished with error : SyntaxError: Parse error during execution of action 467148435"

Error while trying to delete old script folder.

Steps to reproduce:

  1. Create new BAS script and upload it to server.
  2. Run it with following code:
const scriptClient = new BasRemoteClient({ scriptName: 'YourScriptName' });
await scriptClient.start();
await scriptClient.close();
  1. Make any change and upload script on server.
  2. Run it again with same code.

Actual result:

You will get error

directory not empty, rmdir 'd:\dev\BASRemoteControl\node\data\run\TestRemoteControl\3afb1'

Add error handling when request failed

undefined:1
<html>
^

SyntaxError: Unexpected token < in JSON at position 0
    at IncomingMessage.<anonymous> (my_program_path\node_modules\bas-remote-node\src\utils.js:29:20)

There are some issues which force close my program when fetching fingerprint using "puppeteer-with-fingerprints"

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.