DemonMartin / tlsClient

A wrapper for bogdanfinn/tls-client based on ffi-rs for unparalleled performance and usability. Inspired by @dryft/tlsclient.
https://www.npmjs.com/package/tlsclientwrapper
22 stars 1 forks source link

Error running file #8

Open guyedry1 opened 1 month ago

guyedry1 commented 1 month ago

Hi. im trying to run the first cmd on my pc:

import tlsClient from 'tlsclientwrapper'; const client = new tlsClient();

console.log(await client.get("https://example.com/"));

and getting:

let lib = load(...args); ^

Error: Failed to load shared library: The operation completed successfully. at module.exports.load (C:\Users\a.Jones\Downloads\b2.0.1\a\node_modules\koffi\index.js:542:13) at Client.open (file:///C:/Users/a.Jones/Downloads/b%202.0.1/a/node_modules/tlsclientwrapper/utils/client.js:62:26) at async #init (file:///C:/Users/a.Jones/Downloads/b%202.0.1/a/node_modules/tlsclientwrapper/index.js:61:13) at async #request (file:///C:/Users/a.Jones/Downloads/b%202.0.1/a/node_modules/tlsclientwrapper/index.js:183:9)

Node.js v18.7.0

guyedry1 commented 1 month ago

got this on another pc: C:\Users\p\Downloads\a\a\node_modules\koffi\index.js:542 let lib = load(...args); ^

Error: Failed to load shared library: Invalid access to memory location.

DemonMartin commented 1 month ago

Hello! I believe this issue is more related to koffi and not to my tlsclientwrapper.

The latest version of the tlsclientwrapper works fine on my test-bench.

The only thing I can recommend you is to update your Node.js version to the latest stable version (since 18.7.0 is already years old) and try again.

The second error sounds like an invalid version of the tlsclient dll downloaded, might be something else tho, again seems to be related to koffi. Please clear your temp folder or manually set your library like shown here https://github.com/DemonMartin/tlsClient?tab=readme-ov-file#custom-library and try again.

Thanks