Closed vanvanni closed 5 years ago
@xJoeyv this warning from Node not this package. Answer is here
@inoyakaigor I found that solution but did not fix the problem. My Code
require('dotenv').config();
// const fb = require("facebook-chat-api");
console.log(`Logging Value`);
console.log(process.env.NODE_TLS_REJECT_UNAUTHORIZED);
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0;
console.log(`Updated Value`);
console.log(process.env.NODE_TLS_REJECT_UNAUTHORIZED);
(async () => {
console.log(`STARTING CODE`);
const ig = require("./lib/ig");
const Instagram = await ig();
console.log('Tada');
})();
The Log
Logging Value
undefined
Updated Value
0
STARTING CODE
Tada
(node:10864) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
Unhandled rejection CheckpointError: Instagram call checkpoint for this action!
The warning is thrown because it is set to 0
. I think you should be setting it to 1
instead. As in:
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 1;
I get this error when I call
Client.Session.create(device, storage, process.env.IG_USER, process.env.IG_PASSWORD)...
I have been searching around to find a solution but can't find the right one. How should I fox this for this package?