Solved Internal Server Error(500)

Discussion in '3CX Phone System - General' started by garyjduk, Nov 13, 2016.

Thread Status:
Not open for further replies.
  1. garyjduk

    Joined:
    Aug 11, 2009
    Messages:
    70
    Likes Received:
    0
    Hi,

    I'm getting an Internal Server Error(500) when trying to change settings. The error message is shown below. I've tried Internet Explorer and Chrome without any luck. I'm on V15.0.59950.0. Anyone got any suggestions?

    Thanks

    System.NullReferenceException: Object reference not set to an instance of an object.
    at TCX.Configuration.Templates.LocalPhoneDevice.SaveCodecs(XDocument doc)
    at TCX.Configuration.Templates.LocalPhoneDevice.ToXml()
    at TCX.Configuration.Templates.LocalPhoneDevice.Save(Extension ext, Int32 devIdx)
    at ConfigurationManagementModel.CfgTemplateInfo.SaveInfoToPhoneDevice(PhoneDeviceInfo info, PhoneDevice phoneDevice, Extension extension)
    at ConfigurationManagementModel.PhoneDeviceInfoExtension.SetPhoneDeviceInfos(Extension ex, PhoneDeviceInfo[] infos, ICfgTemplateInfoProvider templateInfoProvider)
    at ConfigurationManagementModel.CfgExtensionEditor.Serialize_AfterSerialize(Object sender, SerializeEventArgs e)
    at ConfigurationManagementModel.PropertySerializer.Serialize(ICfgItemInternal cfgItem, SerializeParameters serializeParameters)
    at ConfigurationManagementModel.CfgItemBase.Save()
    at ManagementConsoleJS.Services.Editor.Save()
    at ManagementConsoleJS.Services.EditorService.SaveActiveObject(Int32 id)
    at ManagementConsoleJS.Controllers.EditController.Save(Int32 id)
    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__28.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__18.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.AspNetCore.Builder.RouterMiddleware.d__4.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at ManagementConsoleJS.Middleware.ExceptionWrapperMiddleware.d__3.MoveNext()
     
  2. YiannisH_3CX

    YiannisH_3CX Support Team
    Staff Member 3CX Support

    Joined:
    May 10, 2016
    Messages:
    4,381
    Likes Received:
    278
    Hello there,

    what types of phones do you have?
    Also are you using custom templates?
    Check the codecs under the Extension settings / Phone provisioning and make sure all 4 of them are there.
    If not add them and try again
     
  3. TSDKen

    Joined:
    Sep 29, 2008
    Messages:
    33
    Likes Received:
    0
    I am also getting a similar error when I login to the web gui. I am running the latest v15 (15.0.60903.0)
    I have tried this on 2 different machines and get the same error (both rebuilt using the same back up files) Despite the error message, the PBX does seem to function fine. FWIW, I upgraded a second install to v15 but I am not getting the error on this

    Any help would be appreciated. Ken



    Internal Server Error(500)
    System.ArgumentNullException: Value cannot be null.
    Parameter name: value
    at System.String.StartsWith(String value)
    at ConfigurationManagementModel.CountryExitCodeConverter.<>c__DisplayClass7_0.b__0(String c)
    at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
    at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
    at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
    at ManagementConsoleJS.Controllers.InstallWizardController.GetInitialState()
    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__28.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__18.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.AspNetCore.Builder.RouterMiddleware.d__4.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at ManagementConsoleJS.Middleware.ExceptionWrapperMiddleware.d__3.MoveNext()
     
  4. YiannisH_3CX

    YiannisH_3CX Support Team
    Staff Member 3CX Support

    Joined:
    May 10, 2016
    Messages:
    4,381
    Likes Received:
    278
    Hello @TSDKen

    not sure if you are using windows or not but, make sure that the Windows Machine Is fully updated with none pending and restart the Server.( for e.g .net framework should be on 4.6.1 +)
    Also check the e164 is being configured correctly (has valid values).
     
  5. doddy

    Joined:
    Feb 1, 2009
    Messages:
    12
    Likes Received:
    0
    I have just updated from a fully functioning V14 to V15.0.60903.0 and I am getting exactly the same error as above. If I try to start the IVR service it starts and then immediately stops again. All the rest of the PBX seems to be function OK. I have spent a whole day so far pulling this thing apart and cannot find the problem. On the face of it the .net error suggests a variable is missing or bug in the software - perhaps in the restore from V14 there is a value that does not translate or is not updated in the restore to V15?? Did you find the answer to your problem? Thanks
     
  6. doddy

    Joined:
    Feb 1, 2009
    Messages:
    12
    Likes Received:
    0
    System.ArgumentNullException: Value cannot be null.

    Parameter name: value

    at System.String.StartsWith(String value)

    at ConfigurationManagementModel.CountryExitCodeConverter.<>c__DisplayClass7_0.b__0(String c)

    at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()

    at System.Linq.Buffer`1..ctor(IEnumerable`1 source)

    at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)

    at ManagementConsoleJS.Controllers.InstallWizardController.GetInitialState()

    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__28.MoveNext()

    --- End of stack trace from previous location where exception was thrown ---

    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__18.MoveNext()

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    at Microsoft.AspNetCore.Builder.RouterMiddleware.d__4.MoveNext()

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    at ManagementConsoleJS.Middleware.ExceptionWrapperMiddleware.d__3.MoveNext()
     
  7. TSDKen

    Joined:
    Sep 29, 2008
    Messages:
    33
    Likes Received:
    0
    In the end, I did a clean install and re configured my server. This solved the problem.
     
  8. doddy

    Joined:
    Feb 1, 2009
    Messages:
    12
    Likes Received:
    0
    Ken, thanks for the feedback.

    I have had to revert to V14 which is very disappointing because the amount of work to configure a new installation would be too much. What I can see from the settings is that when V15 imports a V14 backup, many of the url links are incorrect such as the management url for instance. This suggests perhaps there are other links that are not correct meaning things like IVR will not start or there are settings that require a value and which have not been correctly populated or formatted from the restore file, Martin
     
  9. YiannisH_3CX

    YiannisH_3CX Support Team
    Staff Member 3CX Support

    Joined:
    May 10, 2016
    Messages:
    4,381
    Likes Received:
    278
    Hello @doddy

    please navigate to settings/ E164 and check that it's correctly configured and you have valid entries
     
  10. doddy

    Joined:
    Feb 1, 2009
    Messages:
    12
    Likes Received:
    0
    Yanish, I tried that and it did make a difference. If I hit the security icon, I also got the above error dump but after I went into the E164 menu and unchecked the buttons, applied and then rechecked (making no changes to any values), I did not get that error again at login or the security icon. However, I was still not able to start the IVR and so whilst that may have been part of the problem, it certainly was not the answer for the IVR and without the IVR service, many other things do not work. Thanks Martin
     
  11. doddy

    Joined:
    Feb 1, 2009
    Messages:
    12
    Likes Received:
    0
    Problem is fixed;

    There were three problems;
    1. E164 does not upgrade properly on a V14 import and no changes to values required but if you uncheck E164 apply, recheck E164 and apply, that problem goes away - tested on two restores, both behaved identically.

    2. URL's in the system parameters still carry the \management on the management url's - is not correct but does not seem to have a bearing on operational ability but changed by hand to make correct.

    3. This was my biggest issue. IVR would not start having backed up V14, uninstalled 3CX, checked everything up to date, rebooted and installed V15 and restored V14 backup. I found the issue was that V14 was running on IIS and that uninstalling 3CX obviously left IIS intact and viable. I found that if I also uninstalled IIS before installing V15 and restoring the V14 backup, the IVR issue went away. I a now happily running on V15 with more servers to update! I have found this problem reproducible and so I would suggest anyone installing V15 after V14, ensure their old web server (in my case IIS) is uninstalled before you install V15. Thanks Martin
     
Thread Status:
Not open for further replies.