NebulaLogger icon indicating copy to clipboard operation
NebulaLogger copied to clipboard

Lwc logging issue - String too long for Nebula__BrowserUrl__c field.

Open Ben-Nathan-CTM opened this issue 1 year ago • 9 comments

Package Edition of Nebula Logger

Managed Package

Package Version of Nebula Logger

v4.13.0

New Bug Summary

String too long error for the field Nebula__BrowserUrl__c(255) while logging lwc.

Ben-Nathan-CTM avatar Jun 11 '24 08:06 Ben-Nathan-CTM

Any help would be appreciated to bypass this.

Ben-Nathan-CTM avatar Jun 11 '24 08:06 Ben-Nathan-CTM

I believe this caused due to URL field being filled by the logger - since url field is fiexed to 255 characters. Not able to increase the length.

Ben-Nathan-CTM avatar Jun 11 '24 08:06 Ben-Nathan-CTM

@Ben-Nathan-CTM that sounds correct - I think the best option is for Nebula Logger to automatically truncate the field's value. I'll try to get this corrected in the next managed package version, which should be released in the next few weeks.

jongpie avatar Jun 11 '24 19:06 jongpie

Thank you so much. Really appreciate it. And love the product. Ben

On Wed, 12 Jun 2024 at 5:02 AM, Jonathan Gillespie @.***> wrote:

@Ben-Nathan-CTM https://github.com/Ben-Nathan-CTM that sounds correct - I think the best option is for Nebula Logger to automatically truncate the field's value. I'll try to get this corrected in the next managed package version, which should be released in the next few weeks.

— Reply to this email directly, view it on GitHub https://github.com/jongpie/NebulaLogger/issues/696#issuecomment-2161425023, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDQFVILV7GAZ3W3IS5JDHL3ZG5CVZAVCNFSM6AAAAABJDY67ICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRRGQZDKMBSGM . You are receiving this because you were mentioned.Message ID: @.***>

-- Compare The Market is a brand and trading name of Compare The Market (Pty) Ltd (CTM). This email is for the intended addressee and is confidential and subject to copyright. If you are not the intended addressee, confidentiality has not been waived and any use, interference with, or disclosure of this email is unauthorised. If you are not the intended addressee please immediately notify CTM and then delete the email. CTM does not warrant that this email is error or virus free.

Ben-Nathan-CTM avatar Jun 11 '24 22:06 Ben-Nathan-CTM

SCR-20240612-jium-2

Ben-Nathan-CTM avatar Jun 12 '24 00:06 Ben-Nathan-CTM

@Ben-Nathan-CTM that sounds correct - I think the best option is for Nebula Logger to automatically truncate the field's value.

URLs can be much longer, so it'd be better to switch to a long text field.

TrangOul avatar Jun 12 '24 10:06 TrangOul

@TrangOul that's a fair point - I'm not sure if 2GP supports changing the fields from text(255) to long textarea, but I'll test it out.

  • If I'm able to convert the existing fields - I'll switch to a long textarea field + set the length to support the max length of a URL field (thanks for the link with more info on the max length!).
  • If I can't convert the existing field to long textarea - I might truncate the value for now, and deprecate/replace the BrowserUrl__c field later (my process for field deprecation is a bit tedious, so truncating would be a "quick fix").

jongpie avatar Jun 12 '24 14:06 jongpie

Sounds like a plan!

On Thu, 13 Jun 2024 at 12:36 AM, Jonathan Gillespie < @.***> wrote:

@TrangOul https://github.com/TrangOul that's a fair point - I'm not sure if 2GP supports changing the fields from text(255) to long textarea, but I'll test it out.

  • If I'm able to convert the existing fields - I'll switch to a long textarea field + set the length to support the max length of a URL field (which I think is around 1600 characters, but I'll have to verify).
  • If I can't convert the existing field to long textarea - I might truncate the value for now, and deprecate/replace the BrowserUrl__c field later (my process for field deprecation is a bit tedious, so truncating would be a "quick fix").

— Reply to this email directly, view it on GitHub https://github.com/jongpie/NebulaLogger/issues/696#issuecomment-2163179771, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDQFVIJKBP4JEKHT7J264YTZHBMFJAVCNFSM6AAAAABJDY67ICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRTGE3TSNZXGE . You are receiving this because you were mentioned.Message ID: @.***>

-- Compare The Market is a brand and trading name of Compare The Market (Pty) Ltd (CTM). This email is for the intended addressee and is confidential and subject to copyright. If you are not the intended addressee, confidentiality has not been waived and any use, interference with, or disclosure of this email is unauthorised. If you are not the intended addressee please immediately notify CTM and then delete the email. CTM does not warrant that this email is error or virus free.

Ben-Nathan-CTM avatar Jun 12 '24 19:06 Ben-Nathan-CTM

@Ben-Nathan-CTM and @TrangOul another update on this - I did some testing, and it looks like managed packages can't change the field type from URL to long textarea. For now, I'll just truncate the field values, which should avoid the error that @Ben-Nathan-CTM has been seeing. This change will be released in v4.14.0 via PR #700.

Long term, I'll still look into deprecating BrowserUrl__c with a new long textarea field so the full URL + parameters can be stored.

jongpie avatar Jun 18 '24 20:06 jongpie

This has been fixed in the unlocked package in release v4.13.15, and will be fixed in release v4.14.0 of the managed package.

I decided to go ahead and deprecate the BrowserUrl__c fields - they're still being populated (and the values are now truncated), but there are new BrowserAddress__c fields with a max length of 2,000 characters (which can also be adjusted in the future, if needed).

jongpie avatar Jul 16 '24 21:07 jongpie