#Cloud Code Unprocessable Entity

1 messages ยท Page 1 of 1 (latest)

formal cloak
#

Have you verified the module in question is uploaded to the service by checking the dashboard?

formal cloak
#

Alright, I'd check to make sure the environments match as well (ie it was uploaded to the same environment the editor is using)

Beyond that, I think I'd need to look at code to help out, do you have a simplified version of it you could share? Sounds like we definitely need better error reporting here.

lavish escarp
#

I think yes, I can, I'll simplify it now

formal cloak
#

If you're using the deployment window I'd be surprised if you were getting a mismatch on the deployment environment/runtime environment

lavish escarp
#

I deploy via UGS CLI, but it says:
Successfully deployed the following files:
PathToFile.ccm

formal cloak
#

Ah ok, then it's worth checking to make sure the CLI is configured to upload to the same environment you've got the editor pointed at

#

You can run this: ugs config set environment-name <your-environment-name>

lavish escarp
#

yes, just checked it.
I actually had it working, when I just returned "Hello" string from the module.

And then I did a bunch of stuff like dependency injection, writing unit tests, logic and then it started to fail ๐Ÿ˜„

Tests run successfully though, so it's definitely not the logic that's throwing.

#

I mean not the logic inside the module*
Maybe I f'ed up somewhere else ๐Ÿ˜„

formal cloak
#

It's possible it's choking on the DI side of things as it tries to load the module, I think our best bet is to try and get the simplest version of it that breaks and I can either take a look or ping someone on the team to take a look

lavish escarp
lavish escarp
formal cloak
#

Thanks for the extra info, we'll start poking around and I'll get back to you

full mantle
#

Hi, could you try downgrading your Microsoft.Extensions.Logging package version from 8.0 to 7.0?

lavish escarp
lavish escarp
#

thanks so much!

#

oh my god, I wasted so much time and couldn't figure it out, kinda crazy, as I didn't use logger in ICloudCodeSetup specifically, so I didn't even consider that it could cause this problem

full mantle
#

No probs. Yeah it's a bit of an odd one, not the first thing I thought of either. I assume it fails in CloudCodeSetup simply because that's the first code we run from your assembly, and due to JIT the runtime won't notice until that point.

I'll make a note to add a more specific error message for package conflicts. Also, once we update Cloud Code to .NET 8 we'll support version 8.0 for this package