Solved Internal server error (500)

Discussion in '3CX Phone System - General' started by MikeyG.IT, Feb 12, 2018.

Thread Status:
Not open for further replies.
  1. MikeyG.IT

    Joined:
    Oct 2, 2017
    Messages:
    34
    Likes Received:
    2
    Upon trying to edit any settings within an extension, I get an internal server error(500). When in the settings of an extension, clicking the blue OK button results in a Internal Server error(500)

    Code:
    d__12.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__22.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__17.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__15.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       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.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at ManagementConsoleJS.Middleware.ExceptionWrapperMiddleware.d__3.MoveNext()" class="ng-scope" style="box-sizing: border-box; overflow: scroll; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px; padding: 9.5px; margin-top: 0px; margin-bottom: 10px; line-height: 1.42857; color: rgb(51, 51, 51); word-break: break-all; word-wrap: break-word; background-color: rgb(237, 241, 242); border: 1px solid rgb(222, 229, 231); border-radius: 4px; height: 400px;">System.NullReferenceException: Object reference not set to an instance of an object.
       at TCX.Configuration.Templates.LocalPhoneDevice.SetDynamicOptionValue(BaseOption option, Object value)
       at ConfigurationManagementModel.CfgTemplateInfo.SetPhoneVlanInfo(PhoneDeviceVlanType type, LocalPhoneDevice phoneDevice, PhoneDeviceVlanInfo info)
       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.FireAfterSerialize(ICfgItemInternal cfgItem, Boolean save)
       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__12.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__22.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__17.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__15.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       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.ExceptionServices.ExceptionDispatchInfo.Throw()
       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,357
    Likes Received:
    274
    Hello @MikeyG.IT

    From the provided error i believe that this has something to do with the templates of the device used.
    Are you using custom templates or have you modified the default templates of the phones you are using?
     
  3. MikeyG.IT

    Joined:
    Oct 2, 2017
    Messages:
    34
    Likes Received:
    2
    I am not using custom templates, but I did make a copy of one, provisioned the phone with the custom template and the error went away for the one extension i tested this on. I would like to keep them on the supported template
     
  4. YiannisH_3CX

    YiannisH_3CX Support Team
    Staff Member 3CX Support

    Joined:
    May 10, 2016
    Messages:
    4,357
    Likes Received:
    274
    What phones are you using and what PBX version are you on?
     
  5. MikeyG.IT

    Joined:
    Oct 2, 2017
    Messages:
    34
    Likes Received:
    2
    I am using snom 320s and am on the newest release of 3cx
     
  6. YiannisH_3CX

    YiannisH_3CX Support Team
    Staff Member 3CX Support

    Joined:
    May 10, 2016
    Messages:
    4,357
    Likes Received:
    274
    Please check your inbox as i have sent you a p.m. with what is needed to further troubleshoot the issue
     
  7. UncleArt

    Joined:
    Nov 20, 2017
    Messages:
    3
    Likes Received:
    0
    We have the same here:
    Code:
    d__12.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__22.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__17.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__15.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       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.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at ManagementConsoleJS.Middleware.ExceptionWrapperMiddleware.d__3.MoveNext()" class="ng-scope" style="box-sizing: border-box; overflow: scroll; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px; padding: 9.5px; margin-top: 0px; margin-bottom: 10px; line-height: 1.42857; color: rgb(51, 51, 51); word-break: break-all; word-wrap: break-word; background-color: rgb(237, 241, 242); border: 1px solid rgb(222, 229, 231); border-radius: 4px; height: 400px;">System.NullReferenceException: Object reference not set to an instance of an object.
       at TCX.Configuration.Templates.LocalPhoneDevice.SetDynamicOptionValue(BaseOption option, Object value)
       at ConfigurationManagementModel.CfgTemplateInfo.SetPhoneVlanInfo(PhoneDeviceVlanType type, LocalPhoneDevice phoneDevice, PhoneDeviceVlanInfo info)
       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.FireAfterSerialize(ICfgItemInternal cfgItem, Boolean save)
       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__12.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__22.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__17.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__15.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       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.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at ManagementConsoleJS.Middleware.ExceptionWrapperMiddleware.d__3.MoveNext()
    Could you please advise


    Thank you
     
  8. YiannisH_3CX

    YiannisH_3CX Support Team
    Staff Member 3CX Support

    Joined:
    May 10, 2016
    Messages:
    4,357
    Likes Received:
    274
    @UncleArt

    Are you experiencing the issue when trying to edit a specific extension or all extensions?
    What phones are you using?
    Make sure that you are using the default templates for the phones
     
  9. YiannisH_3CX

    YiannisH_3CX Support Team
    Staff Member 3CX Support

    Joined:
    May 10, 2016
    Messages:
    4,357
    Likes Received:
    274
    Also to update the thread as the OP was able to resolve the issue by replacing the templates with the default ones.
     
  10. UncleArt

    Joined:
    Nov 20, 2017
    Messages:
    3
    Likes Received:
    0
    Hi YiannishH,

    Thanks for your reply
    We're using default templates as advised. Issue is related to specific extensions. Some would still work fine with no errors.
    Phones in use are Yealink t22,23,41
    Can't 'catch' what might be in common between affected extensions...


    Thanks
     
  11. YiannisH_3CX

    YiannisH_3CX Support Team
    Staff Member 3CX Support

    Joined:
    May 10, 2016
    Messages:
    4,357
    Likes Received:
    274
    Please check your inbox as i have sent you instruction with what is needed to further troubleshoot your issue.
     
  12. YiannisH_3CX

    YiannisH_3CX Support Team
    Staff Member 3CX Support

    Joined:
    May 10, 2016
    Messages:
    4,357
    Likes Received:
    274
    The issue with @UncleArt was that custom template existed with the same name as the default and this was causing conflict in the management console. Once we renamed the custom template the issue disappeared. Marking as resolved
     
    UncleArt likes this.
Thread Status:
Not open for further replies.