abpframework / abp

Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
https://abp.io
GNU Lesser General Public License v3.0
12.78k stars 3.41k forks source link

Deploy Error With Log #3632

Closed atak946 closed 4 years ago

atak946 commented 4 years ago

Hi,

i'm deployed project on my server but doesn't work.

i see this log on https://finans.terakod.com

An unhandled exception occurred while processing the request.
NullReferenceException: Object reference not set to an instance of an object.
NUglify.JavaScript.Syntax.MemberExpression.GetFunctionGuess(AstNode target)

Stack Query Cookies Headers Routing
NullReferenceException: Object reference not set to an instance of an object.
NUglify.JavaScript.Syntax.MemberExpression.GetFunctionGuess(AstNode target)
NUglify.JavaScript.Syntax.BinaryExpression.GetFunctionGuess(AstNode target)
NUglify.JavaScript.Visitors.AnalyzeNodeVisitor.GuessAtName(AstNode node)
NUglify.JavaScript.Visitors.AnalyzeNodeVisitor.Visit(FunctionObject node)
NUglify.JavaScript.Syntax.FunctionObject.Accept(IVisitor visitor)
NUglify.JavaScript.Visitors.AnalyzeNodeVisitor.Visit(BinaryExpression node)
NUglify.JavaScript.Syntax.BinaryExpression.Accept(IVisitor visitor)
NUglify.JavaScript.Visitors.AnalyzeNodeVisitor.Visit(BlockStatement node)
NUglify.JavaScript.Visitors.AnalyzeNodeVisitor.Visit(FunctionObject node)
NUglify.JavaScript.Syntax.FunctionObject.Accept(IVisitor visitor)
NUglify.JavaScript.Visitors.TreeVisitor.Visit(AstNodeList node)
NUglify.JavaScript.Syntax.AstNodeList.Accept(IVisitor visitor)
NUglify.JavaScript.Visitors.TreeVisitor.Visit(ArrayLiteral node)
NUglify.JavaScript.Syntax.ArrayLiteral.Accept(IVisitor visitor)
NUglify.JavaScript.Visitors.TreeVisitor.Visit(AstNodeList node)
NUglify.JavaScript.Syntax.AstNodeList.Accept(IVisitor visitor)
NUglify.JavaScript.Visitors.TreeVisitor.Visit(CallExpression node)
NUglify.JavaScript.Visitors.AnalyzeNodeVisitor.Visit(CallExpression node)
NUglify.JavaScript.Syntax.CallExpression.Accept(IVisitor visitor)
NUglify.JavaScript.Visitors.AnalyzeNodeVisitor.Visit(ReturnStatement node)
NUglify.JavaScript.Syntax.ReturnStatement.Accept(IVisitor visitor)
NUglify.JavaScript.Visitors.AnalyzeNodeVisitor.Visit(BlockStatement node)
NUglify.JavaScript.Visitors.AnalyzeNodeVisitor.Visit(FunctionObject node)
NUglify.JavaScript.Syntax.FunctionObject.Accept(IVisitor visitor)
NUglify.JavaScript.Visitors.TreeVisitor.Visit(AstNodeList node)
NUglify.JavaScript.Syntax.AstNodeList.Accept(IVisitor visitor)
NUglify.JavaScript.Visitors.TreeVisitor.Visit(CallExpression node)
NUglify.JavaScript.Visitors.AnalyzeNodeVisitor.Visit(CallExpression node)
NUglify.JavaScript.Syntax.CallExpression.Accept(IVisitor visitor)
NUglify.JavaScript.Visitors.AnalyzeNodeVisitor.Visit(BlockStatement node)
NUglify.JavaScript.JSParser.InternalParse()
NUglify.JavaScript.JSParser.Parse(DocumentContext sourceContext)
NUglify.JavaScript.JSParser.Parse(DocumentContext sourceContext, CodeSettings settings)
NUglify.Uglify.Js(string source, string fileName, CodeSettings codeSettings)
Volo.Abp.Minify.NUglify.NUglifyJavascriptMinifier.UglifySource(string source, string fileName)
Volo.Abp.Minify.NUglify.NUglifyMinifierBase.Minify(string source, string fileName)
Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundlerBase.AddFileToBundle(IBundlerContext context, StringBuilder bundleContentBuilder, string fileName)
Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundlerBase.Bundle(IBundlerContext context)
Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundleManager+<>c__DisplayClass17_0.<GetBundleFilesAsync>b__0()
System.Collections.Generic.AbpDictionaryExtensions+<>c__DisplayClass6_0<TKey, TValue>.<GetOrAdd>b__0(TKey k)
System.Collections.Generic.AbpDictionaryExtensions.GetOrAdd<TKey, TValue>(IDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TValue> factory)
System.Collections.Generic.AbpDictionaryExtensions.GetOrAdd<TKey, TValue>(IDictionary<TKey, TValue> dictionary, TKey key, Func<TValue> factory)
Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundleCache.GetOrAdd(string bundleName, Func<BundleCacheItem> factory)
Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundleManager.GetBundleFilesAsync(BundleConfigurationCollection bundles, string bundleName, IBundler bundler)
Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundleManager.GetScriptBundleFilesAsync(string bundleName)
Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers.AbpTagHelperScriptService.GetBundleFilesAsync(string bundleName)
Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers.AbpTagHelperResourceService.ProcessAsync(TagHelperContext context, TagHelperOutput output, List<BundleTagHelperItem> bundleItems, string bundleName)
Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers.AbpBundleTagHelperService<TTagHelper>.ProcessAsync(TagHelperContext context, TagHelperOutput output)
Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, int i, int count)
AspNetCore.Pages__Layout.<ExecuteAsync>b__44_1() in _Layout.cshtml
+
                        @RenderBody()
Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync()
AspNetCore.Pages__Layout.ExecuteAsync()
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, bool invokeViewStarts)
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderLayoutAsync(ViewContext context, ViewBufferTextWriter bodyWriter)
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, string contentType, Nullable<int> statusCode)
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, string contentType, Nullable<int> statusCode)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|29_0<TFilter, TFilterAsync>(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext<TFilter, TFilterAsync>(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass5_1+<<UseMiddlewareInterface>b__1>d.MoveNext()
Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass5_1+<<UseMiddlewareInterface>b__1>d.MoveNext()
Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass5_1+<<UseMiddlewareInterface>b__1>d.MoveNext()
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events)
IdentityServer4.Hosting.MutualTlsTokenEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes)
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context)
Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass5_1+<<UseMiddlewareInterface>b__1>d.MoveNext()
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

how i resolve this problem ?

this project running on localhost.

realLiangshiwei commented 4 years ago

I can't reproduce your problem. Can you use the CLI to create a simple project to reproduce this problem?

atak946 commented 4 years ago

I can't reproduce your problem. Can you use the CLI to create a simple project to reproduce this problem? @liangshiw

im aldready created sample project with cli for this issue.

i have one difference in sample code.

i created _Layout.cshtml in Pages folder and changed İndex.cshtml => Layout = "_Layout.cshtml";

if i delete Layout.cshtml in project deploy is not have Any error, but i need change basic layout for one page.

realLiangshiwei commented 4 years ago

Please show your _Layout.cshtml

atak946 commented 4 years ago

@liangshiw im copied in basic theme layout and changed html.

@using Volo.Abp.AspNetCore.Mvc.AntiForgery
@using Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.MainNavbar
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.PageAlerts
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Components
@using Volo.Abp.AspNetCore.Mvc.UI.Theming
@using Volo.Abp.AspNetCore.Mvc.UI.Widgets.Components.WidgetScripts
@using Volo.Abp.AspNetCore.Mvc.UI.Widgets.Components.WidgetStyles
@using FinansPanel.Web.Pages.Components.Layout.Menu;
@using FinansPanel.Web.Pages.Components.Layout.TopNav;
@inject IAbpAntiForgeryManager AbpAntiForgeryManager
@inject IBrandingProvider BrandingProvider
@inject IPageLayout PageLayout
<!DOCTYPE html>

<html lang="en">

<!-- begin::Head -->

<head>
    <base href="">
    <meta charset="utf-8" />
    <title>@ViewBag.Title</title>
    <meta name="description" content="Updates and statistics">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!--begin::Fonts -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700|Roboto:300,400,500,600,700">

    <!--end::Fonts -->
    <!--begin::Page Vendors Styles(used by this page) -->
    @await RenderSectionAsync("styles", false)
    <!--end::Page Vendors Styles -->
    <!--begin::Global Theme Styles(used by all pages) -->
    <abp-style-bundle>
        <abp-style src="/assets/plugins/global/plugins.bundle.css" />
        <abp-style src="/assets/css/style.bundle.css" />
        <abp-style src="/libs/toastr/toastr.css" />
    </abp-style-bundle>

    <!--end::Global Theme Styles -->
    <!--begin::Layout Skins(used by all pages) -->
    <abp-style-bundle>
        <abp-style src="/assets/css/skins/header/base/light.css" />
        <abp-style src="/assets/css/skins/header/menu/light.css" />
        <abp-style src="/assets/css/skins/brand/dark.css" />
        <abp-style src="/assets/css/skins/aside/dark.css" />
        <abp-style src="/Pages/Layout.css" />
    </abp-style-bundle>

    @await Component.InvokeAsync(typeof(WidgetStylesViewComponent))

    @await Component.InvokeLayoutHookAsync(LayoutHooks.Head.Last, StandardLayouts.Application)

    <!--end::Layout Skins -->
    <link rel="shortcut icon" href="~/assets/media/logos/favicon.ico" />
</head>
<body class="kt-quick-panel--right kt-demo-panel--right kt-offcanvas-panel--right kt-header--fixed kt-header-mobile--fixed kt-subheader--enabled kt-subheader--fixed kt-subheader--solid kt-aside--enabled kt-aside--fixed kt-page--loading">

    <!-- begin:: Header Mobile -->
    @(await Component.InvokeAsync<TopNavComponent>("MobileHeader"))
    <!-- end:: Header Mobile -->

    <div class="kt-grid kt-grid--hor kt-grid--root">
        <div class="kt-grid__item kt-grid__item--fluid kt-grid kt-grid--ver kt-page">

            <!-- begin:: Navigation -->
            @(await Component.InvokeAsync<MenuComponent>())
            <!-- end:: Navigation -->

            <div class="kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor kt-wrapper" id="kt_wrapper">
                @(await Component.InvokeAsync<TopNavComponent>("MasterHeader"))

                <div class="kt-content  kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor" id="kt_content">
                    @(await Component.InvokeAsync<TopNavComponent>("ContentHeader"))
                    <!-- begin:: Content -->
                    <div class="kt-container  kt-container--fluid  kt-grid__item kt-grid__item--fluid">
                        @RenderBody()
                    </div>

                    <!-- end:: Content -->
                </div>

                <!-- begin:: Footer -->
                <div class="kt-footer  kt-grid__item kt-grid kt-grid--desktop kt-grid--ver-desktop" id="kt_footer">
                    <div class="kt-container  kt-container--fluid ">
                        <div class="kt-footer__copyright">
                            2020&nbsp;&copy;&nbsp;<a href="https://www.terakod.com" target="_blank" class="kt-link">Finans Paneli v1.0</a>
                        </div>
                    </div>
                </div>
                <!-- end:: Footer -->
            </div>
        </div>
    </div>

    <!--begin::Global Theme Bundle(used by all pages) -->
    <abp-script-bundle>
        <abp-script src="/assets/plugins/global/plugins.bundle.js" />
        <abp-script src="/assets/js/scripts.bundle.js" />
        <abp-script src="/libs/abp/core/abp.js" />
        <abp-script src="/libs/abp/jquery/abp.jquery.js" />
        <abp-script src="/libs/lodash/lodash.min.js" />
        <abp-script src="/libs/toastr/toastr.min.js" />
        <abp-script src="/libs/luxon/luxon.min.js" />
        <abp-script src="/libs/timeago/jquery.timeago.js" />
        <abp-script src="/libs/abp/aspnetcore-mvc-ui-theme-shared/toastr/abp-toastr.js" />
        <abp-script src="/libs/abp/aspnetcore-mvc-ui-theme-shared/jquery/jquery-extensions.js" />
        <abp-script src="/libs/abp/aspnetcore-mvc-ui-theme-shared/jquery-form/jquery-form-extensions.js" />
        <abp-script src="/libs/abp/aspnetcore-mvc-ui-theme-shared/jquery/widget-manager.js" />
        <abp-script src="/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/dom-event-handlers.js" />
        <abp-script src="/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js" />
        <abp-script src="/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js" />
        <abp-script src="/libs/abp/aspnetcore-mvc-ui-theme-shared/sweetalert/abp-sweetalert.js" />
        <abp-script src="/libs/timeago/locales/jquery.timeago.tr.js" />
        <abp-script src="/Pages/Layout.js" />
    </abp-script-bundle>

    <script src="~/Abp/ApplicationConfigurationScript"></script>
    <script src="~/Abp/ServiceProxyScript"></script>

    <!--begin::Page Scripts(used by this page) -->
    @RenderSection("scripts", false)
</body>
</html>
realLiangshiwei commented 4 years ago

The problem stems from your custom layout, I suggest you check your layout file. In addition, please upload the reproduce project you created using the CLI to the github repository.

atak946 commented 4 years ago

@liangshiw

can you explain my error? how i resolve.

i didn't see any error.

https://github.com/atak946/abpdeployerror

realLiangshiwei commented 4 years ago

Use

<script src="/assets/plugins/global/plugins.bundle.js"></script>
<script src="/assets/js/scripts.bundle.js"></script>

Instead of

<abp-script src="/assets/plugins/global/plugins.bundle.js" />
<abp-script src="/assets/js/scripts.bundle.js" />
atak946 commented 4 years ago

@liangshiw , Yes, I saw that there was a problem with the scripts while testing everything line by line. Thank you very much for everything, you have been very helpful.