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

Different accounts with same username not working (steam deck) #7

Closed
frizzle0815 opened this issue Feb 4, 2024 · 4 comments
Closed

Comments

@frizzle0815
Copy link

I have two steam decks with username "deck" that cannot be changed.
When adding these to timekpr-next-remote (same username, different ip) it is loading the unused/used times forever without visible error. It works if I just add one of the decks.

@mrjones-plip
Copy link
Owner

Thanks for filing the ticket @frizzle0815 ! I'll have some time this week (possibly today) to dig into this.

@mrjones-plip
Copy link
Owner

mrjones-plip commented Feb 4, 2024

Hey @frizzle0815 - my first step was to try and reproduce your problem and I was unable to :( Details about my tests below. I will say I should likely add a feature like "Display name" vs "Auth name" so you can have two identical auth names but have them show up as different names in the web GUI 😅

To help you though, can you answer some questions in hopes of uncovering the error?

  1. Can you share your config.py? Please change the ssh_password if it is not the default one from the repo - I don't want to know your secrets!
  2. Can you verify if you enable only deck(1) in the config it works to add and remove time? And then can you confirm if you enable only deck(2) in the config it works to add and remove time?
  3. Can you take a screen recording of the error and share it?
  4. Can you confirm you can manually SSH to both steam decks using the timekpr-next-remote user and the ssh_password you have in the timekpr-next remote config?

Test steps

  1. create two LXD Ubuntu 22 containers
  2. add two users both named deck to the containers
  3. install timekpr-next on the both using the PPA, configured the deck user to have 1hr for every day of the week per the dev steps
  4. add the timekpr-next-remote user with the default password of Predict Plaything Unbiased Grappling
  5. download a copy of the repo: git clone https://github.com/mrjones-plip/timekpr-next-remote.git
  6. cd into timekpr-next-remote directory, copy the config cp conf.example.py conf.py and edit it to look like this:
     trackme = {
         '10.131.161.208': ["deck"],
         '10.131.161.122': ["deck"],
     }
     ssh_user = 'timekpr-next-remote'
     ssh_password = 'Predict Plaything Unbiased Grappling'
     ssh_timekpra_bin = '/usr/bin/timekpra'
     ssh_key = './id_timekpr'
  7. start the docker server with docker compose up (note I actually use a different binary called docker-compose in the recording - this doesn't affect the running of the app)
  8. Load the web GUI and try giving both deck users some time

Here's the video of me testing:

timekpr-next-remote-test.mp4

@frizzle0815
Copy link
Author

frizzle0815 commented Feb 5, 2024

Wow, thank you very much for your extensive answers, I did not expect that!

Unfortunately I have to admit that after retesting everything it works without problem and now I feel bad for wasting your time.

I never really learned coding and have to do everything by trial and error and this is my first time doing anything on Github - so please bear with me 😌

My first mistake was that I didn't understand that the config.py needs to have the username "deck" in the trackme section. I just added the names of my kids there 😆 .. after figuring that out I got one deck working for a brief moment but not the other one (I'm not sure anymore, but I believe I just renamed one to "deck" for testing). After renaming both to "deck" they both kept "loading" forever...
I worked around this with setting up two separate instances for every deck; one with port 8080 another with port 8081 and I got that working (probably after doing some more changes - see below). So this led me to the assumption that boths "deck" at a time can't be implemented.

As weekly limits are important for me as well I even managed to change your code so Weekly Unused/Used is shown for the decks as well. Weekly Unused is a bit tricky as this value isn't provided but has to be computed from the weekly limit minus weekly already spent. I'm a little proud that I was able to achive that 😂

However.. after your response I added both decks to the config again and it worked right on the spot.

Part of the error could be that the user timekpr-next-remote wasn't set up correctly in the group timekpr. I had a bit of a struggle with that. So SSH connection was most likely established correctly and no error was shown. However without the correct privileges no userinfo could be retrieved and there seems to be no error message for this case, it just keeps loading forever. (I had the same problem with the computation of weekly unused which I did wrong at first. This also gave me a forever loading, although this was no problem with privileges).

So yeah.. two suggestions: Adding a "display name" vs "auth name" would be a great idea 😁 Another idea would be adding error messages when userinfo can't be retrieved due to wrong privileges.

@mrjones-plip
Copy link
Owner

@frizzle0815 - awesome glad you go it working!

And no need to apologize - none of my time was wasted! You were stuck, you read my response, tried some stuff, and now your unstuck - we've succeeded \o/

I'll look into exposing more error logs, but I do see I have some code in there already - maybe it's easy!

Finally - i think an there's some room for improvement in having identically named users - tracking this in #8

Cheers!

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