TechieGuy12 / PlexServerAutoUpdater

Automatically update Plex when running the Plex service.
MIT License
118 stars 10 forks source link

Error: "Some or all identity references could not be translated" #2

Closed seanvree closed 8 years ago

seanvree commented 8 years ago

Hey man! Thanks for this! Awesome!

I tried to run the .exe but I get the following error:

"Some or all identity references could not be translated"

I tried running from a CMD prompt as well, no dice.

My system:

Windows 10 Enterprise

Plex running as a service

Ran with admin privileges

Any ideas?

TechieGuy12 commented 8 years ago

I'll have to look into the issue. The issue appears to come from a principal that can't be mapped to a known identity on your computer. I'll see if I can code around it.

seanvree commented 8 years ago

thanks @TechieGuy12 ! Let me know if I can help

TechieGuy12 commented 8 years ago

Version 0.1.3.1 is in the development branch. Can you try out that version to see if the problem still exists?

seanvree commented 8 years ago

Okay, so If I just double click on the .exe, I don't get a prompt or anything, doesn't seem to stop the plex service. So how do I know it worked since there is no update available?

I then ran from an admin cmd prompt and I got the error: "no mapping between account names and security IDs was done"

LMK.

TechieGuy12 commented 8 years ago

Hmm. When you double-click you should get a prompt indicating you aren't an administrator, and if you are it should display a window. There is something amiss with the accounts on the machine.

Can you try doing he following:

  1. Open gpedit.msc as an administrator.
  2. Click Computer Configuration->Windows Settings->Security Settings->Local Policies->User Rights Assignment.
  3. On the right, double-click the Allow log on locally option.
  4. Ensure that at least the Administrators and Users groups are in the list. If not, add them using the Add User or Group button. If the Plex user is not a local account, then add that user in, as well.
  5. Restart your machine.
seanvree commented 8 years ago

Yeah, no changes needed to be made there.

If you'd like, I can let you RDC into my machine so you can take a look? LMK. seanvree@hotmail.com.

TechieGuy12 commented 8 years ago

Hi,

RDC into your machine is an option. I have updated the development branch with another change in code to lookup the user SID. Can you give it a try?

seanvree commented 8 years ago

okay, so if I run the .exe by just double-clicking it or right clicking and "run as admin" I didn't get an error or any message all, so may have worked? How do I know if it ran?

I also tried opening a CMD prompt first and CD to it's directory then typing the.exe, and when I do that I get "The SID for the user was not specified"

TechieGuy12 commented 8 years ago

Have you logged into the machine using the account that is running the Plex service? The issue seems to be that the updater can't find the SID associated with the Plex service account.

seanvree commented 8 years ago

Well, the PLEX service in my case runs as a Windows Service. No user needs to be logged on. However, I have tried the administrator account, as well as another account that has admin privileges.

TechieGuy12 commented 8 years ago

What user does the Plex Service run under? There should be an log in account associated with the Plex service. If so, try logging in with that account once and then log off again.

seanvree commented 8 years ago

it's the "Local System" account, like all the other windows services. Everything I've set up on this system is under the admin account which is what I use to manage the system.

TechieGuy12 commented 8 years ago

Thanks, knowing that the service runs under the Local System account is helpful. I will provide a new update that will hopefully work with the Local System account.

seanvree commented 8 years ago

no prob @TechieGuy12 , like I said, if you'd like to RDC into my server, I can do that. Let me know. I'm Pacific Standard Time. Usually afternoon, and/or late PM is good for me.

TechieGuy12 commented 8 years ago

I have updated the Development branch to work with the Local System account. I had to ensure my LocalAppDataPath registry key for Plex was set (if you changed it then it would be set under the Local System account).

seanvree commented 8 years ago

BOOM!

TechieGuy12 commented 8 years ago

I take it the update worked? If so, I will update the master version and close the issue.

seanvree commented 8 years ago

Yes! I mean, it's hard to say if it will work when an update is released, but the .exe runs! May want to wait until a PLEX update comes out to see how it interacts with actually updating the service. Up to you.

TechieGuy12 commented 8 years ago

I will close the issue because it refers to the identity mapping issue, which appears to be resolved. If you do get an error while upgrading, just open a new issue.