# Tus Error: Value cannot be null. ↵Parameter name: encodedValue;

**URL:** <https://community.transloadit.com/t/tus-error-value-cannot-be-null-parameter-name-encodedvalue/15126>\
**Category:** Tus\
**Created:** [November 15, 2019, 5:23pm UTC](https://community.transloadit.com/t/tus-error-value-cannot-be-null-parameter-name-encodedvalue/15126 "2019-11-15T17:23:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MikeMaister](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@MikeMaister](https://community.transloadit.com/u/MikeMaister)\
**Post date:** [November 15, 2019, 5:23pm UTC](https://community.transloadit.com/t/tus-error-value-cannot-be-null-parameter-name-encodedvalue/15126/1 "2019-11-15T17:23:12Z")

</div>

Hi All,

I’m trying to use for the first time uppy with tus in backend.  
I developed a custom uppy UI that call the upload method and i’m getting the error message in the topic in response to my call.  
I’ve checked for that parameter on the POST action and i got it in the Upload-Metadata filled with the file name that i’m trying to upload.  
So even if the parameter is filled i got that error in response.  
What’s the next step to fix it?  
Thanks to all.

---

<div class="post-metadata">

**Author:** ![marius](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/marius/32/572_2.png) [@marius](https://community.transloadit.com/u/marius)\
**Post date:** [November 15, 2019, 7:18pm UTC](https://community.transloadit.com/t/tus-error-value-cannot-be-null-parameter-name-encodedvalue/15126/2 "2019-11-15T19:18:17Z")

</div>

Hi there,

can you provide more details, in particular following points:

- Where does that error occur? Can we have a stack trace?
- What tus server are you using? What’s its configuration?
- What is the code you are using on the client for uploading?

I still don’t understand what you are trying to do, so I am having a hard time understanding your question.

---

<div class="post-metadata">

**Author:** ![MikeMaister](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@MikeMaister](https://community.transloadit.com/u/MikeMaister)\
**Post date:** [November 18, 2019, 8:16am UTC](https://community.transloadit.com/t/tus-error-value-cannot-be-null-parameter-name-encodedvalue/15126/3 "2019-11-18T08:16:34Z")

</div>

Hi @marius here below my replies:

> [@marius](#):
>
> Where does that error occur? Can we have a stack trace?

The error occurs when i click the upload button in order to upload for example a simple image file.  
The code for the upload on the client side is the simple code snippet showed from uppy doc examples.  
With the upload function i’m producing a POST call with all the file data set, with the error code in reply:

_Message: "Value cannot be null._  
_↵Parameter name: encodedValue; at tusdotnet.Models.Metadata…ctor(String encodedValue)_  
_↵ at tusdotnet.Models.Metadata.Parse(String uploadMetadata)_  
_↵ at tusdotnet.IntentHandlers.CreateFileHandler.Invoke()_  
_↵ at tusdotnet.TusProtocolHandlerIntentBased.Invoke(ContextAdapter context)_  
_↵ at tusdotnet.TusCoreMiddleware.Invoke(HttpContext context)_  
_↵ at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)_  
_↵ at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.InvokeCore(HttpContext context)_  
_↵ at Ts.Selene.ApiServer.Errors.ExceptionMiddleware.InvokeAsync(HttpContext httpContext) in D:\Main Repo\Adam\src\App\Selene\Ts.Selene.ApiServer\Errors\ExceptionMiddleware.cs:line 31"_  
_Severity: “Error”_  
_StatusCode: 500_

> [@marius](#):
>
> What tus server are you using? What’s its configuration?

I’m using tusdotnet server:

> **[GitHub - tusdotnet/tusdotnet: .NET server implementation of the Tus protocol...](https://github.com/tusdotnet/tusdotnet)**
>
> .NET server implementation of the Tus protocol for resumable file uploads. Read more at https://tus.io - GitHub - tusdotnet/tusdotnet: .NET server implementation of the Tus protocol for resumable f...

Here you can see my config:

“TusConfiguration”: {  
“AccessPointType”: “myaccesspointconfig”,  
“PathRequest”: “/files”,  
“PathStore”: “C:\myapp\tusfiles\”  
}  
}

> [@marius](#):
>
> What is the code you are using on the client for uploading?

This is the code i’m using for the upload:

this.uppy.use(Tus, {  
endpoint: “myendopointpath”,  
headers: {  
authorization: “mytokenforauth”,  
},  
metaFields:null  
})

Please let me know if i missunderstood somethings.  
Waiting for you reply.  
Thanks 😉

---

<div class="post-metadata">

**Author:** ![MikeMaister](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@MikeMaister](https://community.transloadit.com/u/MikeMaister)\
**Post date:** [November 18, 2019, 1:17pm UTC](https://community.transloadit.com/t/tus-error-value-cannot-be-null-parameter-name-encodedvalue/15126/5 "2019-11-18T13:17:52Z")

</div>

I’ve fixed the issue.  
The problem was a metadata passed with a null value in my Upload-Metadata list in the Header.

Thanks

---

<div class="post-metadata">

**Author:** ![marius](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/marius/32/572_2.png) [@marius](https://community.transloadit.com/u/marius)\
**Post date:** [November 18, 2019, 3:49pm UTC](https://community.transloadit.com/t/tus-error-value-cannot-be-null-parameter-name-encodedvalue/15126/6 "2019-11-18T15:49:03Z")

</div>

I am glad to read that you found a solution and I was just about to say that this line looked a bit suspicious:

> [@MikeMaister](#):
>
> metaFields:null

---

<div class="post-metadata">

**Author:** ![MikeMaister](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@MikeMaister](https://community.transloadit.com/u/MikeMaister)\
**Post date:** [November 19, 2019, 8:12am UTC](https://community.transloadit.com/t/tus-error-value-cannot-be-null-parameter-name-encodedvalue/15126/7 "2019-11-19T08:12:27Z")

</div>

@marius no, that line was not the problem.  
That code line means that uppy will send all the metadata available to the backend.

The problem was a single metadata key with a null value.  
But the error don’t specify the metadata key name, so the troubleshoot was a little bit messy.
