Igosuki / signalr-rs

Actix Websocket based implementation of Signalr
MIT License
19 stars 6 forks source link

Failed to connect to host: error:16000069 #8

Open PierreV23 opened 2 years ago

PierreV23 commented 2 years ago

error:

Hub client error : RequestError("Failed to connect to host: error:16000069:STORE routines:ossl_store_get0_loader_int:unregistered scheme:crypto\\store\\store_register.c:237:scheme=C, error:1608010C:STORE routines:inner_loader_fetch:unsupported:crypto\\store\\store_meth.c:359:No store loader found. For standard store loaders you need at least one of the default or base providers available. Did you forget to load them? Info: Global default library context, Scheme (C : 0), Properties (<null>), error:16000069:STORE routines:ossl_store_get0_loader_int:unregistered scheme:crypto\\store\\store_register.c:237:scheme=file, error:80000002:system library:file_open:reason(2):providers\\implementations\\storemgmt\\file_store.c:267:calling stat(C:\\Users\\myname\\Downloads\\cloneanddownloadtemp\\vcpkg\\packages\\openssl_x64-windows-static-md/certs), error:16000069:STORE routines:ossl_store_get0_loader_int:unregistered scheme:crypto\\store\\store_register.c:237:scheme=C, error:1608010C:STORE routines:inner_loader_fetch:unsupported:crypto\\store\\store_meth.c:359:No store loader found. For standard store loaders you need at least one of the default or base providers available. Did you forget to load them? Info: Global default library context, Scheme (C : 0), Properties (<null>), error:16000069:STORE routines:ossl_store_get0_loader_int:unregistered scheme:crypto\\store\\store_register.c:237:scheme=file, error:80000002:system library:file_open:reason(2):providers\\implementations\\storemgmt\\file_store.c:267:calling stat(C:\\Users\\myname\\Downloads\\cloneanddownloadtemp\\vcpkg\\packages\\openssl_x64-windows-static-md/certs), error:16000069:STORE routines:ossl_store_get0_loader_int:unregistered scheme:crypto\\store\\store_register.c:237:scheme=C, error:1608010C:STORE routines:inner_loader_fetch:unsupported:crypto\\store\\store_meth.c:359:No store loader found. For standard store loaders you need at least one of the default or base providers available. Did you forget to load them? Info: Global default library context, Scheme (C : 0), Properties (<null>), error:16000069:STORE routines:ossl_store_get0_loader_int:unregistered scheme:crypto\\store\\store_register.c:237:scheme=file, error:80000002:system library:file_open:reason(2):providers\\implementations\\storemgmt\\file_store.c:267:calling stat(C:\\Users\\myname\\Downloads\\cloneanddownloadtemp\\vcpkg\\packages\\openssl_x64-windows-static-md/certs), error:16000069:STORE routines:ossl_store_get0_loader_int:unregistered scheme:crypto\\store\\store_register.c:237:scheme=C, error:1608010C:STORE routines:inner_loader_fetch:unsupported:crypto\\store\\store_meth.c:359:No store loader found. For standard store loaders you need at least one of the default or base providers available. Did you forget to load them? Info: Global default library context, Scheme (C : 0), Properties (<null>), error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:ssl\\statem\\statem_clnt.c:1888:")

code:

use std::io;

use url::Url;

use serde::de::DeserializeOwned;
use serde::Deserialize;
use serde_json::Value;

use signalr_rs::hub::client::{
    HubClientBuilder, HubClientError, HubClientHandler, HubQuery, PendingQuery,
};

use actix::System;
use actix_rt;

struct LivetimingHandler {
    hub: String,
}

impl HubClientHandler for LivetimingHandler {
    fn on_connect(&self) -> Vec<Box<dyn PendingQuery>> {
        let topics = vec!["Heartbeat", "WeatherData", "SPFeed"];
        topics
            .into_iter()
            .enumerate()
            .map(|(idx, topic)| {
                Box::new(HubQuery::new(
                    self.hub.to_string(),
                    "Subscribe".to_string(),
                    vec![topic.to_string()],
                    (idx + 1).to_string(),
                )) as Box<dyn PendingQuery>
            })
            .collect()
    }
    fn error(&self, _id: Option<&str>, _msg: &Value) {}
    fn handle(&mut self, method: &str, _message: &Value) {
        /*
        match method {
        }
        */
        println!("Method {}", method);
        //println!("Message {}", message);
    }
}

#[actix_rt::main]
async fn main() -> io::Result<()> {
    let hub = "Streaming";
    let handler = Box::new(LivetimingHandler {
        hub: hub.to_string(),
    });
    let client = HubClientBuilder::with_hub_and_url(
        hub,
        Url::parse("https://livetiming.formula1.com/signalr").unwrap(),
    )
    .start_supervised(handler)
    .await;

    match client {
        Ok(addr) => {
            println!("{}", &addr.connected());
            println!("Client Started");
        }
        Err(e) => {
            println!("Hub client error : {:?}", e);
            System::current().stop();
        }
    }
    actix_rt::signal::ctrl_c().await
}
Igosuki commented 1 year ago

Can you give me a windows docker vm where I can reproduce this ? Thanks