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

WebhookRequest table needs a larger requestObject column #15528

Closed
rickbutterfield opened this issue Jan 4, 2024 · 3 comments
Closed

WebhookRequest table needs a larger requestObject column #15528

rickbutterfield opened this issue Jan 4, 2024 · 3 comments
Labels

Comments

@rickbutterfield
Copy link
Contributor

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

13.0.3

Bug summary

When creating a webhook to POST to Cloudflare, an error is shown:

Microsoft.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated in table '***.dbo.umbracoWebhookRequest', column 'requestObject'. Truncated value: '{"Name":"Home","CreateDate":"2023-11-16T14:54:51.133Z","UpdateDate":"2024-01-04T15:34:56.993Z","Rout'.
The statement has been terminated.
   at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData()
   at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method)
   at Microsoft.Data.SqlClient.SqlCommand.ExecuteScalar()
   at Umbraco.Cms.Infrastructure.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
   at System.Data.Common.DbCommand.ExecuteScalarAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location ---
   at NPoco.Database.ExecutionHookAsync[T](Func`1 action)
   at NPoco.Database.ExecuteScalarHelperAsync(DbCommand cmd)
   at NPoco.Database.InsertAsyncImp[T](PocoData pocoData, String tableName, String primaryKeyName, Boolean autoIncrement, T poco, Boolean sync)
   at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.WebhookRequestRepository.CreateAsync(WebhookRequest webhookRequest)
   at Umbraco.Cms.Core.Services.WebhookRequestService.CreateAsync(Guid webhookKey, String eventAlias, Object payload)
ClientConnectionId:96abbc6e-4a5e-4d48-8440-c5ff3db60d44
Error Number:2628,State:1,Class:16

Specifics

image

This is happening on a Cloud site, I have not tried to replicate on a self-hosted site.

Steps to reproduce

Create a webhook with the following settings:

URL: https://api.cloudflare.com/client/v4/pages/webhooks/deploy_hooks/f9aa0381-9823-4983-a13d-5abc33c72b83 (this is NOT a production webhook so I'm happy for it to be used for testing purposes)
Events: Content Unpublished, Content Published, Content Deleted

Try and save/publish/delete a page within Umbraco.

Expected result / actual result

Expected result: the page is created/published/deleted without any errors, and the webhook is triggered.
Actual result: the above error is shown and the webhook is not triggered.

Copy link

github-actions bot commented Jan 4, 2024

Hi there @rickbutterfield!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

  • We'll assess whether this issue relates to something that has already been fixed in a later version of the release that it has been raised for.
  • If it's a bug, is it related to a release that we are actively supporting or is it related to a release that's in the end-of-life or security-only phase?
  • We'll replicate the issue to ensure that the problem is as described.
  • We'll decide whether the behavior is an issue or if the behavior is intended.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

@rickbutterfield
Copy link
Contributor Author

rickbutterfield commented Jan 4, 2024

After some digging, it appears that this has been fixed in #15252 but the migration doesn't appear to have been applied to my database? This site was on one of the RCs before upgrading to 13.0.0. I have manually updated the table but assume there's nothing that can be done going from an RC to the final version?

@Zeegaan
Copy link
Member

Zeegaan commented Jan 8, 2024

This was fixed in #15454
But if you updated before 13.0.1 then yes nothing can really be done other than manually updating the column 😢

@Zeegaan Zeegaan closed this as completed Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants