DrWarpMan / steam-hour-booster

Farm your in-game hours on Steam
MIT License
7 stars 2 forks source link

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

Open TomerGamerTV opened 1 month ago

TomerGamerTV commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

steam-data and tokens are folders or files?

On Tue, 15 Oct 2024 at 11:42 DrWarpMan @.***> wrote:

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 https://github.com/DrWarpMan/steam-hour-booster/blob/24691b82d612104426c079bb09a140b7c8779d66/docker-compose.yml :

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

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

— Reply to this email directly, view it on GitHub https://github.com/DrWarpMan/steam-hour-booster/issues/6#issuecomment-2413260276, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKRXGATEJLNW4O46IZETL2LZ3TIRBAVCNFSM6AAAAABP52H3TCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJTGI3DAMRXGY . You are receiving this because you authored the thread.Message ID: @.***>

DrWarpMan commented 1 month ago

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

TomerGamerTV commented 1 month ago

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 commented 1 month ago

It just keeps throwing me these errors image

DrWarpMan commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

I tried with the .env file too but it didn’t help.

I’m using the docker compose file you provide in docker url inside the readme, I can record a video of trying to deploy it if you want

On Tue, 15 Oct 2024 at 10:32 PM DrWarpMan @.***> wrote:

Well, technically you can change the directories with environment variables https://github.com/DrWarpMan/steam-hour-booster#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.

— Reply to this email directly, view it on GitHub https://github.com/DrWarpMan/steam-hour-booster/issues/6#issuecomment-2414845614, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKRXGAUH2NPKZA6INIU7I5DZ3VUTBAVCNFSM6AAAAABP52H3TCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJUHA2DKNRRGQ . You are receiving this because you authored the thread.Message ID: @.***>

TomerGamerTV commented 1 month ago

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 commented 1 month ago

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

DrWarpMan commented 1 month ago

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 commented 1 month ago

Make a new test.js file and try running that? Also how to I run a separate script with bun?

On Wed, 16 Oct 2024 at 10:45 AM DrWarpMan @.***> wrote:

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

// test.jsimport 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.

— Reply to this email directly, view it on GitHub https://github.com/DrWarpMan/steam-hour-booster/issues/6#issuecomment-2415981348, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKRXGARNK5XLTA7VY2R5WZ3Z3YKSVAVCNFSM6AAAAABP52H3TCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJVHE4DCMZUHA . You are receiving this because you authored the thread.Message ID: @.***>

DrWarpMan commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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
  3. Put the following inside package.json:
    {
    "dependencies": {
    "steam-user": "^5.2.0"
    },
    "type": "module"
    }
  4. Run npm install from within the foobar directory.
  5. Run node test.js

And report back whether the error occurs.

TomerGamerTV commented 1 month ago

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

DrWarpMan commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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.