Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Andreas Lundgren 3 posts 73 karma points
    Jan 26, 2023 @ 09:41
    Andreas Lundgren

    SQLite error


    I'm trying to use the ContentApp to parse a page as a newsletter. Whenever I try to save the default information after creating a new campaign, I recieve a 500 error and can't proceed.

    This is the error I get from the logs:

    Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'no such column: −331'.
       at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
       at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements(Stopwatch timer)+MoveNext()
       at Microsoft.Data.Sqlite.SqliteCommand.GetStatements(Stopwatch timer)+MoveNext()
       at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
       at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
       at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery()
       at Umbraco.Cms.Infrastructure.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
       at Umbraco.Cms.Persistence.Sqlite.Services.SqliteDistributedLockingMechanism.SqliteDistributedLock.ObtainWriteLock()
       at Umbraco.Cms.Persistence.Sqlite.Services.SqliteDistributedLockingMechanism.SqliteDistributedLock..ctor(SqliteDistributedLockingMechanism parent, Int32 lockId, DistributedLockType lockType, TimeSpan timeout)
       at Umbraco.Cms.Persistence.Sqlite.Services.SqliteDistributedLockingMechanism.WriteLock(Int32 lockId, Nullable`1 obtainLockTimeout)
       at Umbraco.Cms.Infrastructure.Scoping.Scope.ObtainWriteLock(Int32 lockId, Nullable`1 timeout)
       at Umbraco.Cms.Infrastructure.Scoping.Scope.LockInner(Guid instanceId, Dictionary`2& locks, HashSet`1& locksSet, Action`2 obtainLock, Nullable`1 timeout, Int32 lockId)
       at Umbraco.Cms.Infrastructure.Scoping.Scope.EagerWriteLockInner(Guid instanceId, Nullable`1 timeout, Int32[] lockIds)
       at Umbraco.Cms.Infrastructure.Scoping.Scope.EnsureDbLocks()
       at Umbraco.Cms.Infrastructure.Scoping.Scope.get_Database()
       at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.ServerRegistrationRepository.PerformGetAll(Int32[] ids)
       at Umbraco.Cms.Core.Cache.NoCacheRepositoryCachePolicy`2.GetAll(TId[] ids, Func`2 performGetAll)
       at Umbraco.Cms.Core.Services.Implement.ServerRegistrationService.TouchServer(String serverAddress, TimeSpan staleTimeout)
       at Umbraco.Cms.Infrastructure.HostedServices.ServerRegistration.TouchServerTask.PerformExecuteAsync(Object state)

    I'm running Newsletter Studio 10.0.2 and Umbraco 10.1.

    Any advice?

  • Markus Johansson 1924 posts 5831 karma points MVP 2x c-trib
    Jan 26, 2023 @ 12:52
    Markus Johansson

    Hi Andreas!

    Thanks for posting the issue.

    Looking at the trace that you posted it looks like the error happens inside Umbraco, could you explain more in detail how to reproduce the issue?

    If I understand you correct:

    • Open a content node where the Newsletter Studio-ContentApp is active.
    • Create a new campaign for the node?
    • Click on Umbracos "Save and Publish"-button

    Maybe a couple of screenshots of the flow would help making it clear.

    // m

  • Andreas Lundgren 3 posts 73 karma points
    Jan 26, 2023 @ 14:09
    Andreas Lundgren


    Thanks for your reply!

    Here is the flow:

    • Navigate to the correct node enter image description here

    • Press the email tab and Create new Campaign enter image description here

    • Fill in the information and press Next Step (or Save) enter image description here

    • I now get a 500 back from /umbraco/backoffice/NewsletterStudio/CampaignContentApp/Save and can't proceed. enter image description here

    I tried an SQL Server database instead. Still same result, although I don't get any exceptions within the logs, the debug logs doesn't really produce anything helpful either, as far as I can tell. So, it seems like the exception causing the 500 is swallowed somehow. I'm currently on the trial (evaluating, waiting for a license) if that matters.

    Thank you for your help!

  • Markus Johansson 1924 posts 5831 karma points MVP 2x c-trib
    Jan 26, 2023 @ 14:44
    Markus Johansson


    Thank you for the clear steps!

    I'll try to reproduce this right away and keep you posted.

    / Markus

  • Markus Johansson 1924 posts 5831 karma points MVP 2x c-trib
    Jan 26, 2023 @ 15:43
    Markus Johansson

    Hi again!

    I've tried to reproduce the issue on Umbraco 10.1 and Newsletter Studio 10.0.2. As you can see here I can't reproduce the issue.

    enter image description here

    • Does this reflect the flow that you are testing?
    • Could you elaborate on the content on the node and the rendering, are you using anything "special" when you're rendering the underlying page?
    • Did you try to render the page on the front end at all? Maybe the rendering throws the error?

    I have a couple of things we could check:

    • I can tell from the console log that you sent that there is a 400-error before the 500-error with Newsletter Studio. Was that a failed login-attempt on your side or could this be related?
    • Since the NewsletterStudio-endpoint throws a 500-error there should be more details in the trace log (Settings -> Log Viewer). Do you see any errors that you can share?
    • Would it be possible to see the reponse body of the 500-error that you get when you're trying to save?

    All the best,

    // Markus

    Edit: Seems like someone else is having a similar issue but unrelated to the Newsletter Studio-package

    And another one:

  • Andreas Lundgren 3 posts 73 karma points
    Jan 26, 2023 @ 21:08
    Andreas Lundgren


    I found the issue to the first problem. I was using a RenderController to return the correct view with corresponding ViewModel. This means the default template wasn't populated, causing the error.

    However, once I try and preview a template containing a block list I get a null reference exception:

    NullReferenceException: Object reference not set to an instance of an object. NewsletterStudio.CssInline.AngleSharp.AutoSelectedMarkupFormatter.Comment(IComment comment) NewsletterStudio.CssInline.AngleSharp.Dom.Comment.ToHtml(TextWriter writer, IMarkupFormatter formatter) NewsletterStudio.CssInline.AngleSharp.Dom.Collections.NodeList.ToHtml(TextWriter writer, IMarkupFormatter formatter) NewsletterStudio.CssInline.AngleSharp.Extensions.FormatExtensions.ToHtml(IMarkupFormattable markup, IMarkupFormatter formatter) NewsletterStudio.CssInline.PreMailer.PreMailer.MoveCssInline(bool removeStyleElements, string ignoreElements, string css, bool stripIdAndClassAttributes, bool removeComments) NewsletterStudio.CssInline.CssInlineHelper.InlineCss(string html, string baseUrl) NewsletterStudio.Core.Rendering.EmailRenderer.Render(IRecipientDataModel recipient) NewsletterStudio.Core.Frontend.Rendering.RenderEmailControllerActions.RenderCampaign(Guid key) NewsletterStudio.Web.Controllers.RenderEmailController.RenderCampaign(Guid id) lambdamethod1516(Closure , object , object[] ) Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor+SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, object controller, object[] arguments) Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync() Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync() Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.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.

    Are there any known limits to the inline css?

    Thank you for your help! /Andreas

  • Markus Johansson 1924 posts 5831 karma points MVP 2x c-trib
    Jan 31, 2023 @ 15:54
    Markus Johansson


    I think that there might be limitations with the inlining depending on how you try to use it. I have never seen that exact error.

    It's kind of hard to tell why this is happening without seeing the exact code. But it's a good idea to follow these guidelines for the email content:

    • Make sure that all CSS used is rendered in the HTML as

Please Sign in or register to post replies

Write your reply to: