#Cloud Code Unprocessable Entity
1 messages ยท Page 1 of 1 (latest)
Have you verified the module in question is uploaded to the service by checking the dashboard?
yes
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.
I think yes, I can, I'll simplify it now
If you're using the deployment window I'd be surprised if you were getting a mismatch on the deployment environment/runtime environment
I deploy via UGS CLI, but it says:
Successfully deployed the following files:
PathToFile.ccm
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>
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 ๐
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
I sent it in DM, thanks a lot for the help!
it's definitely some kind of problem with DI, after I cut out all the DI related stuff, it works again.
And seems like not on my side, as even empty Setup() method in ICloudCodeSetup produces the error.
Thanks for the extra info, we'll start poking around and I'll get back to you
Hi, could you try downgrading your Microsoft.Extensions.Logging package version from 8.0 to 7.0?
Hi! Yes, give me a sec, will try
wow!!! it helped!!!
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
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