Internal error

I am using the server version of Manager. I was busy on a business when it just run into the error below.

Internal Error

Manager 21.3.97

System.NullReferenceException: Object reference not set to an instance of an object. at Manager.Database.OfTypeT in C:\projects\manager\Manager\Database.cs:line 110 at ManagerServer.HttpHandlers.HttpHandler.GetCurrentUser() in C:\projects\manager\ManagerServer\HttpHandlers\HttpHandler.cs:line 210 at ManagerServer.HttpHandlers.HttpHandler.ProcessRequest() in C:\projects\manager\ManagerServer\HttpHandlers\HttpHandler.cs:line 73 at ManagerServer.Startup.<>c.<b__1_1>d.MoveNext() in C:\projects\manager\ManagerServer\Startup.cs:line 89 — End of stack trace from previous location — at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)

[Go back](javascript:window.history.back():wink:

You refer you were working on a business when this error appeared. It would help with highlighting what you were actually doing. The NullReferenceException is due to a null reference in the code which is a reference that doesn’t point to any object. The programmer, in this case @lubos will obviously try to include additional logic to ensure that objects have valid values before using them, but with so many lines of code to struggle with may here and there cause such exceptions. I recently was working on code in email themes for sales invoices and when trying to create a sales invoice also had an error screen. If one of your actions dealt with adding some code be it liquid in themes or in custom templates, etc, you may have cause the null reference and related error to occur. So if you share what you did before this error occurs and when it occurs this would help to root what in itself may be a very simple problem.

After logging in to manager I then wanted to do a quotation for a client. While I was navigation to the sales quote tab, this error happened.

Now if I type the URL it goes straight to the error. I cannot do anything at all.

Can you check in your SETTINGS the following:

  1. If there is any code entered into EMAIL TEMPLATES → Sales Quote
  2. if there are any CUSTOM FIELDS under Sales Quote

@Panashe_Mlambo, your answer was not clear.

What exactly do you mean? Do you mean the error occurred when you first clicked on the Sales Quote tab in the left navigation pane? Is the problem repeatable? Does it depend on what else you were doing first?

What does this mean? What URL are you typing? You do not need to type a URL to navigate to the Sales Quote tab. Are you saying you cannot log into your server installation of Manager?

I cannot not get into manager now. It shows the above error. Yes that is correct I cannot log in to the server.

There error occurred when I first clicked the Sales quote tab on the left. The problem is not repeatable. This is the first time it occurred.

I cannot log in so I cannot even go to settings.

I suspect that this file maybe have been corrupted

00000000000000000000000000000000.manager

It is unsually large. It is about 140MB.

I have made a backup of my current businesses and restored yesterday’s backup. I replaced the file below

00000000000000000000000000000000.manager

with yesterday’s backup. I am now able to log in. I was able to do my quotes without any problem.

From the Guide, https://www.manager.io/guides/8394:

00000000000000000000000000000000.manager (for server installations) is an SQLite database holding a list of users for the server edition. It contains no accounting data.

While I was typing this response, you posted your message saying you could now log in. I was going to suggest that you temporarily move that file out of your application data folder to see if that resolves the problem. (Manager will recreate the file if it needs it, although without all the user information.)

You can look at that file with a text editor to see if there is something unusual about it. Compare the one you replaced it with to the one you moved out.

I am not exactly sure how the server edition handles this user index file now. (Use of that file changed a few months ago.) The important thing is that no accounting data for any business is affected by the contents of that file, only user identities and permissions. But you are correct; 140MB is very large for that particular file. Something in the tens of KB range would be more usual.

Yeah, the error is related to something going on with 00000000000000000000000000000000.manager

This file stores list of users so it’s not even being used on desktop edition anymore and I’m planning to eliminate need for this file altogether and store list of users elsewhere.

So no plans to debug this issue as this is occuring in part of the code which is going to be removed anyway.

I reproduced this error before"internal error" and what i discovered was that once you update to the newer version of manager, opening the last version would always give rhis error. Try to observe the icon you are opening with if it bares the old version otherwise change the icon to bare the new version.