Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read properties of undefined (reading 'map') #77

Open
KARONAGAMING opened this issue Oct 30, 2022 · 9 comments
Open

Cannot read properties of undefined (reading 'map') #77

KARONAGAMING opened this issue Oct 30, 2022 · 9 comments

Comments

@KARONAGAMING
Copy link

KARONAGAMING commented Oct 30, 2022

/Discord-Screenshare/node_modules/discord.js-selfbot-v13/src/managers/ClientUserSettingManager.js:135
const data_ = data.guild_positions.map((guildId, i) => {
^

TypeError: Cannot read properties of undefined (reading 'map')
at ClientUserSettingManager._patch (/Discord-Screenshare/node_modules/discord.js-selfbot-v13/src/managers/ClientUserSettingManager.js:135:42)
at Object.module.exports [as READY] (/Discord-Screenshare/node_modules/discord.js-selfbot-v13/src/client/websocket/handlers/READY.js:82:18)
at WebSocketManager.handlePacket (/Discord-Screenshare/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketManager.js:346:31)
at WebSocketShard.onPacket (/Discord-Screenshare/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketShard.js:478:22)
at WebSocketShard.onMessage (/Discord-Screenshare/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketShard.js:317:10)
at WebSocket.onMessage (/Discord-Screenshare/node_modules/ws/lib/event-target.js:199:18)
at WebSocket.emit (node:events:527:28)
at Receiver.receiverOnMessage (/Discord-Screenshare/node_modules/ws/lib/websocket.js:1169:20)
at Receiver.emit (node:events:527:28)
at Receiver.dataMessage (/Discord-Screenshare/node_modules/ws/lib/receiver.js:528:14)

Node.js v17.9.0
error Command failed with exit code 1.

@SAUUU
Copy link

SAUUU commented Nov 9, 2022

did you find a solution ?

@KARONAGAMING
Copy link
Author

no i don't

@IuCC123
Copy link

IuCC123 commented Jan 13, 2023

@byeJohn
Copy link

byeJohn commented Feb 1, 2023

Fixed it by replacing the old file to this one: https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/3ec6bf45fba5cfcde4c70062302d68bfa5ef4cf6/src/managers/ClientUserSettingManager.js

How do you go about doing this? I have the same issue as KARONAGAMING at the moment

@byeJohn
Copy link

byeJohn commented Feb 9, 2023

#78

@brendonvan
Copy link

Fixed it by replacing the old file to this one: https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/3ec6bf45fba5cfcde4c70062302d68bfa5ef4cf6/src/managers/ClientUserSettingManager.js

`➜ Discord-Screenshare git:(master) ✗ docker build .

[+] Building 3.0s (21/21) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 37B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:20.04 1.1s
=> [ 1/17] FROM docker.io/library/ubuntu:20.04@sha256:24a0df437301598d1a4b62ddf59fa0ed2969150d70d748c84225e6501e9c36b9 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 26B 0.0s
=> CACHED [ 2/17] RUN apt-get update 0.0s
=> CACHED [ 3/17] RUN apt-get install -y curl git unzip wget 0.0s
=> CACHED [ 4/17] RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata 0.0s
=> CACHED [ 5/17] RUN curl -fsSL https://deb.nodesource.com/setup_17.x | bash - 0.0s
=> CACHED [ 6/17] RUN apt-get install -y nodejs 0.0s
=> CACHED [ 7/17] RUN npm i -g yarn 0.0s
=> CACHED [ 8/17] RUN git clone https://github.com/MainSilent/Discord-Screenshare.git 0.0s
=> CACHED [ 9/17] WORKDIR Discord-Screenshare 0.0s
=> CACHED [10/17] RUN yarn install 0.0s
=> CACHED [11/17] COPY .env . 0.0s
=> CACHED [12/17] RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb 0.0s
=> CACHED [13/17] RUN apt-get install -y ./google-chrome-stable_current_amd64.deb 0.0s
=> CACHED [14/17] RUN mkdir /chromedriver 0.0s
=> CACHED [15/17] RUN wget -q --continue -P /chromedriver "http://chromedriver.storage.googleapis.com/112.0.5615.49/chromedriver_linux64.zip" 0.0s
=> CACHED [16/17] RUN unzip /chromedriver/chromedriver* -d /chromedriver 0.0s
=> ERROR [17/17] RUN yarn start 1.8s

[17/17] RUN yarn start:
#21 0.342 yarn run v1.22.19
#21 0.374 $ node main.js
#21 0.835 Webdriver started
#21 1.697 /Discord-Screenshare/node_modules/discord.js-selfbot-v13/src/managers/ClientUserSettingManager.js:135
#21 1.697 const data_ = data.guild_positions.map((guildId, i) => {
#21 1.697 ^
#21 1.697
#21 1.697 TypeError: Cannot read properties of undefined (reading 'map')
#21 1.697 at ClientUserSettingManager._patch (/Discord-Screenshare/node_modules/discord.js-selfbot-v13/src/managers/ClientUserSettingManager.js:135:42)
#21 1.697 at Object.module.exports [as READY] (/Discord-Screenshare/node_modules/discord.js-selfbot-v13/src/client/websocket/handlers/READY.js:82:18)
#21 1.697 at WebSocketManager.handlePacket (/Discord-Screenshare/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketManager.js:346:31)
#21 1.697 at WebSocketShard.onPacket (/Discord-Screenshare/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketShard.js:478:22)
#21 1.697 at WebSocketShard.onMessage (/Discord-Screenshare/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketShard.js:317:10)
#21 1.697 at WebSocket.onMessage (/Discord-Screenshare/node_modules/ws/lib/event-target.js:199:18)
#21 1.697 at WebSocket.emit (node:events:527:28)
#21 1.697 at Receiver.receiverOnMessage (/Discord-Screenshare/node_modules/ws/lib/websocket.js:1169:20)
#21 1.697 at Receiver.emit (node:events:527:28)
#21 1.697 at Receiver.dataMessage (/Discord-Screenshare/node_modules/ws/lib/receiver.js:528:14)
#21 1.697
#21 1.697 Node.js v17.9.0
#21 1.742 error Command failed with exit code 1.`

I attempted to replace the old file with the code in the link you sent. I still had the same issue.
Did you replace the full dependency?

@byeJohn
Copy link

byeJohn commented Apr 6, 2023

I'm not sure if this will fix your issue but when I had this problem, I edited the Dockerfile and added:
RUN wget https://raw.githubusercontent.com/aiko-chan-ai/discord.js-selfbot-v13/3ec6bf45fba5cfcde4c70062302d68bfa5ef4cf6/src/managers/ClientUserSettingManager.js -O /Discord-Screenshare/node_modules/discord.js-selfbot-v13/src/managers/ClientUserSettingManager.js into it.

@brendonvan
Copy link

I'm not sure if this will fix your issue but when I had this problem, I edited the Dockerfile and added: RUN wget https://raw.githubusercontent.com/aiko-chan-ai/discord.js-selfbot-v13/3ec6bf45fba5cfcde4c70062302d68bfa5ef4cf6/src/managers/ClientUserSettingManager.js -O /Discord-Screenshare/node_modules/discord.js-selfbot-v13/src/managers/ClientUserSettingManager.js into it.

THANK YOU IT WORKED FINALLY

@brendonvan
Copy link

#79

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants