New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object reference not set #59

Closed
SamKr opened this Issue Mar 14, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@SamKr
Copy link

SamKr commented Mar 14, 2018

Also posted on the discussion board but perhaps better suited here:

During installation of the server, I get an ‘Object reference not set to an instance of an object.’ error in the following URL (right after table creation): coderr/installation/setup/basics/

It appears to be caused in SetupController.cs when loading the config:

public ActionResult Basics()
{
	var model = new BasicsViewModel();
	var config = _configStore.Load<BaseConfiguration>();
	if (config != null)
	{
		model.BaseUrl = config.BaseUrl.ToString();
		model.SupportEmail = config.SupportEmail;
	}
	else
	{
		model.BaseUrl = Request.Url.ToString().Replace("installation/setup/basics/", "")
			.Replace("localhost", "yourServerName");
		ViewBag.NextLink = "";
	}


	return View(model);
}

Any idea how to fix this? I’ve tried running it on several Windows Server boxes (from 2012R2 to 2016) with the latest SQL Server (2017 express).

This is the full error page:

Server Error in ‘/coderr’ Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
codeRR.Server.Web.Areas.Installation.Controllers.SetupController.Basics() in C:\src\1tcompany\codeRR.oss\codeRR.Server\src\Server\Coderr.Server.Web\Areas\Installation\Controllers\SetupController.cs:42
lambda_method(Closure , ControllerBase , Object[] ) +86
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) +228 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) +34
System.Web.Mvc.Async.AsyncControllerActionInvoker.b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +38
System.Web.Mvc.Async.WrappedAsyncResult2.CallEndDelegate(IAsyncResult asyncResult) +66 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +41 System.Web.Mvc.Async.AsyncInvocationWithFilters.b__3d() +71 System.Web.Mvc.Async.<>c__DisplayClass46.b__3f() +385 System.Web.Mvc.Async.<>c__DisplayClass46.b__3f() +385 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +42 System.Web.Mvc.Async.<>c__DisplayClass2b.b__1c() +38 System.Web.Mvc.Async.<>c__DisplayClass21.b__1e(IAsyncResult asyncResult) +185 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38 System.Web.Mvc.Controller.b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +65
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +52
System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +36 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38 System.Web.Mvc.MvcHandler.b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +43 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +65
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +607
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +134

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2106.0

@jgauffin

This comment has been minimized.

Copy link
Contributor

jgauffin commented Mar 14, 2018

yes, I saw it and am currently looking into the issue

@SamKr

This comment has been minimized.

Copy link

SamKr commented Mar 14, 2018

Great :) If you want I could send you a TeamViewer session.

@jgauffin

This comment has been minimized.

Copy link
Contributor

jgauffin commented Mar 14, 2018

Can you try with the following release: https://github.com/coderrapp/codeRR.Server/releases/tag/v1.1.3

If it doesn't work, can you take a screenshot of the contents in the "Settings" table?

@SamKr

This comment has been minimized.

Copy link

SamKr commented Mar 15, 2018

Jep that fixed it, you're a rockstar! Thanks for the insanely fast help.

@SamKr SamKr closed this Mar 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment