Helios-fr / Discord-Emulator

Allows you to simulate discord with minimal resources

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error code 4004

ttiggerr opened this issue · comments

C:\Users\Desktop\Discord-User-Scraper-main>python main.py
Retrieving Discord's build number...
Discord is currently on build number 126462
[+] (<discum.start.login.Login->getXFingerprint) Get -> https://discord.com/api/v9/experiments
[+] (<discum.start.login.Login->getXFingerprint) Response <- b'{"fingerprint": "971117068231512104.kF2oF03Gvrsd9OKFWKhrYrqB5es", "assignments": [[70411085, 0, 1, -1, 0], [16416918, 0, 1, -1, 0], [3816091942, 3, 0, -1, 0], [4130837190, 0, 10, -1, 0], [852550504, 3, 1, -1, 0], [2599708267, 0, 1, -1, 0], [1365487849, 6, 1, -1, 0], [3128009767, 0, 10, -1, 0], [2973729510, 2, 1, -1, 0], [2571931329, 1, 6, -1, 0], [1260103069, 0, 1, -1, 0], [2003494159, 1, 1, -1, 0], [2458926251, 1, 6, -1, 2], [4027800, 1, 6, -1, 3], [51193042, 0, 1, -1, 0], [2063302207, 1, 1, -1, 0], [2634540382, 3, 1, -1, 0], [427713714, 0, 1, -1, 0], [3316720711, 0, 1, -1, 1], [156590431, 0, 1, -1, 2], [1126477623, 0, 1, -1, 0], [2617218444, 4, 0, -1, 2], [3615263239, 0, 1, -1, 0], [414823706, 0, 1, -1, 0], [3035674767, 0, 1, -1, 0], [261678880, 0, 1, -1, 0], [1758928808, 2, 1, -1, 0], [144783748, 0, 1, -1, 0], [2311413706, 0, 1, -1, 0], [1304635016, 0, 1, -1, 0], [2031154483, 0, 1, -1, 0], [1609782151, 0, 1, -1, 2], [1047093347, 0, 1, -1, 2], [3354177721, 0, 1, -1, 0], [3643362751, 0, 1, -1, 0], [698017395, 0, 1, -1, 0], [902020832, 3, 3, -1, 1], [1503481915, 0, 1, -1, 2], [4135022925, 2, 1, -1, 0], [2165627712, 2, 0, -1, 0], [3346844407, 0, 1, -1, 0], [3753034466, 1, 2, -1, 0], [881221695, 1, 1, -1, 0], [105505141, 1, 1, -1, 1], [3921541483, 2, 1, -1, 0], [3125584553, 1, 1, -1, 0], [219203323, 1, 1, -1, 0], [2854861606, 0, 1, -1, 1], [203190011, 0, 1, -1, 0], [2416791266, 1, 1, -1, 0], [1740882580, 1, 1, -1, 0], [3526033165, 0, 1, -1, 0], [3699939463, 0, 1, -1, 2], [1913882179, 0, 1, -1, 2], [3884403666, 1, 1, -1, 0], [949804751, 3, 1, -1, 0], [2365882538, 1, 1, -1, 0], [2780619238, 1, 0, -1, 0], [2839301427, 1, 1, -1, 0], [2740541143, 1, 1, -1, 0], [1567199723, 0, 1, -1, 1], [2237617796, 0, 1, -1, 0], [2804024497, 0, 1, -1, 2], [2481496956, 0, 1, -1, 0], [1305004983, 0, 1, -1, 0], [4196771574, 6, 6, -1, 0], [3121542871, 1, 0, -1, 0], [934741861, 2, 1, -1, 1], [2639499196, 3, 1, -1, 1], [1926403380, 0, 1, -1, 0], [1175582167, 1, 1, -1, 0], [2012365622, 0, 2, -1, 0], [3615787841, 0, 1, -1, 0], [1369422507, 0, 1, -1, 0], [3997593347, 2, 1, -1, 3], [4257117014, 1, 2, -1, 0], [122196248, 2, 1, -1, 2], [2191591221, 0, 1, -1, 0], [2486591316, 0, 1, -1, 1], [1860870966, 0, 1, -1, 0], [613690816, 2, 1, -1, 0], [754424255, 0, 0, -1, 0], [282861292, 0, 0, -1, 0], [2950595281, 2, 1, -1, 0], [4263969313, 2, 1, -1, 2], [2496945544, 0, 0, -1, 0], [3662016164, 3, 2, -1, 0], [2486607747, 0, 0, -1, 0], [604497254, 0, 1, -1, 0], [2736193736, 0, 1, -1, 0], [2542634194, 0, 1, -1, 0], [1138665623, 0, 1, -1, 0], [3542498455, 0, 1, -1, 0], [2064265893, 2, 1, -1, 0], [723256323, 0, 1, -1, 0], [1094004645, 0, 1, -1, 2], [3805175685, 0, 0, -1, 0], [3866818837, 0, 0, -1, 0], [3450899088, 1, 1, -1, 0], [3656796460, 0, 1, -1, 0], [334012295, 0, 1, -1, 0], [1685515200, 0, 7, -1, 0], [1748842958, 1, 1, -1, 0], [899439768, 1, 1, -1, 0], [1216567253, 0, 1, -1, 0], [4100056516, 0, 1, -1, 3], [3047034364, 0, 3, -1, 0], [2140622532, 2, 1, -1, 5], [799757083, 0, 3, -1, 0], [854704408, 0, 1, -1, 0], [1218854292, 0, 1, -1, 0], [1308053712, 0, 1, -1, 0], [1363066938, 3, 1, -1, 1], [2519288568, 2, 1, -1, 0], [1814483290, 0, 1, -1, 0], [3074844387, 0, 2, -1, 0], [3910343238, 2, 0, -1, 1], [2855612301, 0, 1, -1, 0], [4084522269, 0, 1, -1, 0], [1613012371, 0, 0, -1, 0], [1401072564, 1, 0, -1, 0], [3567821600, 0, 1, -1, 1], [3557480712, 0, 1, -1, 0], [3606428003, 0, 0, -1, 0], [2815803943, 0, 0, -1, 0], [3889077804, 2, 1, -1, 0], [4079214319, 2, 1, -1, 0], [695307255, 0, 0, -1, 1], [1621989768, 0, 0, -1, 0], [191312409, 2, 1, -1, 0]]}'
Enter the id of the server: 304902041447432192
Enter the id of a channel in the server: 879999186815291402
[gateway] Connected to websocket.
[gateway] > {'op': 2, 'd': {'token': 'Token REPLACED\n', 'capabilities': 509, 'properties': {'os': 'Windows', 'browser': 'Chrome', 'device': '', 'system_locale': 'en-US', 'browser_user_agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36', 'browser_version': '99.0.4844', 'os_version': '10', 'referrer': '', 'referring_domain': '', 'referrer_current': '', 'referring_domain_current': '', 'release_channel': 'stable', 'client_build_number': 126462, 'client_event_source': None}, 'presence': {'status': 'online', 'since': 0, 'activities': [], 'afk': False}, 'compress': False, 'client_state': {'guild_hashes': {}, 'highest_last_message_id': '0', 'read_state_version': 0, 'user_guild_settings_version': -1, 'user_settings_version': -1}}}
[gateway] > {'op': 4, 'd': {'guild_id': None, 'channel_id': None, 'self_mute': True, 'self_deaf': False, 'self_video': False}}
[gateway] < {'t': None, 's': None, 'op': 10, 'd': {'heartbeat_interval': 41250, '_trace': ['["gateway-prd-main-fxsd",{"micros":0.0}]']}}
[gateway] entering heartbeat
[gateway] close status code: 4004
[gateway] close message: Authentication failed.
[gateway] websocket closed
[gateway] Connection Dropped. Retrying in 10 seconds.
[gateway] Connected to websocket.

I believe this is caused by an invalid user token try checking it and trying again. also the issue could be caused by using a bot token, not a user token. please try these things and reply if you are still experiencing issues.

still getting the same issue

Ok how are you getting the token, if you use the version that I linked you need to remove the quotes in some cases can you try that

yeah i used the method that you recommended tried with the quotes and without it and still the same error

I have just tested it and it worked i have a few potential problems that you may have.

  1. Not all the packages are imported. Try going through the imports and installing them with pip if you haven't already
  2. The token.txt is set up wrong. make sure that the token is the ONLY text in the file without quotes.
  3. Firewall is blocking the program. try temporarily disabling it and see if that fixes the issue.
    if none of these work then try reinstalling the project.

yeah sorry about that got it working now thanks for that

If you find the program useful it would mean a lot to me if you star it. If you do turn notifications off so you don't get notified for everything I do on the project.

Also, have the issue, already went through everything that was written here a couple of times.
output:


[gateway] > {'op': 2, 'd': {'token': 'NjU0NDQ1NTc3NjA1NjExNTMx.GFhh6Y.pAL1SEYACk-DNc6v86SbO8udtxcG2pro4T0tGc\n', 'capabilities': 253, 'properties': {'os': 'Windows', 'browser': 'Chrome', 'device': '', 'system_locale': 'en-US', 'browser_user_agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36', 'browser_version': '96.0.4664', 'os_version': '10', 'referrer': '', 'referring_domain': '', 'referrer_current': '', 'referring_domain_current': '', 'release_channel': 'stable', 'client_build_number': 107767, 'client_event_source': None}, 'presence': {'status': 'online', 'since': 0, 'activities': [], 'afk': False}, 'compress': False, 'client_state': {'guild_hashes': {}, 'highest_last_message_id': '0', 'read_state_version': 0, 'user_guild_settings_version': -1}}}
[gateway] < {'t': None, 's': None, 'op': 10, 'd': {'heartbeat_interval': 41250, '_trace': ['["gateway-prd-us-east1-b-lm03",{"micros":0.0}]']}}
[gateway] entering heartbeat
[gateway] < {'t': None, 's': None, 'op': 11, 'd': None}
[gateway] close status code: 4004
[gateway] close message: Authentication failed.
[gateway] websocket closed
[gateway] Connection Dropped. Retrying in 10 seconds.

When I do pip install -r requirements.txt I get all Requirement already satisfied

My token.txt contains (I changed some numbers, don't worry, this is not a real token, but the format should be the same):

NjU0NDC1NTc3FjA7NjExNTMx.GFhh5Y.pOL1SEYACk-DNc6v30SbO8udtxcG2pro4T0tMc

Everything is turned off on my antivirus

If you look in the logs there is a "\n" or new line at the end of the token make sure there isn't a line in the token file

Click the second line hit backspace save and retry.

Hope this helps sorry for the slow response time I have been busy.

Thanks, that helped but created a new error.

Traceback (most recent call last):
  File "C:\Users\***\AppData\Local\Programs\Python\Python310\lib\site-packages\discum\gateway\gateway.py", line 300, in _response_loop
    function(resp, **params)
  File "C:\Users\***\AppData\Local\Programs\Python\Python310\lib\site-packages\discum\gateway\guild\combo.py", line 89, in fetchMembers
    ranges = self.getRanges(index, multiplier, self.gatewayobj.session.guild(guild_id).memberCount) if not endFetching else [[0],[0]]
  File "C:\Users\***\AppData\Local\Programs\Python\Python310\lib\site-packages\discum\gateway\session.py", line 376, in memberCount
    return Session.settings_ready['guilds'][self.guildID]['member_count']
KeyError: 'guilds'

Can you check that the version of discum you are using is the same as the version in the requirements file.

If this is the correct version and it still doesn't work try updating to the newer version 1.4.1

Was version 1.4.0, updated to version 1.4.1 (newest), still the same thing
Will post a video here as it does a lot more errors then just one.

2022-09-26-10-22-36-1.mp4

This is an issue with the package as discord has updated since it last worked I linked the issue here I am unable to do anything to fix it at this point.

The issue: Merubokkusu/Discord-S.C.U.M#428