Code Monkey home page Code Monkey logo

Comments (5)

newtykins avatar newtykins commented on September 23, 2024 2

That TLS REJECT did in fact work, however setting it to http in the package's code seemed to not work for whatever reason. I'm still waiting on a reply from pastebin, so I don't know what's happening really. It's pretty weird, I guess I'll just have to use TLS_REJECT_UNAUTHORIZED for the mean time - thank you for the work around and the help though, it's much appreciated ^w^

from pastebin.js.

newtykins avatar newtykins commented on September 23, 2024

Investigating, tried making some curl requests with similar errors. Tried other libraries with no success, friends are having problems with curl too. Contacting pastebin support rn

from pastebin.js.

cAttte avatar cAttte commented on September 23, 2024

hey! that error seems to be caused by a faulty SSL certificate on Pastebin's side. i don't have a lot of time to test right now, but i'm assuming it's been solved. feel free to update! (maybe we could fall back to using HTTP when catching this error, with a warning?)

also, please report if you find any other issues, i haven't really developed this library in quite a while!

from pastebin.js.

newtykins avatar newtykins commented on September 23, 2024

It still doesn't seem to have been fixed by itself - waiting on a response from Pastebin, will keep you up to date! That fallback might be a good idea to implement either way

from pastebin.js.

cAttte avatar cAttte commented on September 23, 2024

thanks!

testing it with the following code:

const { PastebinClient } = require("@catte_/pastebin.js")

new PastebinClient("...", "...", "...")
    .login()
    .then(client => console.log(client.credentials.userKey))

is not throwing any errors and is generating a seemingly valid user key for me, so it may not actually be a Pastebin issue (or at least, not a global one). though it's weird that it's not working for your friends either (unless they live somewhere near you?).

anyways, i found a workaround here, but i wouldn't recommend it as a permanent solution (or for production):

process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"
const client = new PastebinClient(...)

that should avoid the error. i'm not sure if using an HTTP URL would work at all, but you can also try that if you'd like (by changing it in node_modules/@catte_/pastebin.js/dist/struct/PastebinClient.js). if this doesn't get fixed soon, we could add a rejectUnauthorized or useHTTP option (or something like that) to the client.

from pastebin.js.

Related Issues (1)

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.