AWS Thinkbox Discussion Forums

Deadline > Shotgun: AuthenticationFault

Hi All,

We’re having issues with Deadline not being able to create Shotgun versions, since migrating to Autodesk Shotgrid.

Here is an error log from when we submit a Nuke job:

2022-02-22 12:43:29:  'C:\Users\matt.richardson\AppData\Local\Thinkbox\Deadline10\pythonAPIs\I+OE3uY1X+aOUE77eyzj6w==' already exists. Skipping extraction of PythonSync.
2022-02-22 12:43:29:  INFO: Importing Shotgun API from 'C:\Users\matt.richardson\AppData\Local\Thinkbox\Deadline10\pythonAPIs\I+OE3uY1X+aOUE77eyzj6w=='...
2022-02-22 12:43:30:  INFO: Output path: Y:\Woody\sequences\FL1_01\FL1_01_055_030\CMP\review\FL1_01_055_030_CMP_v004\FL1_01_055_030_CMP_v004.####.dpx
2022-02-22 12:43:31:  INFO: An error occurred while attempting to add a new Version to Shotgun. No Version has been created.
2022-02-22 12:43:31:  INFO: Traceback (most recent call last):
2022-02-22 12:43:31:    File "none", line 140, in CreateShotgunVersion
2022-02-22 12:43:31:    File "C:\Users\matt.richardson\AppData\Local\Thinkbox\Deadline10\cache\vrDzJukx0i9Vk0qgGUwPMERW8\events\Shotgun\ShotgunUtils.py", line 333, in AddNewVersion
2022-02-22 12:43:31:      user = sg.find_one("HumanUser",filters=[["login","is",userName]],fields=['login','name'])
2022-02-22 12:43:31:    File "C:\Users\matt.richardson\AppData\Local\Thinkbox\Deadline10\pythonAPIs\I+OE3uY1X+aOUE77eyzj6w==\shotgun_api3\shotgun.py", line 882, in find_one
2022-02-22 12:43:31:      additional_filter_presets=additional_filter_presets)
2022-02-22 12:43:31:    File "C:\Users\matt.richardson\AppData\Local\Thinkbox\Deadline10\pythonAPIs\I+OE3uY1X+aOUE77eyzj6w==\shotgun_api3\shotgun.py", line 1025, in find
2022-02-22 12:43:31:      records = self._call_rpc("read", params).get("entities", [])
2022-02-22 12:43:31:    File "C:\Users\matt.richardson\AppData\Local\Thinkbox\Deadline10\pythonAPIs\I+OE3uY1X+aOUE77eyzj6w==\shotgun_api3\shotgun.py", line 3314, in _call_rpc
2022-02-22 12:43:31:      self._response_errors(response)
2022-02-22 12:43:31:    File "C:\Users\matt.richardson\AppData\Local\Thinkbox\Deadline10\pythonAPIs\I+OE3uY1X+aOUE77eyzj6w==\shotgun_api3\shotgun.py", line 3601, in _response_errors
2022-02-22 12:43:31:      raise AuthenticationFault(sg_response.get("message", "Unknown Authentication Error"))
2022-02-22 12:43:31:  shotgun_api3.shotgun.AuthenticationFault: Can't authenticate script 'b'deadline_integration''

The render itself completes fine, but the subsequent draft movies fail to upload as the relevant Shotgun version doesn’t exist. All the Deadline>SG integration works correctly as far as we can tell (artists can select their shot/task via the UI when submitting in Nuke).

We’ve been fighting this for a long time now with artists having to manually upload versions - Any help would be gratefully received.

Thanks

1 Like

Not sure, but it seems weird that the script name is a byte string (the b at the start).
This could possibly be due to Python 3 migration.
Maybe in ShotgunUtils you should decode the userName to a str or unicode, something like

if isinstance(userName, bytes):
  userName = userName.decode("utf-8")

Also check if this has been fixed in newer versions of Deadline.

I’ve been having this issue, try deleting / renaming the Thinkbox folder in your user profile and launching again.

Thanks Anthony,

I was just thinking about deleting the local cache folder:
C:\Users\matt.richardson\AppData\Local\Thinkbox\Deadline10\cache\vrDzJukx0i9Vk0qgGUwPMERW8\events\Shotgun

I restarted and deleted the local cache, still get the same error after resubmitting

Does it connect outside of Nuke? using the connection tester?
image
I had issues but and I’m sure I tested deleting the cache folder too, I then set up a new cloud project and couldn’t connect there till i deleted the Thinkbox folder
image

I had a new account which was pointing to xxxxx.shotgrid.autodesk.com and had no issues at all.

If it does work and it’s the Nuke submitter, can you clear that cache and/or re-install the latest deadline submitter?

Which version Deadline & Nuke are you using?

I’m having this issue now as well, has anyone resolved it? I tried deleting the thinkbox folder.

It only seems to error when trying to create the initial version on the job with the OnJobSubmitted “no task” part. But this is a problem since every other update is tied to that version, and the movie doesn’t upload properly if it’s not initially created.

Was working fine with Nuke 12.2v2 on Deadline 10.1.9 and now broken on 10.1.20

I ended up writing my own custom submission code. It wasn’t the most simple solution, but I didn’t get any of these errors

Thanks for the update! Yeah, I’m going down that route as well now. Was hoping to avoid it but seems more reliable and flexible to just go with our own uploading methods rather than using their built-in stuff unfortunately.

In case it helps anyone else, I’m still using Draft, and passing the sg info to draft from the job is more of a pain than I thought it would be. ParamParser has a neat built-in function “GetDeadlineJobProperties()” but it didn’t work and on the below page it looks like it’s been defunct since Deadline 6? Decided to use the webservice to get the job extrainfo fields using the draft param deadlineJobID.

https://docs.thinkboxsoftware.com/products/draft/1.6/Documentation/Cookbook/DeadlineIntegration/UsingDeadlineJobValues.html?highlight=extrainfo

Necromancy!

It seems like all of you smart people homebrewed your own workaround to this problem, but I’m running into this issue too.

  • Deadline 10.3.0.13
  • I do have Secrets Management enabled, but it seems to be working fine. I had a Secrets issue, but it’s been resolved
  • When testing the connection in the Monitor, and when checking in the Pipeline Tools menu of the submitter, Shotgun Integration settings are all plugged in and working. I’m able to pull down info, like projects, tasks, etc.
  • Note: Manually running the version creation by right-clicking on the job and going to Scripts > Integration > Create Shotgun Version works

Has anyone cracked this?

Could I get the whole log you’re seeing? If this is the same issue we’ve got a runbook with a fix, however it is around a year old, so make a backup of any files you change.

The solution ended up being linked to in the shotgrid community post located here: CERTIFICATE_VERIFY_FAILED error on Windows - Pipeline Integrations - Community @ ShotGrid

The steps are:

  1. Replace ShotgunUtils.py on the repository with the new version that uses SafeDecode -
    ShotgunUtils.py (26.3 KB)
  2. Run the PS script from shotgrid, as administrator, on the render machines.
  3. Delete the files on each render machine in C:\UsersUsername\AppData\Local\Thinkbox\Deadline10\pythonAPIs.
  4. Download a fresh copy of the certifi module for python3.
  5. Replace the files on each render machine in C:\Program Files\Thinkbox\Deadline10\bin\pythonsync3\certifi with the fresh copy.
1 Like

Sure! I just had a phone call with Customer Support, and made a little package for them. I’ll upload it here, too. Thanks so much for your help!

Just a question, please. What is the PS script?

arothstein_Deadline_Shotgrid_Errors.zip (36.2 KB)

The PS (or PowerShell) script is the one mentioned in that link out to Community @ Shotgrid.

Let us know how testing with that ShotgunUtils.py file goes!

Hey @Justin_B!

Thanks for the feedback. I followed the instructions in your post, and unfortunately no dice. It’s still unable to authenticate the API script. I’m getting a slightly different error than before:

Event Error (OnJobSubmitted): Can’t authenticate script ‘deadline_integration’

Previously, the API script looked like this: ‘b’deadline_integration’. Maybe that slight change I’m seeing is the SafeDecode at work, but the script is still unable to create a version.

I’m really curious about this, because as I mentioned when I right-click on the job and go to Scripts > Integration > Create Shotgun Version that works fine! Staying posted for any updates! I’ll attach the job archives for posterity.
DeadlineJobs.zip (44.4 KB)

That change from b'deadline_integration' is indeed SafeDecode doing its job converting from a byte-type string.

In the past the issue had been that b'deadline_integration' is not equivalent to 'deadline_integration', so we were basically passing the wrong script name to the Shotgrid API.

Given version creation is working everywhere except in the OnJobSubmitted event, I added a dump of the inputs to the version creation function. My thinking is that for some reason the same credentials aren’t getting used in every spot.

Shotgun.py (25.1 KB)

Could you drop this Shotgun.py into your /Shotgun directory? After making a backup copy of the existing Shotgun.py first.

Then when you use the Scripts > Integration > Create Shotgun Version workflow and in the task reports we’ll get a dump of the inputs we’re passing the Shotgun API. I’m expecting to see a difference, and that should get us pointed in the right direction.

1 Like

Hey @Justin_B ! It seems like something broke. I’m not getting this message when I try to perform anything Shotgrid related in the monitor. Both the integration test and the script to create a new version are throwing this error. I tried reverting back to the old Shotgun.py and the old ShotgunUtils.py (and every combination of the old ones and new ones), and I’m getting this error in every case. I also tried updating the API key on Shotgun to see if that would help, but same message. What do you think?

Retrieving sticky settings... done!
Connecting to Shotgun as 'arothstein'... UNEXPECTED ERROR:
<class 'shotgun_api3.shotgun.AuthenticationFault'>
Can't authenticate session token ending with 'f4fd'
---END ERROR INFO---

UPDATE! This is working on the repo machine, but not the workstation now, so this could be a Secrets Management issue. I’ll troubleshoot that separately. In the meantime, I can successfully create a Shotgun version on the repo machine. Here’s what the console says when I do that:

2023-10-11 14:28:48:  Running script CreateShotgunVersion (C:\Users\arothstein\AppData\Local\Thinkbox\Deadline10\cache\lXCxrdxo70XF0Q1bSCbiUtU5v8\scripts\Jobs\CreateShotgunVersion.py)
2023-10-11 14:29:42:  VersionName=RMD_001_040_Plate Online_v003
2023-10-11 14:29:42:  Description=test
2023-10-11 14:29:42:  UserName=arothstein
2023-10-11 14:29:42:  TaskName=Plate Online
2023-10-11 14:29:42:  ProjectName=Rare Model
2023-10-11 14:29:42:  EntityName=RMD_001_040
2023-10-11 14:29:42:  TaskId=6919
2023-10-11 14:29:42:  ProjectId=386
2023-10-11 14:29:42:  EntityId=2101
2023-10-11 14:29:42:  EntityType=Shot
2023-10-11 14:29:42:  DraftTemplate=
2023-10-11 14:29:42:  Output path: Z:\shotgun\projects\rare_model\sequences\001\RMD_001_040\ONL\work\images\arothstein\v003\4096x2160\RMD_001_040_plate_v003.####.exr
2023-10-11 14:29:42:  ShotgunThumbnailUpload: Z:\shotgun\projects\rare_model\sequences\001\RMD_001_040\ONL\work\images\arothstein\v003\4096x2160\RMD_001_040_plate_v003.1001.exr (9466)

UPDATE2! The authentication error has been resolved. We can ignore that part for now. Please see the console output for the information that is being passed to the Shotgrid API.

Sorry about the delay here - what kind of output do you get from a failed creation? Or is it just the AuthenticationFault with no extra details?

No worries! It’s working now! I’m not sure what happened – I did a couple restarts of the machines in question, but with the new python scripts I am successfully creating versions on submit, and the draft job is uploading the Quicktimes to those versions. Thank you so much!

1 Like
Privacy | Site terms | Cookie preferences