00:05 < bridge> <-StormAx> anyone who knows? 00:05 < bridge> <-StormAx> im getting invalid json, but then my im getting info that json is working 00:05 < bridge> <-StormAx> https://cdn.discordapp.com/attachments/293493549758939136/1196590917566595173/image.png?ex=65b82f22&is=65a5ba22&hm=8897365e6d7303eb26629bf65a2c82149ece020881232dcdeb1d60440d73ebb9& 00:05 < bridge> <-StormAx> the code 00:05 < bridge> <-StormAx> ```cpp 00:05 < bridge> <-StormAx> 00:05 < bridge> <-StormAx> #include "parser.h" 00:05 < bridge> <-StormAx> #include "base/system.h" 00:05 < bridge> <-StormAx> #include "engine/engine.h" 00:05 < bridge> <-StormAx> #include "engine/shared/http.h" 00:05 < bridge> <-StormAx> #include 00:05 < bridge> <-StormAx> 00:05 < bridge> <-StormAx> void CStats::ParseJSON(CStatsPlayer *pStatsDest) 00:05 < bridge> <-StormAx> { 00:05 < bridge> <-StormAx> 00:05 < bridge> <-StormAx> 00:05 < bridge> <-StormAx> // TODO error type validation 00:06 < bridge> <-StormAx> 00:06 < bridge> <-StormAx> 00:06 < bridge> <-StormAx> json_value *pPlayerStats = pStatsDest->m_pGetStatsDDStats->ResultJson(); 00:06 < bridge> <-StormAx> 00:06 < bridge> <-StormAx> if(!pPlayerStats) 00:06 < bridge> <-StormAx> { 00:06 < bridge> <-StormAx> dbg_msg("stats", "Invalid JSON received"); 00:06 < bridge> <-StormAx> return; 00:06 < bridge> <-StormAx> } 00:06 < bridge> <-StormAx> 00:06 < bridge> <-StormAx> json_value &PlayerStats = *pPlayerStats; 00:06 < bridge> <-StormAx> //since player is in the first column - do it like this: 00:06 < bridge> <-StormAx> const json_value &Player = PlayerStats["player"]; 00:06 < bridge> <-StormAx> str_copy(pStatsDest->aPlayer, Player); 00:06 < bridge> <-StormAx> 00:06 < bridge> <-StormAx> //get the total points of the PointsCategory in DDStats 00:06 < bridge> <-StormAx> const json_value &PointsCategories = PlayerStats["points"]; 00:06 < bridge> <-StormAx> the code 00:06 < bridge> <-StormAx> ```cpp 00:06 < bridge> <-StormAx> 00:06 < bridge> <-StormAx> json_value *dPlayerStats = pStatsDest->m_pGetStatsDDNet->ResultJson(); 00:06 < bridge> <-StormAx> 00:06 < bridge> <-StormAx> if(!dPlayerStats) 00:06 < bridge> <-StormAx> { 00:06 < bridge> <-StormAx> dbg_msg("stats", "Invalid JSON received"); 00:06 < bridge> <-StormAx> return; 00:06 < bridge> <-StormAx> } 00:06 < bridge> <-StormAx> 00:06 < bridge> <-StormAx> json_value &dPlayerStat = *dPlayerStats; 00:07 < bridge> <-StormAx> const json_value &ddrPlayer = dPlayerStat["player"]; 00:07 < bridge> <-StormAx> str_copy(pStatsDest->dPlayer, ddrPlayer); 00:07 < bridge> <-StormAx> 00:07 < bridge> <-StormAx> //get rank lead 00:07 < bridge> <-StormAx> const json_value &PointCategoryDDR = dPlayerStat["points"]; 00:07 < bridge> <-StormAx> const json_value &CurrentPRank = PointCategoryDDR["rank"]; 00:07 < bridge> <-StormAx> sometimes it work, sometimes is no 00:07 < bridge> <-StormAx> sometimes it work, sometimes is not 00:11 < bridge> you get invalid json from some fancy ddstats.qwik.space? 00:11 < bridge> <-StormAx> ddnet.org 00:12 < bridge> <-StormAx> Points rank is the only thing im parsing from ddnet,org 00:12 < bridge> <-StormAx> https://cdn.discordapp.com/attachments/293493549758939136/1196592745058414723/image.png?ex=65b830d6&is=65a5bbd6&hm=918083109d3bf238917f9b298c4e3add1ee09385f12cdc9ba650e3a1909b5b4e& 00:13 < bridge> can you show `ResultJson()`? 00:13 < bridge> <-StormAx> https://cdn.discordapp.com/attachments/293493549758939136/1196593003444314173/image.png?ex=65b83113&is=65a5bc13&hm=bdf08e58bf8f96e2aa543ba829921d7bda9fe0181163debc8ba6c8a0a9b7ee8b& 00:13 < bridge> <-StormAx> ```cpp 00:13 < bridge> <-StormAx> json_value *CHttpRequest::ResultJson() const 00:13 < bridge> <-StormAx> { 00:13 < bridge> <-StormAx> unsigned char *pResult; 00:13 < bridge> <-StormAx> size_t ResultLength; 00:13 < bridge> <-StormAx> Result(&pResult, &ResultLength); 00:13 < bridge> <-StormAx> if(!pResult) 00:13 < bridge> <-StormAx> { 00:13 < bridge> <-StormAx> return nullptr; 00:13 < bridge> <-StormAx> } 00:13 < bridge> <-StormAx> return json_parse((char *)pResult, ResultLength); 00:13 < bridge> <-StormAx> } 00:13 < bridge> <-StormAx> ``` 00:14 < bridge> and `Result()`? 00:15 < bridge> <-StormAx> huh? 00:16 < bridge> `Result(&pResult, &ResultLength);` 00:16 < bridge> <-StormAx> the pResult? 00:16 < bridge> <-StormAx> ```cpp 00:16 < bridge> <-StormAx> void CHttpRequest::Result(unsigned char **ppResult, size_t *pResultLength) const 00:16 < bridge> <-StormAx> { 00:16 < bridge> <-StormAx> if(m_WriteToFile || State() != HTTP_DONE) 00:16 < bridge> <-StormAx> { 00:16 < bridge> <-StormAx> *ppResult = nullptr; 00:16 < bridge> <-StormAx> *pResultLength = 0; 00:16 < bridge> <-StormAx> return; 00:16 < bridge> <-StormAx> } 00:16 < bridge> <-StormAx> *ppResult = m_pBuffer; 00:16 < bridge> <-StormAx> *pResultLength = m_ResponseLength; 00:16 < bridge> <-StormAx> } 00:16 < bridge> <-StormAx> ``` 00:16 < bridge> bruh where do you send the request itself 00:17 < bridge> <-StormAx> well 00:17 < bridge> <-StormAx> ```cpp 00:17 < bridge> <-StormAx> void CStats::FetchPlayer(CStatsPlayer *pStatsDest, const char *pPlayer) 00:17 < bridge> <-StormAx> { 00:17 < bridge> <-StormAx> char aUrl_DDStats[256]; 00:17 < bridge> <-StormAx> char aUrl_DDNet[256]; 00:17 < bridge> <-StormAx> char aEscapedName[MAX_NAME_LENGTH]; 00:17 < bridge> <-StormAx> EscapeUrl(aEscapedName, sizeof(aEscapedName), pPlayer); 00:17 < bridge> <-StormAx> str_format(aUrl_DDStats, sizeof(aUrl_DDStats), "%s%s", STATS_URL_DDSTATS, aEscapedName); 00:17 < bridge> <-StormAx> pStatsDest->m_pGetStatsDDStats = HttpGet(aUrl_DDStats); 00:17 < bridge> <-StormAx> 00:17 < bridge> <-StormAx> str_format(aUrl_DDNet, sizeof(aUrl_DDNet), "%s%s", STATS_URL_DDNET, aEscapedName); 00:17 < bridge> <-StormAx> pStatsDest->m_pGetStatsDDNet = HttpGet(aUrl_DDNet); 00:18 < bridge> <-StormAx> 00:18 < bridge> <-StormAx> // 10 seconds connection timeout, lower than 8KB/s for 10 seconds to fail. 00:18 < bridge> <-StormAx> pStatsDest->m_pGetStatsDDStats->Timeout(CTimeout{10000, 0, 8000, 10}); 00:18 < bridge> <-StormAx> Engine()->AddJob(pStatsDest->m_pGetStatsDDStats); 00:18 < bridge> <-StormAx> 00:18 < bridge> <-StormAx> pStatsDest->m_pGetStatsDDNet->Timeout(CTimeout{10000, 0, 8000, 10}); 00:18 < bridge> <-StormAx> Engine()->AddJob(pStatsDest->m_pGetStatsDDNet); 00:18 < bridge> <-StormAx> pStatsDest->StatsParsed = false; 00:18 < bridge> <-StormAx> } 00:18 < bridge> <-StormAx> ``` 00:18 < bridge> <-StormAx> also 00:18 < bridge> <-StormAx> ```cpp 00:18 < bridge> <-StormAx> static constexpr const char *STATS_URL_DDSTATS = "https://ddstats.qwik.space/player/json?player="; 00:18 < bridge> <-StormAx> static constexpr const char *STATS_URL_DDNET = "https://ddnet.org/players/?json2="; 00:18 < bridge> <-StormAx> class CStatsPlayer 00:18 < bridge> <-StormAx> { 00:18 < bridge> <-StormAx> public: 00:18 < bridge> <-StormAx> std::shared_ptr m_pGetStatsDDStats; // profile and player stats 00:18 < bridge> <-StormAx> std::shared_ptr m_pGetStatsDDNet; // map tracking 00:18 < bridge> <-StormAx> 00:18 < bridge> <-StormAx> char aPlayer[MAX_NAME_LENGTH]; 00:18 < bridge> <-StormAx> int Points; 00:18 < bridge> <-StormAx> bool StatsParsed = false; 00:18 < bridge> <-StormAx> int timestamp; 00:18 < bridge> <-StormAx> char aMap[11][MOST_PLAYED_LENGTH]; 00:18 < bridge> <-StormAx> float aTime[11]; 00:18 < bridge> <-StormAx> int RankPoints; 00:18 < bridge> <-StormAx> 00:18 < bridge> <-StormAx> //DDNet 00:18 < bridge> <-StormAx> char dPlayer[MAX_NAME_LENGTH]; 00:19 < bridge> <-StormAx> int PointCategoryDDR; 00:19 < bridge> <-StormAx> 00:19 < bridge> <-StormAx> }; 05:59 < ChillerDragon> I am failing to find the code that allows you to chain one setting multiple times 06:00 < ChillerDragon> for example this line i can copy paste 10 times and the callback will be called 10 times ``Console()->Chain("sv_name", ConchainSpecialInfoupdate, this);`` where is that list of callbacks stored? 06:00 < ChillerDragon> https://github.com/ddnet/ddnet/blob/bb3bd57c0e2b6f683cbfb7da66571f9f3878f1be/src/engine/shared/console.cpp#L975-L998 06:01 < ChillerDragon> i see only one callback being attached to the command directly. I would assume this code overwrites the old callback 08:16 < ws-client> Chaining only works if the command has been registered before already. Then, when you chain 10 callbacks all of those will be stored in separated CChain objects with their own callback. Their names will always be the same and they will get called after each other when the command gets executed 08:17 < ws-client> Wait, no, I think my memory is not correct here 08:18 < ws-client> I see what you mean with getting overridden 09:52 < bridge> Write the json to a file if it failed and check what's wrong with it 10:56 < bridge> <-StormAx> the problem is solved^^ 10:57 < bridge> <-StormAx> i've parse the 2 files from 2 different servers in same time 13:43 < ws-client> @fokkonaut ye watfak right? 13:43 < ws-client> there is no queue, linked list, vector, array or something else in sight 13:43 < ws-client> and yet you can call ``Chain("sv_map", ...)`` then times and it calls the callback then times 13:44 < ws-client> i tried to debug with gdb and the backtrace just looks like recursion lmao i am so lost 13:47 < ChillerDragon> wot black magick did magnus do 15 yrs ago!? 13:48 < ChillerDragon> wait he is on discord i can ask him ;D @matricks sos how does the Console()->Chain() code allow to chain multiple callbacks i do not understand where this list is stored 13:54 < bridge> Imagine you remember what you coded 15 years ago and how it works 😂 13:54 < bridge> Imagine you can remember what you coded 15 years ago and how it works 😂 13:54 < bridge> I have low hopes 13:54 < bridge> i dont remember how one week old code works :justatest: 13:55 < ChillerDragon> i dont remember how code works that i am currently writing 13:55 < ChillerDragon> but its magnus he pro he must know 14:39 < bridge> Imagine having Code that works :justatest: 14:40 < bridge> I mean there is only one obvious answer. It’s just a linked list 14:45 < bridge> It’s a linked list of CChain’s effectively 14:48 < bridge> Which variable holds the link to the next element? @learath2 14:49 < bridge> m_pfnCallback 14:49 < bridge> Note that it'll become Con_Chain next time you call Chain 14:50 < bridge> Yea but what 14:50 < bridge> Omg I’m on das phone deck 14:51 < bridge> But it only ever gets set to Con\_Chain 14:51 < bridge> Where does it get set to something else 14:52 < bridge> It doesnt need to get set to anything else. The context keeps changing 14:52 < bridge> WTF 14:52 < bridge> But how does it link if it’s only set to Con\_Chain 14:53 < bridge> And who frees the memory? 14:53 < bridge> Does it ever get un chained? 14:55 < bridge> Con_Chain uses the context passed to it to call the callback. The contexts are linked together 14:56 < bridge> Okay but where is m\_pfnCallback then set to something other than Con\_Chain 14:59 < ws-client> hmm maybe ddnet fixed a memory leak and that fucks me over 14:59 < ws-client> but i still struggle to fully understand this linked list 15:12 < bridge> m_pfnChainCallback is what stores your callbacks 15:13 < ws-client> ye m_pfnChainCallback i understand 15:14 < ws-client> wait do i? 15:14 < ws-client> so the users callback is in the info and the info is in the command 15:15 < ws-client> but then the nenxt call to Chain() overwrites that info 15:16 < ws-client> i probably should implement a linked list my self at least once to better read it 15:17 < ws-client> so before ``pCommand->m_pfnCallback`` is overwritten it is stored in ``pCommand->m_pUserData->m_pfnCallback`` 15:17 < ws-client> i prefer reading the code where this is called next -.- 15:18 < ws-client> where does this stuff get destroyed again? 15:20 < ws-client> ah it doesnt 15:20 < ws-client> okay i dont understand my bug 15:21 < bridge> then its a feature 15:27 < bridge> writing obfuscated code is fun. reading it is not 15:31 < bridge> https://darkcoding.net/software/rust-systemd-memory-remains/ 15:31 < bridge> cc @heinrich5991 @learath2 @jupeyy_keks 15:34 < ws-client> watfak i fixed mmy bug 15:35 < ws-client> it had nothing todo with chaining at all :D 15:35 < ws-client> kill me 15:35 < ws-client> ok nvm i didnt fix shit 15:47 < ws-client> lmao my dummy has a better ping 15:47 < ws-client> https://zillyhuhn.com/cs/.1705416410.png 16:08 < bridge> Dummy vpn 16:19 < bridge> typical routine of a programmer 16:21 < bridge> what is the main point of maintaining the 0.7 ? 16:21 < bridge> Making chiller happy 17:11 < bridge> https://github.com/orgs/community/discussions/16925https://github.com/orgs/community/discussions/16925 17:11 < bridge> https://github.com/orgs/community/discussions/16925 17:11 < bridge> https://github.com/orgs/community/discussions/16925https://github.com/orgs/community/discussions/16925 17:11 < bridge> https://github.com/orgs/community/discussions/16925 17:42 < bridge> `str_tofloat` converts any wrong symbol sequence to 0 -> #7765 17:42 < bridge> https://github.com/ddnet/ddnet/issues/7765 17:51 < bridge> It’s not particularly obfuscated, it’s a chiller question, he usually asks first before reading the code 😄 17:52 < bridge> He is proficient at using the irc as a debugger 17:55 < bridge> xd 17:56 < bridge> iaad (irc as a debugger) 17:57 < bridge> waiting for monthly payment @chillerdragon (another new 0.6-0.7 bridged 0.6 mod) 17:58 < bridge> i can't post images on discord (country problems) where can i put my image to show you ? 18:15 < bridge> https://drive.google.com/file/d/1oafJSV-BpEmaEHIINfjMhWxLgNOgND3A/view?usp=drive_link 18:15 < bridge> a test 🙂 18:33 < bridge> IIRC, ChillerDragon wants to play on 0.7 ctf servers. 18:33 < bridge> With 0.7 client support merged, it would be possible to leverage 0.7 skins support in a few dozen lines of code. 18:34 < bridge> (I guess the question was about 0.7 protocol support in DDNet client) 18:44 < bridge> i making projectiles, but they behaving weirdly this is the code i added in ddrace.cpp 18:44 < bridge> ```cpp 18:44 < bridge> new CProjectile( 18:44 < bridge> &GameServer()->m_World, 18:44 < bridge> WEAPON_GUN, //Type 18:44 < bridge> ClientID, //Owner 18:45 < bridge> pChr->Core()->m_Pos, //Pos 18:45 < bridge> vec2(input->m_TargetX,input->m_TargetY), //Dir 18:45 < bridge> -2, //Span 18:45 < bridge> false, //Freeze 18:45 < bridge> false, //Explosive 18:45 < bridge> -1, //SoundImpact 18:45 < bridge> vec2(input->m_TargetX,input->m_TargetY) // InitDir 18:45 < bridge> ); 18:45 < bridge> ``` 18:45 < bridge> projectiles are made and disappear instantly 18:45 < bridge> i making projectiles, but they behaving weirdly, this is the code i added in ddrace.cpp 18:45 < bridge> ```cpp 18:45 < bridge> new CProjectile( 18:45 < bridge> &GameServer()->m_World, 18:45 < bridge> WEAPON_GUN, //Type 18:45 < bridge> ClientID, //Owner 18:45 < bridge> pChr->Core()->m_Pos, //Pos 18:45 < bridge> vec2(input->m_TargetX,input->m_TargetY), //Dir 18:45 < bridge> -2, //Span 18:45 < bridge> false, //Freeze 18:45 < bridge> false, //Explosive 18:45 < bridge> -1, //SoundImpact 18:45 < bridge> vec2(input->m_TargetX,input->m_TargetY) // InitDir 18:45 < bridge> ); 18:45 < bridge> ``` 18:45 < bridge> projectiles are made and disappear instantly 18:45 < bridge> span is about how long projectile is intended to live 18:45 < bridge> you set it to -2 18:46 < bridge> Chiller suggested me to call the projectile in the snap, which snap do i need to call it ? 18:47 < bridge> if you want to add new kind of projectiles its better to copy existing one and edit it to pleasure your own fantasies kekw 18:48 < bridge> my end goal is to make new entity (money), which fly toward the players just like in ddnet++ 18:50 < bridge> so just copy-paste pickup.h/cpp and edit it 18:50 < bridge> but it's funny, the projectiles form debug dummies are just working fine, but me and my dummy is not 18:51 < bridge> let me check the pickup for the first time 19:03 < bridge> but i still want to fix this 19:04 < bridge> at least know why it's doing this 19:04 < bridge> . 19:04 < bridge> that's not the case 19:08 < bridge> ah 19:09 < bridge> try to set span to -1 19:12 < bridge> still the same 19:34 < bridge> seen it 19:54 < bridge> I thought we had checks to prevent this from happening? Can we disable the warning now? 19:56 < bridge> Something seems wrong with the error message, the skin is the same size as all other skins 20:24 < bridge> this is a different warning from last time 20:24 < bridge> yeah, I realised it's not the warning we can toggle 20:24 < bridge> it has to do with curl 20:25 < bridge> it has to do with curl-multi 20:25 < bridge> there's no reason to ever turn that warning off 20:26 < bridge> Somehow the image width and height are zero, looks like we somehow try to load the texture before loading the image data 20:27 < bridge> Warnings should be less intrusive when you are playing though, like only a small alert in the corner or bottom 20:28 < bridge> not sure 20:28 < bridge> we should make sure that they don't happen on our skins servers 20:37 < bridge> Did I bork something? 20:37 < bridge> I think yeah, something about skin download broken in master 20:38 < bridge> Image width and height are zero so we get this weird warning 20:39 < bridge> Seems like a threading issue. The skin download task is considered `HTTP_DONE` before `OnCompletion` was called AFAICT 20:39 < bridge> I could have messed something up the ordering of that stuff as it did kinda change yeah 20:40 < bridge> I can take a look tomorrow 20:43 < bridge> @ryozuki you on? i have a rust sos 20:45 < bridge> ```rust 20:45 < bridge> pub async fn register(pool: &Pool,id: &u32, user: &str, password: &str, salt: &str) -> Result<(), sqlx::Error> { 20:45 < bridge> sqlx::query("INSERT INTO Accounts (id, username, password, salt) VALUES (?, ?, ?, ?)") 20:45 < bridge> .bind(id) 20:45 < bridge> .bind(user) 20:45 < bridge> .bind(password) 20:45 < bridge> .bind(salt) 20:45 < bridge> .execute(pool) 20:45 < bridge> .await?; 20:45 < bridge> 20:45 < bridge> Ok(()) 20:45 < bridge> } 20:45 < bridge> pub async fn register_handler( 20:45 < bridge> pool: Extension>, 20:45 < bridge> Json(data): Json, 20:45 < bridge> ) -> Result { 20:45 < bridge> match register(&pool, &data.id, &data.password, &data.salt, &data.user).await { 20:45 < bridge> Ok(_) => Ok("User registered successfully".into()), 20:45 < bridge> Err(_) => Err(StatusCode::INTERNAL_SERVER_ERROR), 20:45 < bridge> } 20:45 < bridge> } 20:45 < bridge> 20:45 < bridge> let user_routes = Router::new() 20:45 < bridge> .route("/register", post(queries::register_handler)); 20:45 < bridge> 20:45 < bridge> let app = Router::new() 20:45 < bridge> .nest("/user", user_routes) 20:45 < bridge> ``` 20:45 < bridge> 20:46 < bridge> using sqlx and axum (and yes i use axum just for you) 20:46 < bridge> getting 20:46 < bridge> ```cpp 20:46 < bridge> note: required by a bound in `post` 20:46 < bridge> --> C:\Users\blaiz\.cargo\registry\src\index.crates.io-6f17d22bba15001f\axum-0.7.4\src\routing\method_routing.rs:389:1 20:46 < bridge> | 20:46 < bridge> 389 | top_level_handler_fn!(post, POST); 20:46 < bridge> | ^^^^^^^^^^^^^^^^^^^^^^----^^^^^^^ 20:46 < bridge> | | | 20:46 < bridge> | | required by a bound in this function 20:46 < bridge> | required by this bound in `post` 20:46 < bridge> = note: this error originates in the macro `top_level_handler_fn` (in Nightly builds, run with -Z macro-backtrace for more info) 20:46 < bridge> 20:46 < bridge> ``` 20:46 < bridge> backtrace didnt really help me here 20:46 < bridge> you posted note instead of error xd 20:46 < bridge> ? dont quite know what you mean sry 20:47 < bridge> you didn't post the error 20:47 < bridge> well the full output 20:47 < bridge> scroll a bit higher 20:47 < bridge> OH LOL 20:47 < bridge> ```rust 20:47 < bridge> --> src\connection.rs:30:34 20:47 < bridge> | 20:47 < bridge> 30 | .route("/register", post(queries::register_handler)); 20:47 < bridge> | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Handler<_, _>` is not implemented for fn item `fn(Extension>, sqlx::types::Json) -> impl Future> {register_handler}` 20:47 < bridge> | | 20:47 < bridge> | required by a bound introduced by this call 20:47 < bridge> | 20:47 < bridge> = help: the following other types implement trait `Handler`: 20:47 < bridge> as Handler> 20:48 < bridge> as Handler<(), S>> 20:48 < bridge> note: required by a bound in `post` 20:48 < bridge> --> C:\Users\blaiz\.cargo\registry\src\index.crates.io-6f17d22bba15001f\axum-0.7.4\src\routing\method_routing.rs:389:1 20:48 < bridge> | 20:48 < bridge> 389 | top_level_handler_fn!(post, POST); 20:48 < bridge> | ^^^^^^^^^^^^^^^^^^^^^^----^^^^^^^ 20:48 < bridge> | | | 20:48 < bridge> | | required by a bound in this function 20:48 < bridge> | required by this bound in `post` 20:48 < bridge> = note: this error originates in the macro `top_level_handler_fn` (in Nightly builds, run with -Z macro-backtrace for more info) 20:48 < bridge> ``` 20:48 < bridge> i was so confused 20:48 < bridge> xd 20:48 < bridge> add the `error:` containing string 20:49 < bridge> ```rust 20:49 < bridge> error[E0277]: the trait bound `fn(Extension>, sqlx::types::Json) -> impl Future> {register_handler}: Handler<_, _>` is not satisfied 20:49 < bridge> --> src\connection.rs:30:34 20:49 < bridge> | 20:49 < bridge> 30 | .route("/register", post(queries::register_handler)); 20:49 < bridge> | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Handler<_, _>` is not implemented for fn item `fn(Extension>, sqlx::types::Json) -> impl Future> {register_handler}` 20:49 < bridge> | | 20:49 < bridge> | required by a bound introduced by this call 20:49 < bridge> | 20:49 < bridge> = help: the following other types implement trait `Handler`: 20:49 < bridge> as Handler> 20:49 < bridge> as Handler<(), S>> 20:49 < bridge> note: required by a bound in `post` 20:49 < bridge> --> C:\Users\blaiz\.cargo\registry\src\index.crates.io-6f17d22bba15001f\axum-0.7.4\src\routing\method_routing.rs:389:1 20:49 < bridge> | 20:49 < bridge> 389 | top_level_handler_fn!(post, POST); 20:49 < bridge> | ^^^^^^^^^^^^^^^^^^^^^^----^^^^^^^ 20:49 < bridge> | | | 20:49 < bridge> | | required by a bound in this function 20:49 < bridge> | required by this bound in `post` 20:49 < bridge> = note: this error originates in the macro `top_level_handler_fn` (in Nightly builds, run with -Z macro-backtrace for more info) 20:49 < bridge> ``` 20:49 < bridge> third time's the charm! 20:49 < bridge> third time's the charm! (i cant even copy paste correctly) 20:52 < bridge> can you send queries::register_handler? 20:52 < bridge> - 20:52 < bridge> i included everything in here, but register_handler is in queries.rs 20:52 < bridge> thats why its linked as queries:: 20:53 < bridge> can you send the signature of this function then xd 20:54 < bridge> signature meaning definitions afaik?: 20:54 < bridge> ```rust 20:54 < bridge> #[derive(Deserialize)] 20:54 < bridge> struct RegistrationData { 20:54 < bridge> id: u32, 20:54 < bridge> user: String, 20:54 < bridge> password: String, 20:54 < bridge> salt: String, 20:54 < bridge> } 20:54 < bridge> pub async fn register_handler( 20:54 < bridge> pool: Extension>, 20:55 < bridge> Json(data): Json, 20:55 < bridge> ) -> Result { 20:55 < bridge> match register(&pool, &data.id, &data.password, &data.salt, &data.user).await { 20:55 < bridge> Ok(_) => Ok("User registered successfully".into()), 20:55 < bridge> Err(_) => Err(StatusCode::INTERNAL_SERVER_ERROR), 20:55 < bridge> } 20:55 < bridge> } 20:55 < bridge> 20:55 < bridge> pub async fn register(pool: &Pool,id: &u32, user: &str, password: &str, salt: &str) -> Result<(), sqlx::Error> { 20:55 < bridge> sqlx::query("INSERT INTO Accounts (id, username, password, salt) VALUES (?, ?, ?, ?)") 20:55 < bridge> .bind(id) 20:55 < bridge> .bind(user) 20:55 < bridge> .bind(password) 20:55 < bridge> .bind(salt) 20:55 < bridge> .execute(pool) 20:55 < bridge> .await?; 20:55 < bridge> 20:55 < bridge> Ok(()) 20:55 < bridge> } 20:55 < bridge> ``` 20:55 < bridge> signature meaning definitions afair?: 20:55 < bridge> ```rust 20:55 < bridge> #[derive(Deserialize)] 20:55 < bridge> struct RegistrationData { 20:55 < bridge> id: u32, 20:55 < bridge> user: String, 20:55 < bridge> password: String, 20:55 < bridge> salt: String, 20:55 < bridge> } 20:55 < bridge> pub async fn register_handler( 20:56 < bridge> pool: Extension>, 20:56 < bridge> from some github issue on axum 20:56 < bridge> > If you run into `Handler<_, _>` is not implemented errors, enable `axum`'s macros feature and annotate your handler with `#[axum::debug_handler]`. It will give you much better error messages. 20:58 < bridge> check this out https://docs.rs/axum-macros/latest/axum_macros/attr.debug_handler.html 20:59 < bridge> ye 21:00 < bridge> btw dont use extension 21:00 < bridge> use state 21:00 < bridge> https://docs.rs/axum/latest/axum/extract/struct.State.html 21:04 < bridge> thanks you two, will do that and come back if i cant fix it myself <3 21:11 < bridge> :justatest: :justatest: :justatest: :justatest: :justatest: :justatest: :justatest: :justatest: :justatest: :justatest: :justatest: :justatest: :justatest: :justatest: :justatest: 21:11 < bridge> ```rust 21:11 < bridge> error: type `RegistrationData` is private 21:11 < bridge> --> src\connection.rs:30:29 21:11 < bridge> | 21:12 < bridge> 30 | .route("/register", post(queries::register_handler)); 21:12 < bridge> | ^^^^ private type 21:12 < bridge> 21:12 < bridge> 21:12 < bridge> ``` 21:12 < bridge> :justatest: :justatest: :justatest: :justatest: :justatest: :justatest: :justatest: :justatest: :justatest: :justatest: :justatest: :justatest: :justatest: :justatest: :justatest: 21:12 < bridge> found the issue! 21:20 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1196911866140700773/image.png?ex=65b95a0a&is=65a6e50a&hm=726a9c6b844bca45b86085070ae4e5a7250e4b9f397f859c09c07f7bf7cd32fc& 21:21 < bridge> do you have libcurl4-openssl-dev installed? 21:22 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1196912336162791496/image.png?ex=65b95a7a&is=65a6e57a&hm=76adec6534f045fd0eadad87a9be00d76ebdd0a44efaf195193d2229190ef6c7& 21:22 < bridge> who r u and what happened to gerdoe 21:22 < bridge> wut 21:22 < bridge> what did u do to gerdoe? 21:23 < bridge> i was forced to change my nickname here, nothing more kekw 21:23 < bridge> Yes 21:24 < bridge> i was struggling with same issue month ago actually 21:24 < bridge> have it ever happened to u that google just log you out with no reason? 21:24 < bridge> i tried every so answer but it ended up reinstalling curl openssl and so on 21:24 < bridge> for a second i though someone guessed the password :justatest: 21:28 < bridge> ```bash 21:28 < bridge> ls -l /lib/x86_64-linux-gnu # check for any libcurl.so.4.x.x 21:28 < bridge> rm /lib/x86_64-linux-gnu/libcurl.so.4 21:28 < bridge> ln -s /lib/x86_64-linux-gnu/libcurl.so.4.6.0 /lib/x86_64-linux-gnu/libcurl.so.4 21:28 < bridge> ``` 21:28 < bridge> @yekrm thats what i ended up with 21:31 < bridge> sorry :owo: 21:31 < bridge> Problem is the legacy version do you know how to remove it? 21:31 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1196914680300580944/image.png?ex=65b95ca9&is=65a6e7a9&hm=0919254f164d6d497e31f3e4ab65476237203a745c51a9e8cce4cd06b9466c48& 21:32 < bridge> when u hack me, tell me the password cuz i dont know it myself 21:33 < bridge> can't remember your own date of birth? 21:33 < bridge> nuh uh 21:33 < bridge> wait a bit 21:35 < bridge> ```bash 21:35 < bridge> apt list --installed | grep ssl 21:35 < bridge> ``` 21:36 < bridge> uninstall them all and reinstall curl, it should download correct one, i bet xd 21:36 < bridge> or don't 21:37 < bridge> i did `apt purge curl; apt install curl` 21:37 < bridge> who forced u 21:37 < bridge> guess 21:37 < bridge> i mean i change nick ingame 21:37 < bridge> our dictator? 21:37 < bridge> so i should change it here too 21:37 < bridge> changed* 21:37 < bridge> the moderator rules 21:37 < bridge> i forced him 😏 21:38 < bridge> may the 4 be with u 21:38 < bridge> https://tenor.com/view/die-plush-punch-changed-plush-tiger-shark-gif-26991874 21:38 < bridge> https://media.discordapp.net/attachments/676503872608534547/1171017454315634790/Rape.gif?ex=655b25fd&is=6548b0fd&hm=2fa01b2f48d82c3d6c10923804b17983d86f6520db45a20254e7a72c1adbd592& 21:38 < bridge> ? 21:43 < bridge> no gifs in #developer btw 21:43 < bridge> we dont have this rule 21:43 < bridge> pls don't invent it 21:43 < bridge> 🤨 21:44 < bridge> soooo i can send gifs here? :p 21:44 < bridge> if u dont spam them 21:44 < bridge> else u break the rule "don't spam" 21:44 < bridge> 😏 21:44 < bridge> ddnet 21:44 < bridge> ddnet 21:44 < bridge> ddnet 21:44 < bridge> ddnet 21:44 < bridge> https://media.discordapp.net/attachments/513888142974255124/1026251739202072596/ezgif-1-dc3fd6d399.gif 21:44 < bridge> ddnet 21:45 < bridge> wow almost 4d 21:45 < bridge> @learath2 can u access internet in a plane if ur a peasant? 21:45 < bridge> I will try thanks 21:45 < bridge> got a 14h flight saturday 21:45 < bridge> Depends on the airline 21:45 < bridge> It seems the problem is ubuntu LTS 21:46 < bridge> Headed back to japan? 21:46 < bridge> are you going to edlang conference? :poggers2: 21:46 < bridge> Iberia 21:46 < bridge> @learath2 going to argentina 21:46 < bridge> its all paid by company 21:46 < bridge> haha 21:46 < bridge> 1 week 21:46 < bridge> heinrich deletes every my gif tho xd 21:47 < bridge> Iberia is the airline 21:47 < bridge> u changed name 21:47 < bridge> i remember u as the furry 21:48 < bridge> i don't think you have the same for freddie 21:48 < bridge> report him 21:48 < bridge> 😏 21:48 < bridge> who is he btw? 21:49 < bridge> gerdoe 21:49 < bridge> NO WAY 21:50 < bridge> No internet for you unless they changed sth 21:50 < bridge> sadge 21:51 < bridge> Vacation or work? 21:51 < bridge> @learath2 it says 95% of their planes have 21:51 < bridge> no i go there to work and meet the team 21:51 < bridge> and well 21:51 < bridge> eat 21:51 < bridge> good food 21:51 < bridge> good meat actually 21:51 < bridge> argentina is a place of good meat 21:51 < bridge> The connection they have, but they had 0 free interwebs for economy ppls 21:51 < bridge> paid i think xd 21:52 < bridge> sadge 21:52 < bridge> ill use their destroyed economy to buy stuff for cheap 21:52 < bridge> like clothes 21:52 < bridge> Wtf capitalist 21:52 < bridge> xd 21:52 < bridge> YES, enjoy 21:52 < bridge> @learath2 they tell me meat is cheaper than a coffee there 22:02 < bridge> @ryozuki mah rust api works :brownbear: 22:02 < bridge> nice 23:00 < bridge> https://maggiminutes.com/install-latest-openssl-3-on-linux/ -> If someone has a version lower than 3.0 of openssl follow this guide :owo: 23:44 < bridge> ok im done 23:44 < bridge> i did literally nothing but it costed me an entire evening