Code Monkey home page Code Monkey logo

Comments (13)

ouwou avatar ouwou commented on July 18, 2024

the 1011 is weird, but i doubt the 4004 is a bug. ive had a couple people say the rejections are wrong when the tokens are in fact wrong, so id suggest double checking to make sure/try re-obtaining your token.

from abaddon.

wakelin-g avatar wakelin-g commented on July 18, 2024

Same thing on arch... a 1001 followed by the token getting rejected. I'm 100% sure my token is right too.

from abaddon.

ouwou avatar ouwou commented on July 18, 2024

hmm maybe it has to do with the keychain. could you try compiling with -DUSE_KEYCHAIN=OFF passed to cmake? you could also try applying this patch which will print the IDENTIFY payload to console, and maybe token is empty for some reason

diff --git a/src/discord/discord.cpp b/src/discord/discord.cpp
index 9b31e05..6546c3b 100644
--- a/src/discord/discord.cpp
+++ b/src/discord/discord.cpp
@@ -2361,7 +2361,7 @@ void DiscordClient::SendIdentify() {
     msg.ClientState.UserGuildSettingsVersion = -1;
     SetSuperPropertiesFromIdentity(msg);
     const bool b = m_websocket.GetPrintMessages();
-    m_websocket.SetPrintMessages(false);
+    m_websocket.SetPrintMessages(true);
     m_websocket.Send(msg);
     m_websocket.SetPrintMessages(b);
 }

from abaddon.

ZirixCZ avatar ZirixCZ commented on July 18, 2024

did not solve the issue. I made sure that the token I am pasting in is correct.

from abaddon.

ouwou avatar ouwou commented on July 18, 2024

could you compile with the patch in addition to cmake -DUSE_KEYCHAIN=OFF and check the value of token within the output?

from abaddon.

wakelin-g avatar wakelin-g commented on July 18, 2024

could you compile with the patch in addition to cmake -DUSE_KEYCHAIN=OFF and check the value of token within the output?

Patched + recompiled w/ cmake -DUSE_KEYCHAIN=OFF, now getting segfault which seems to be caused by gtk/treeiter?

Thread 1 "abaddon" received signal SIGSEGV, Segmentation fault.
0x00007ffff7af29db in Gtk::TreeRow::set_value_impl (this=0x7fffffffcfc0, column=5, value=...)
    at gtk/gtkmm/treeiter.cc:229
Downloading source file /usr/src/debug/build/gtk/gtkmm/treeiter.cc
229       model_->set_value_impl(*this, column, value);

from abaddon.

ouwou avatar ouwou commented on July 18, 2024

are you building from master? i think this might be another bug which i fixed in master but hasnt been put into a release version yet. either way, that seems to indicate discord is accepting the token since it looks like its trying to populate the channel list. if you are on master could you get a backtrace from gdb?

from abaddon.

wakelin-g avatar wakelin-g commented on July 18, 2024

are you building from master? i think this might be another bug which i fixed in master but hasnt been put into a release version yet. either way, that seems to indicate discord is accepting the token since it looks like its trying to populate the channel list. if you are on master could you get a backtrace from gdb?

Ah, that could definitely be the case.

(gdb) run
Starting program: /home/user/pkgs/abaddon/build/abaddon
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff23ff6c0 (LWP 96896)]
cant find a resources folder, will try to load from cwd
[New Thread 0x7ffff1bfe6c0 (LWP 96897)]
[New Thread 0x7fffe93fd6c0 (LWP 96898)]
[New Thread 0x7ffff13fd6c0 (LWP 96899)]
[New Thread 0x7ffff0bce6c0 (LWP 96900)]
[Thread 0x7ffff0bce6c0 (LWP 96900) exited]
[New Thread 0x7ffff0bce6c0 (LWP 96901)]
[New Thread 0x7fffebfff6c0 (LWP 96902)]
[Thread 0x7ffff0bce6c0 (LWP 96901) exited]
[Thread 0x7fffebfff6c0 (LWP 96902) exited]
[New Thread 0x7fffebfff6c0 (LWP 96903)]
[New Thread 0x7ffff0bce6c0 (LWP 96904)]
[New Thread 0x7fffeb7fe6c0 (LWP 96905)]
[Thread 0x7ffff0bce6c0 (LWP 96904) exited]
[Thread 0x7fffeb7fe6c0 (LWP 96905) exited]
[New Thread 0x7fffeb7fe6c0 (LWP 96909)]
[New Thread 0x7ffff0bce6c0 (LWP 96910)]
[Thread 0x7ffff0bce6c0 (LWP 96910) exited]
[New Thread 0x7ffff0bce6c0 (LWP 96911)]
[Thread 0x7ffff0bce6c0 (LWP 96911) exited]
[Thread 0x7fffeb7fe6c0 (LWP 96909) exited]
[Thread 0x7fffebfff6c0 (LWP 96903) exited]
[New Thread 0x7fffebfff6c0 (LWP 96912)]
[New Thread 0x7ffff0bce6c0 (LWP 96913)]
[Thread 0x7ffff0bce6c0 (LWP 96913) exited]
[New Thread 0x7ffff0bce6c0 (LWP 96915)]
sending {"d":null,"op":1}
sending {"d":{"capabilities":509,"client_state":{"guild_hashes":{},"highest_last_message_id":"0","read_state_version":0,"user_guild_settings_version":-1,"user_settings_version":-1},"compress":false,"presence":{"activities":[],"afk":false,"since":0,"status":"online"},"properties":{"browser":"Chrome","browser_user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36","browser_version":"67.0.3396.87","client_build_number":184038,"client_event_source":null,"device":"","os":"Windows","os_version":"10","referrer":"","referrer_current":"","referring_domain":"","referring_domain_current":"","release_channel":"stable","system_locale":"en-US"},"token":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"},"op":2}

** (abaddon:96893): CRITICAL **: 12:09:35.616:
unhandled exception (type Glib::Error) in signal handler:
domain: g-file-error-quark
code  : 4
what  : Failed to open file “./res/decamarks.png”: No such file or directory

Unknown event SESSIONS_REPLACE
sending {"d":17,"op":1}

So I think the token is now working, but not sure what this is about. It seems like the css files aren't in their expected location?

from abaddon.

ZirixCZ avatar ZirixCZ commented on July 18, 2024

It's true that abaddon cannot seem to load the res files for me.

pwd
/folders/abaddon/build

ls -lah

...
-rwxr-xr-x@  1   18M Mar 27 12:47 abaddon
-rw-r--r--   1   0B Mar 20 02:54 abaddon.ini
drwxr-xr-x   5  160B Mar 20 02:47 css
drwxr-xr-x   5   160B Mar 20 02:47 fonts
drwxr-xr-x  37  1.2K Mar 20 02:47 res
...

./abaddon

unknown OS, trying to load config from cwd
unknown OS, trying to load resources from cwd
unknown OS, trying to load resources from cwd
(set token)
sending {"d":null,"op":1}
got socket close code: 1011

I would like to try master, but this shows up when running cmake .. from the build directory

❯ cmake ..
Must specify package names on the command line
Must specify package names on the command line
Must specify package names on the command line
Must specify package names on the command line
Must specify package names on the command line
Must specify package names on the command line
Must specify package names on the command line
Must specify package names on the command line
Must specify package names on the command line
Must specify package names on the command line
Must specify package names on the command line
Must specify package names on the command line
Must specify package names on the command line
Must specify package names on the command line
ixwebsocket was not found and will be included as a submodule
CMake Error at CMakeLists.txt:24 (add_subdirectory):
  The source directory

    /folders/abaddonDev/abaddon/subprojects/ixwebsocket

  does not contain a CMakeLists.txt file.


-- Configuring incomplete, errors occurred!

EDIT:
I fixed the submodule issue by running

git submodule init
git submodule update

The result is the same though
./abaddon

unknown OS, trying to load config from cwd
unknown OS, trying to load resources from cwd
unknown OS, trying to load resources from cwd
(set token)
sending {"d":null,"op":1}
got socket close code: 1011

from abaddon.

ouwou avatar ouwou commented on July 18, 2024

the 1011 is pretty weird since thats an internal error within ixwebsocket. did you compile with openssl or mbedtls? im not really sure what the right way to go about this one would be except maybe trying to change the TLS backend

from abaddon.

ouwou avatar ouwou commented on July 18, 2024

So I think the token is now working, but not sure what this is about. It seems like the css files aren't in their expected location?

yeah, you want the css and res folders from the res subdirectory to be next to the executable, not the top-level res folder itself. (ik thats a bit confusing)

from abaddon.

ZirixCZ avatar ZirixCZ commented on July 18, 2024

It seems like I was using a wrong token after all. I apologize.
For anyone having the same issue, the correct token can be found by following these steps:

Open discord in the browser.
Open the network tab.
Refresh to see all requests.
Search for api library
The GET request should look something like this https://discord.com/api/v9/users/@me/library?country_code=
Scroll into the Request Headers and find the authorization header. That's the token you use to authenticate against discord.

from abaddon.

wakelin-g avatar wakelin-g commented on July 18, 2024

So I think the token is now working, but not sure what this is about. It seems like the css files aren't in their expected location?

yeah, you want the css and res folders from the res subdirectory to be next to the executable, not the top-level res folder itself. (ik thats a bit confusing)

Yep, this fixed it!! Thanks!

from abaddon.

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.