Skip to content
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

Theme styles not loading when deploy app to production #2214

Open
SalmanAhmedMughal opened this issue Mar 7, 2021 · 9 comments
Open

Theme styles not loading when deploy app to production #2214

SalmanAhmedMughal opened this issue Mar 7, 2021 · 9 comments

Comments

@SalmanAhmedMughal
Copy link

image

Hi, Hope you all are doing great. I ran into an issue when i deploy the release of the store on my production server. Its not loading the styles i have attached the screenshot.

@mesuttascic
Copy link

I got same error debug mode:

During translation of SCSS code, readed from the file '/Themes/Flex/Content/theme.scss', to CSS code error has occurred.
See more details:
During loading of Sass compiler error has occurred. Most likely it happened, because the 'libsass.dll' assembly or one of its dependencies was not found. Try to install the LibSassHost.Native.win-x86 package via NuGet.

at BundleTransformer.SassAndScss.Translators.SassAndScssTranslator.InnerTranslate(IAsset asset, CompilationOptions sassOptions, Boolean enableNativeMinification)
at BundleTransformer.SassAndScss.Translators.SassAndScssTranslator.Translate(IAsset asset)
at SmartStore.Web.Framework.Theming.Assets.AssetTranslator1.TranslateInternal(IAsset asset) in D:\WS\Github\SmartStoreNET\src\Presentation\SmartStore.Web.Framework\Theming\Assets\AssetTranslator.cs:line 77 at SmartStore.Web.Framework.Theming.Assets.AssetTranslator1.Translate(IAsset asset) in D:\WS\Github\SmartStoreNET\src\Presentation\SmartStore.Web.Framework\Theming\Assets\AssetTranslator.cs:line 57
at BundleTransformer.Core.HttpHandlers.AssetHandlerBase.InnerTranslateAsset[T](String translatorName, IAsset asset, ITransformer transformer, Boolean isDebugMode)
at SmartStore.Web.Framework.Theming.SassCssHttpHandler.TranslateAssetCore(IAsset asset, ITransformer transformer, Boolean isDebugMode) in D:\WS\Github\SmartStoreNET\src\Presentation\SmartStore.Web.Framework\Theming\CssHttpHandler.cs:line 22
at SmartStore.Web.Framework.Theming.CssHttpHandlerBase.TranslateAsset(IAsset asset, ITransformer transformer, Boolean isDebugMode) in D:\WS\Github\SmartStoreNET\src\Presentation\SmartStore.Web.Framework\Theming\CssHttpHandler.cs:line 126
at BundleTransformer.Core.HttpHandlers.AssetHandlerBase.ProcessAsset(String assetVirtualPath, String bundleVirtualPath)
at BundleTransformer.Core.HttpHandlers.AssetHandlerBase.GetProcessedAssetContent(String assetVirtualPath, String bundleVirtualPath)
at BundleTransformer.Core.HttpHandlers.AssetHandlerBase.ProcessRequest(HttpContextBase context)

@mesuttascic
Copy link

Then I updated LibSassHost.Native.win-x86 package via NuGet to 1.3.2(lastversion); also updated LibSass Host to 1.3.2

Now the error is
Method not found: 'System.String LibSassHost.Helpers.SassErrorHelpers.GenerateErrorDetails(LibSassHost.SassСompilationException, Boolean)'.

@mesuttascic
Copy link

mesuttascic commented May 13, 2021

Then I updated LibSassHost.Native.win-x86 and LibSassHost for project SmartStore.Web.Framework
now the error is

The requested service 'SmartStore.Web.Framework.Routing.IRoutePublisher' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.

at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable1 parameters) at Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context, IEnumerable1 parameters)
at Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context)
at SmartStore.Core.Infrastructure.DependencyManagement.ContainerManager.Resolve[T](Object key, ILifetimeScope scope) in D:\WS\Github\SmartStoreNET\src\Libraries\SmartStore.Core\Infrastructure\DependencyManagement\ContainerManager.cs:line 33
at SmartStore.Core.Infrastructure.SmartStoreEngine.Resolve[T](String name) in D:\WS\Github\SmartStoreNET\src\Libraries\SmartStore.Core\Infrastructure\SmartStoreEngine.cs:line 146
at SmartStore.Web.MvcApplication.RegisterRoutes(RouteCollection routes, IEngine engine, Boolean databaseInstalled) in D:\WS\Github\SmartStoreNET\src\Presentation\SmartStore.Web\Global.asax.cs:line 60
at SmartStore.Web.MvcApplication.Application_Start() in D:\WS\Github\SmartStoreNET\src\Presentation\SmartStore.Web\Global.asax.cs:line 125

@mesuttascic
Copy link

mesuttascic commented May 13, 2021

Then I updated Bundle Transformer: Sass and SCSS to v1.12.22
and now i got HTTP Error 500.19 - Internal Server Error :)

Config Source:
186: add name="SassAssetHandler" path=".sass" verb="GET" type="BundleTransformer.SassAndScss.HttpHandlers.SassAndScssAssetHandler, BundleTransformer.SassAndScss" resourceType="File" preCondition="" />add name="ScssAssetHandler" path=".scss" verb="GET" type="BundleTransformer.SassAndScss.HttpHandlers.SassAndScssAssetHandler, BundleTransformer.SassAndScss" resourceType="File" preCondition="" />/handlers>

@muratcakir
Copy link
Contributor

There's no need to update the NuGet packages, you should revert the updates. The BundleTransformer packages unfortunately tend to pollute the web.config with a lot of noisy markup and sometimes even break the configuration.

Is the latest C++ runtime package available on the deployment server? Alternatively, switch to MsieJsEngine (see comment in web.config, line 450).

@mesuttascic
Copy link

Thanx @muratcakir
I will try

@codeincolor
Copy link

codeincolor commented Apr 25, 2022

Any progress on this. I'm having the problem out of the box. Using iis express. Tried to switch the config "MsieJsEngine ". No luck. :( If its easier to bypass I wouldnt mind that approach. I can just reference css the good old fashioned way. Suggestions?
reference error:
System.MissingMethodException: 'Method not found: 'System.String LibSassHost.Helpers.SassErrorHelpers.GenerateErrorDetails(LibSassHost.SassСompilationException, Boolean)'.'

Stack Trace:
at BundleTransformer.SassAndScss.Translators.SassAndScssTranslator.InnerTranslate(IAsset asset, CompilationOptions sassOptions, Boolean enableNativeMinification)
at BundleTransformer.SassAndScss.Translators.SassAndScssTranslator.Translate(IAsset asset)
at SmartStore.Web.Framework.Theming.Assets.AssetTranslator1.TranslateInternal(IAsset asset) in C:\Users\Joe\source\repos\SmartStoreNET-4.x\src\Presentation\SmartStore.Web.Framework\Theming\Assets\AssetTranslator.cs:line 77 at SmartStore.Web.Framework.Theming.Assets.AssetTranslator1.Translate(IAsset asset) in C:\Users\Joe\source\repos\SmartStoreNET-4.x\src\Presentation\SmartStore.Web.Framework\Theming\Assets\AssetTranslator.cs:line 57
at BundleTransformer.Core.HttpHandlers.AssetHandlerBase.InnerTranslateAsset[T](String translatorName, IAsset asset, ITransformer transformer, Boolean isDebugMode)
at SmartStore.Web.Framework.Theming.SassCssHttpHandler.TranslateAssetCore(IAsset asset, ITransformer transformer, Boolean isDebugMode) in C:\Users\Joe\source\repos\SmartStoreNET-4.x\src\Presentation\SmartStore.Web.Framework\Theming\CssHttpHandler.cs:line 22
at SmartStore.Web.Framework.Theming.CssHttpHandlerBase.TranslateAsset(IAsset asset, ITransformer transformer, Boolean isDebugMode) in C:\Users\Joe\source\repos\SmartStoreNET-4.x\src\Presentation\SmartStore.Web.Framework\Theming\CssHttpHandler.cs:line 103

@muratcakir
Copy link
Contributor

This error indicates that the BundleTransformer packages used in your solution are either outdated or are more recent versions than the ones originally delivered. Did you update any package via NuGet package manager?

@codeincolor
Copy link

codeincolor commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants