tlsClient icon indicating copy to clipboard operation
tlsClient copied to clipboard

Error running file

Open pepedro12 opened this issue 1 year ago • 2 comments

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

pepedro12 avatar Jul 11 '24 19:07 pepedro12

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.

pepedro12 avatar Jul 11 '24 19:07 pepedro12

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

DemonMartin avatar Jul 16 '24 13:07 DemonMartin