Umbraco 8: Empty exception throw when creating Use...
# help-with-umbraco
p
When I'm creating a new user, I'm getting an exception throw but it doesn't get's logged in the Settings/Log viewer section or in any log file that I've managed to find. The error "looks" like this (see attached) I've no idea what's going on, it doesn't matter what group im assigning the user to. The user actually get's created after this error window is closed. But i cannot set the user password or really change anything. Have anyone encountered this? How would I go about catching this exception? https://cdn.discordapp.com/attachments/1230085273249906740/1230085273971462174/image.png?ex=6632092f&is=661f942f&hm=e1703ae2d5bb6d87087c8e65dacda65adfaa6155f6d4ae3987c5ffa74e5aee72&
I've made a post about this on the our umbraco forums but was asked to post here instead
w
Are you able to get the response from the "create user" API request being made from the browser in dev tools - does that have any info about the issue?
w
That's extremely annoying - if you're unable to find anything from the Umbraco trace log files (which might be what log viewer) is showing you then I'm unsure what it could be, sorry. The only other place I can think of to check would be the Umbraco log table in the db but that might just mirror what's in the log files, not 100% sure
p
tell me about it beratna
very very annoying
this site is far from new, since it's chugging along with umbraco 8 it's been running for a few years
u
do you have RDP access to the host machine? If so, Windows Event Viewer might help
p
locally i can check the windows event viewer, the production site is in azure
u
There might be a log in Azure, but the portal is so complex I don't think I could describe where to look, unless you AppInsights configured in which case youcould look there.
r
@Pekdon i presume locally its working?? can you see what information is created in the Umbraco Users table to see if there any artifacts of a failed or complete process
p
no it's not working anywerhere @Ravi
the user actually get's created, even though it throws an exception
hwoever
i cannot set a single property it on, like password or anything else
i can remove it however
im checking windows event log, no posts there either
h
Might be worth clearing out temporary files etc in case something is corrup there
j
Here's a few things to check that may help get further info for debugging 🙂 1. What exact Umbraco version is this? 2. When you try to create a user, check the network log and see which specific API call it fails on, and also what info is passed along, and what error the api returns 3. Check if any frontend errors are logged in your browser console 4. Check what user groups you belong to, and potentially ensure you are a member of the admin and sensitive data usergroups
p
I've already provided all the information you are requesting
1. Umbraco 8 2. I've posted the network log and response im getting 3. I'm getting no console errors, part from the 400 Bad Request one wic I posted a picture for 4. I am an admin, i've tried multiple admin acccounts. I doesn't matter what group im trying to assign the user to, it always 100% of the time fails
my main issue is the lack of logging, the log viewer in umbraco tells me nothing, nothing gets logged
i've attemped in visual studio to have the debugger break for all exceptions, it doesn't break though
i've checked the windows event logger, nothing gets posted there either
this fails locally, in my test environment (azure) and in my production environment (azure)
we've tested locally on multiple machines, nothing gets logged
s
Related: https://our.umbraco.com/forum/umbraco-7/using-umbraco-7/65217-Save-and-Publish-returns-a-blank-error Links to a site that doesn't exist any more but it's archived: https://web.archive.org/web/20180819053916/http://issues.umbraco.org/issue/U4-7476 Might help. It notes the lack of logging and potential fixes.
j
1. That is not an exact version, miles difference between 8.0.0 and 8.18.4.. 2. You posted a screenshot of a json response, but not the actual endpoint it requests 4. Have you tried also adding the sensitive data group?
s
> 2. I've posted the network log and response im getting As @Jemayn say, have a look at the network tab of your browser's dev tools and see what is going on with failed requests. Also: > Umbraco 8 Which version 8? 🙂
w
Out of curiosity, what's the Request content in this API call?
p
@Jemayn 3. I've tried all groups, tried setting each group individually. tried setting a combination of groups, only admin, admin + something else. every possible permuation you might think of. I've tried. To no avail, it fails 100% of the time 🙂
@weedroid
j
Best guess is it fails here: https://github.com/umbraco/Umbraco-CMS/blob/release-8.13.0/src/Umbraco.Web/Editors/UsersController.cs#L291 You could try to attach the source and set a breakpoint in that file and see what happens
w
Is this "status reason" response header relevant? It mentions a validation error
p
i don't think i can since it's installed from nuget
but maybe i am wrong
w
What happens if you try a more basic email, like "test@example.com"?
p
same, it crashes
believe me when i tell you i've tried all possible emails aswell 🙂
w
I just searched for that "status reason" header, there's a single unanswered Umbraco forum thread querying almost the same thing
p
I'd like to say sorry if I come across as angry or anything
w
Except saving doctype instead of user. I've never seen that before
p
im actually sitting ove here smiling
it just might not come across in text
w
If it's any consolation I think everybody in here has felt the same way about Umbraco, a brilliant CMS we all love to use every day
p
tbh i don't really like it 🙂
s
I have an old blog post, which is still relevant here, if you have problems that nobody else is having then I will always suspect 1. Custom code 2. additions to web.config that should not be there https://cultiv.nl/blog/how-to-diagnose-umbraco-upgrade-problems/ My guess will be that your web.config contains something that is causing this, do a line by line compare of a clean 8.13.0 (download the zip here: https://our.umbraco.com/download/releases/8130 to find a clean web.config). For each line, make sure you understand why it's different from a clean one.
p
it's nothing agasint umbraoc
i just don't enjoy CMS work
thanks Sebastiaan
s
Other than that, I've seen a lot of strange problems when people replace the Newtonsoft JSON behavior, which takes effect globally, check if you have any custom code that affects the Newtonsoft config globally.
Also, consider upgrading to the latest v8, this version is 3 years behind.. might just be that it's a bug that has been fixed since that release.
w
May also be worth checking the request going from the frontend against what the API is expecting to be populated in the model, although I'm not sure how those would end up being different
s
👆 json deserializer, or stuff in web.config can definitely cause that problem 😉
p
im upgrading evertyhing now
blasting the new album from pearl jam as i mdoing it
s
Good luck! Make backups! 😅
p
You work at Umbraco do you Sebbe?
2 Views