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

Can't login - "Encrypted message authentication failed" #6

Open
TomerGamerTV opened this issue Oct 14, 2024 · 21 comments
Open

Can't login - "Encrypted message authentication failed" #6

TomerGamerTV opened this issue Oct 14, 2024 · 21 comments
Labels
bug Something isn't working

Comments

@TomerGamerTV
Copy link

I am getting this error in the console:

533B/533B a257f545a1ba Pull complete booster Pulled Network steam-hour-booster_default Creating Network steam-hour-booster_default Created Container steam-hour-booster Creating Container steam-hour-booster Created Container steam-hour-booster Starting Error response from daemon: Bind mount failed: '/data/compose/3/tokens' does not exists

Also, can you tell me how the folder structure is supposed to look? I'm on a NAS and it's a bit complicated...

@DrWarpMan
Copy link
Owner

I am not sure what the error refers to exactly. I don't have enough experience with Portainer and definitely not NAS.
Could it be that your directory /data/compose/3/tokens does not exist on host?

The folder structure inside the image is described in the example docker-compose.yml:

/app/steam-data
/app/config.json
/app/tokens

So, you should mount these files/directories to your host.

@TomerGamerTV
Copy link
Author

TomerGamerTV commented Oct 15, 2024 via email

@DrWarpMan
Copy link
Owner

steam-data and tokens are folders, config.json is a file

@TomerGamerTV
Copy link
Author

steam-data and tokens are folders, config.json is a file

Does everything need to be in an app folder?
Like:
/app/steam-data
/app/tokens
/app/config.json

@TomerGamerTV
Copy link
Author

It just keeps throwing me these errors
image

@DrWarpMan
Copy link
Owner

DrWarpMan commented Oct 15, 2024

Well, technically you can change the directories with environment variables, but you shouldn't have to. It seems like the cause of your problem is something different.

Are you able to provide the docker compose file of the created container or something? Anything that helps me see how did you setup the docker.

@TomerGamerTV
Copy link
Author

Tried running it in an ubuntu docker vm and got this error after logging in:

221 |           delete this._messageLength;
222 |           if (this.sessionKey) {
223 |                   try {
224 |                           message = SteamCrypto.symmetricDecrypt(message, this.sessionKey, true);
225 |                   } catch (ex) {
226 |                           this._fatal(new Error('Encrypted message authentication failed'));
                      ^
error: Encrypted message authentication failed
      at _readMessage (/root/steam-hour-booster/node_modules/steam-user/components/connection_protocols/tcp.js:226:17)
      at emit (node:events:183:48)
      at emitReadable_ (node:stream:1842:27)

[tomertv] Logging out...
3116 | export default "node:crypto";
                         ^
error: unable to decrypt data
      at unpad (node:crypto:3116:19)
      at node:crypto:1223:46
      at final (node:stream:3246:19)
      at prefinish (node:stream:3264:23)
      at emit (node:events:183:48)
      at prefinish (node:stream:2799:23)
      at finishMaybe (node:stream:2806:25)
      at afterWrite (node:stream:2675:24)
      at onwrite (node:stream:2640:21)
      at node:stream:3284:44

Bun v1.1.30 (Linux x64 baseline)

@DrWarpMan
Copy link
Owner

DrWarpMan commented Oct 15, 2024

I am not really sure what is the reason behind this, as I am not able to replicate it.

Another user was reporting it here, but they claim that the booster works even through the error.

Do you use the family sharing feature perhaps as well?

@TomerGamerTV
Copy link
Author

TomerGamerTV commented Oct 15, 2024 via email

@TomerGamerTV
Copy link
Author

I am not really sure what is the reason behind this, as I am not able to replicate it.

Another user was reporting it here, but they claim that the booster works even through the error.

Do you use the family sharing feature perhaps as well?

Yea I got family sharing with other accounts but I’m the main dude

@TomerGamerTV
Copy link
Author

I will attempt to test it with a game I own on my main just in case

@DrWarpMan
Copy link
Owner

DrWarpMan commented Oct 16, 2024

You may also try to run the following script with Bun:

bun test.js
// test.js
import Steam from "steam-user";

const steam = new Steam({
    dataDirectory: "./data", // remove the directory after testing
    protocol: Steam.EConnectionProtocol.TCP
});

steam.logOn({
    accountName: "your_username",
    password: "your_password"
});

steam.on("loggedOn", () => {
    console.log("Logged in");
})

steam.gamesPlayed([730]); // currently, CS:GO - replace with the exact game list that you specified when running 'steam-hour-booster'

And see if the same "encryption" error occurs again.

@TomerGamerTV
Copy link
Author

TomerGamerTV commented Oct 16, 2024 via email

@DrWarpMan
Copy link
Owner

Just create a new file called test.js, inside that "ubuntu docker vm".
Put the script I posted inside the file, replace username & password, run:

bun test.js

@TomerGamerTV
Copy link
Author

Just create a new file called test.js, inside that "ubuntu docker vm". Put the script I posted inside the file, replace username & password, run:

bun test.js

Still same error:

221 |           delete this._messageLength;
222 |           if (this.sessionKey) {
223 |                   try {
224 |                           message = SteamCrypto.symmetricDecrypt(message, this.sessionKey, true);
225 |                   } catch (ex) {
226 |                           this._fatal(new Error('Encrypted message authentication failed'));
                      ^
error: Encrypted message authentication failed
      at _readMessage (/root/steam-hour-booster/node_modules/steam-user/components/connection_protocols/tcp.js:226:17)
      at emit (node:events:183:48)
      at emitReadable_ (node:stream:1842:27)
3116 | export default "node:crypto";
                         ^
error: unable to decrypt data
      at unpad (node:crypto:3116:19)
      at node:crypto:1223:46
      at final (node:stream:3246:19)
      at prefinish (node:stream:3264:23)
      at emit (node:events:183:48)
      at prefinish (node:stream:2799:23)
      at finishMaybe (node:stream:2806:25)
      at afterWrite (node:stream:2675:24)
      at onwrite (node:stream:2640:21)
      at node:stream:3284:44

Bun v1.1.30 (Linux x64 baseline)

Im trying these IDs:
"games": [1849000,1944240]

@DrWarpMan
Copy link
Owner

Okay, one last thing, could you test the following?

  1. Install node (if its not already installed) within the Ubuntu container
  2. Create a new directory (foobar) anywhere, with the following structure:
foobar/
foobar/package.json
foobar/test.js
  1. Put the following inside package.json:
{
  "dependencies": {
    "steam-user": "^5.2.0"
  },
  "type": "module"
}
  1. Run npm install from within the foobar directory.
  2. Run node test.js

And report back whether the error occurs.

@TomerGamerTV
Copy link
Author

Alr after logging in nothing happens, it didn't crash but it doesn't look like it is farming anything

@DrWarpMan
Copy link
Owner

Okay, one last thing, could you test the following?

  1. Install node (if its not already installed) within the Ubuntu container
  2. Create a new directory (foobar) anywhere, with the following structure:
foobar/
foobar/package.json
foobar/test.js
  1. Put the following inside package.json:
{
  "dependencies": {
    "steam-user": "^5.2.0"
  },
  "type": "module"
}
  1. Run npm install from within the foobar directory.
  2. Run node test.js

And report back whether the error occurs.

@TomerGamerTV you did these exact steps, launched node test.js, and it printed "Logged in"?

@TomerGamerTV
Copy link
Author

Okay, one last thing, could you test the following?

  1. Install node (if its not already installed) within the Ubuntu container
  2. Create a new directory (foobar) anywhere, with the following structure:
foobar/
foobar/package.json
foobar/test.js
  1. Put the following inside package.json:
{
  "dependencies": {
    "steam-user": "^5.2.0"
  },
  "type": "module"
}
  1. Run npm install from within the foobar directory.
  2. Run node test.js

And report back whether the error occurs.

@TomerGamerTV you did these exact steps, launched node test.js, and it printed "Logged in"?

Yep I followed everything you said, logged in and then nothing happens

@DrWarpMan
Copy link
Owner

DrWarpMan commented Oct 16, 2024

I can't see why the farming would not work for you.

I made a mistake in my code snippet, the steam.gamesPlayed([730]); should have been placed inside the loggedOn event block.

@DrWarpMan DrWarpMan added the bug Something isn't working label Oct 16, 2024
Repository owner deleted a comment from TomerGamerTV Oct 18, 2024
@DrWarpMan
Copy link
Owner

DrWarpMan commented Oct 18, 2024

After a debug session with @TomerGamerTV outside of GitHub, it seems the reason for this is Bun's incompatibility with Node's crypto module (logging in using Node worked fine). Unfortunately I am unable to reproduce it, so I can't even try to take a closer look at a possible workaround/solution. The only "hint" I got is that it's related to different Steam account's settings - specifically Family Sharing.

@DrWarpMan DrWarpMan changed the title Tried creating a stack with portainer and got this error Can't login - "Encrypted message authentication failed" Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants