Giter Club home page Giter Club logo

Comments (9)

Inumedia avatar Inumedia commented on July 17, 2024

Please consider re-generating your slackKey as it's now contained in the emails sent out to anyone subscribed to the issues on this repository.

from slackapi.

10der avatar 10der commented on July 17, 2024

thank you for respond!

from slackapi.

10der avatar 10der commented on July 17, 2024

Request.cs

internal void GotResponse(IAsyncResult result)

[Skipped]

            Console.WriteLine("000000zzzzzzzzzzzzz");
            using (Stream responseReading = response.GetResponseStream())
            {
                Console.WriteLine("111111zzzzzzzzzzzzz");
                if (responseReading != null)
                {
                    using (StreamReader reader = new StreamReader(responseReading))
                    {
                        Console.WriteLine("22222222zzzzzzzzzzzzz");
                        string responseData = reader.ReadToEnd();
                        K responseObj = JsonConvert.DeserializeObject<K>(responseData, new JavascriptDateTimeConverter());
                        callback?.Invoke(responseObj);
                    }
                }
            }

mono TestSlackAPI.exe
000000zzzzzzzzzzzzz

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
at SlackAPI.RequestState`1[SlackAPI.LoginResponse].GotResponse (IAsyncResult result) [0x00000] in :0
at System.Net.WebAsyncResult.CB (System.Object unused) [0x00000] in :0

so, exception occurred in using (Stream responseReading = response.GetResponseStream())
my guess - possible response is NULL.

here.
//Anything that doesn't return error 200 throws an exception. Sucks. :l
response = (HttpWebResponse)we.Response;
//TODO: Handle timeouts, etc?

from slackapi.

10der avatar 10der commented on July 17, 2024

sorry:

//Anything that doesn't return error 200 throws an exception. Sucks. :l
response = (HttpWebResponse)we.Response;
//TODO: Handle timeouts, etc?

           Console.WriteLine(we.ToString());

look like crazy!

System.Net.WebException: Error getting response stream (Write: The authentication or decryption h as failed.): SendFailure ---> System.IO.IOException: The authentication or decryption has failed. ---> Mono.Security.Protocol.Tls.TlsException: Invalid certificate received from server. Error co de: 0xffffffff800b010a
at Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.RemoteValidation (Mono.Secu rity.Protocol.Tls.ClientContext context, AlertDescription description) [0x00000] in :0

from slackapi.

10der avatar 10der commented on July 17, 2024

thank you so much!

root@nas:/home/pi/C#/test# mono TestSlackAPI.exe
Connected!
Logged True

        public RequestState(HttpWebRequest requestData, Tuple<string, string>[] postParameters, Action<K> toCallback)
        {
    >>>>        ServicePointManager.ServerCertificateValidationCallback = (a, b, c, d) => { return true; };
            request = requestData;
            Post = postParameters;
            callback = toCallback;
        }

from slackapi.

Inumedia avatar Inumedia commented on July 17, 2024

Ah, yeah the standard SSL/Mono cert problem. You can also use mozimports for this iirc.

http://stackoverflow.com/questions/3285489/mono-problems-with-cert-and-mozroots etc.

from slackapi.

Inumedia avatar Inumedia commented on July 17, 2024

As a note, the code:

ServicePointManager.ServerCertificateValidationCallback = (a, b, c, d) => { return true; };

Ignores validation on all SSL certs regardless of if they're valid or not. This is a security hole for your application as a whole.

from slackapi.

10der avatar 10der commented on July 17, 2024

yes. its true. but I want to be sure what issue is here.
thank you so much, dev!

from slackapi.

Inumedia avatar Inumedia commented on July 17, 2024

No worries, thanks for reporting this.

from slackapi.

Related Issues (20)

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.