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

TypeError: this.stream.sendRequest is not a function #4

Closed
ShadowRanger opened this issue Oct 25, 2018 · 1 comment
Closed

TypeError: this.stream.sendRequest is not a function #4

ShadowRanger opened this issue Oct 25, 2018 · 1 comment

Comments

@ShadowRanger
Copy link
Contributor

Uncaught Promise Error:  TypeError: this.stream.sendRequest is not a function
    at Communicator.sendMessage (C:\TestBot\node_modules\epicgames-client\src\Communicator\index.js:277:15)
    at Communicator.communicator.on (C:\TestBot\index.js:72:26)
    at Communicator.emit (events.js:182:13)
    at Client.stream.on.stanza (C:\TestBot\node_modules\epicgames-client\src\Communicator\index.js:243:13)
    at Client.prototype.emit (C:\TestBot\node_modules\wildemitter\wildemitter.js:117:30)
    at Client.<anonymous> (C:\TestBot\node_modules\stanza.io\lib\client.js:91:14)
    at Client.prototype.emit (C:\TestBot\node_modules\wildemitter\wildemitter.js:117:30)
    at WSConnection.<anonymous> (C:\TestBot\node_modules\stanza.io\lib\client.js:341:18)
    at WSConnection.prototype.emit (C:\TestBot\node_modules\wildemitter\wildemitter.js:128:30)
    at WSConnection.<anonymous> (C:\TestBot\node_modules\stanza.io\lib\transports\websocket.js:86:14)
TypeError: this.stream.sendRequest is not a function
    at Communicator.sendMessage (C:\TestBot\node_modules\epicgames-client\src\Communicator\index.js:277:15)
    at Communicator.communicator.on (C:\TestBot\index.js:72:26)
    at Communicator.emit (events.js:182:13)
    at Client.stream.on.stanza (C:\TestBot\node_modules\epicgames-client\src\Communicator\index.js:243:13)
    at Client.prototype.emit (C:\TestBot\node_modules\wildemitter\wildemitter.js:117:30)
    at Client.<anonymous> (C:\TestBot\node_modules\stanza.io\lib\client.js:91:14)
    at Client.prototype.emit (C:\TestBot\node_modules\wildemitter\wildemitter.js:117:30)
    at WSConnection.<anonymous> (C:\TestBot\node_modules\stanza.io\lib\client.js:341:18)
    at WSConnection.prototype.emit (C:\TestBot\node_modules\wildemitter\wildemitter.js:128:30)
    at WSConnection.<anonymous> (C:\TestBot\node_modules\stanza.io\lib\transports\websocket.js:86:14)

I am receiving the above error when using the code below:

client.egClient = new EpicGamesClient({
	email: "email",
	password: "password"
});

try {
	await client.egClient.init();
	await client.egClient.login();

	const communicator = client.egClient.communicator;

	communicator.on("friend:request", async (data) => {
		communicator.sendMessage(data.account_id, "[Debug 1] This is a test message!");
	});
} catch (error) {
	console.log(error);
}
@SzymonLisowiec
Copy link
Owner

Fixed in commit:7bcb8f6

SzymonLisowiec pushed a commit that referenced this issue May 5, 2019
davispuh pushed a commit to davispuh/node-epicgames-client that referenced this issue Aug 31, 2020
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

2 participants