Digitalroot-Valheim / Digitalroot.ModUploader

Uploads mods to Thunderstore, ModVault, or NexusMods
MIT License
5 stars 4 forks source link

[Bug]: NRE after upload to Nexus (resulting in no file added to mod) #16

Closed spacechase0 closed 3 months ago

spacechase0 commented 5 months ago

How are you playing the game?

Single Player - No Server

What happened?

I managed to get this working in my github workflow for the most part, but after the file is uploaded to Nexus (from what I can tell, anyways) I get this "Object reference not set to an instance of an object" error. Checking the Nexus mod shows that no new files are uploaded.

Full action log: https://github.com/spacechase0/TestModWorkflow/actions/runs/8461759142/job/23182128194

To Reproduce

See https://github.com/spacechase0/TestModWorkflow/blob/main/.github/workflows/build-mods.yml

Screenshots

No response

Relevant log output

One or more errors occurred. (Object reference not set to an instance of an object.)
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at Digitalroot.ModUploader.Provider.NexusMods.Commands.UploadCommand.AddFileToMod(String cookiesid_develop, UInt32 modId, String version, Boolean disableVersionUpdate, Boolean disableMainVortex, String fileName, FileInfo archiveFile, CategoryName categoryName, String description, Boolean disableDownloadWithManager, Boolean disableRequirementsPopUp, Int32 gameId, String fileUuid, String uploadedFileHash, Boolean disableMainFileUpdate, Int32 oldFileId, Boolean newExisting, Boolean removeOldVersion) in /home/runner/work/Digitalroot.ModUploader/Digitalroot.ModUploader/src/Digitalroot.ModUploader/Provider/NexusMods/Commands/UploadCommand.cs:line 432
   at Digitalroot.ModUploader.Provider.NexusMods.Commands.UploadCommand.<>c__DisplayClass3_0.<<GetCommandHandler>g__RunUploadWorkFlow|1>d.MoveNext() in /home/runner/work/Digitalroot.ModUploader/Digitalroot.ModUploader/src/Digitalroot.ModUploader/Provider/NexusMods/Commands/UploadCommand.cs:line 197

Log File

No response

Code of Conduct

alcmoe commented 5 months ago

used your workflow example and got same issue :(

Digitalroot commented 5 months ago

When this happens to me, Sometimes rerunning the "failed" jobs for a workflow will resolve it.

What I think is happening.

  1. File is broken up into chunks,
  2. Each chunk is uploaded,
  3. Nx reassembles the chunks.
  4. ModUploader waits for the reassemble to complete.
  5. Assembled file is attached to the mod page.

There are a few reasons this process can fail. What I have observed, is on a subsequent runs for the same file, nx will report that it already has the chunks of data. Rerunning only the failed steps of the workflow, will allow it to complete.

image

I have also used this when the session_id times out. I can update the session_id and rerun the failed steps.

Digitalroot commented 5 months ago

Maybe the result payload changed. Let me look at it.

Digitalroot commented 4 months ago

Still looking at this.

khanshoaib3 commented 4 months ago

I had the same issue (here), and the issue seems to be causing because I didn't specified the description of the file. After specifying the description, the workflow ran as expected (here).

Digitalroot commented 3 months ago

Thanks for the update