Url length longer than the maximum allowed length of 4096

  • 1
  • Problem
  • Updated 3 years ago
  • Solved
Hello -

I am encountering the following error:

URL starting with 'https://myurl--skuid.cs42.visual.force.com/apex/labels?labels=%5B%22action%22%2C%22after.... is longer than the maximum allowed length of 4,096. 

An unexpected error has occurred. Your solution provider has been notified. (skuid)


The scenario is rather complex and I've been unable to reproduce this is an isolated scenario so I'm unable to provide a simplified page XML.  Here's the details:

1) Master Page A
2) Master Page B
3) Child Page A1 (Child of A) has a table with global action that triggers a popup that contains a page include for B1
4) Child Page B1 (Child of B) - Contains a table

When opening the popup on A, network activity is seen but the page encounters the above error.  

If I remove the table from B1, no error occurs.  If I have a field editor or template instead of the table, the page works.  The problem only appears to occur if I have a table on B1.  I've even removed all configuration from the table (no row actions, no global actions, no fields, etc.) and the problem still occurs.

I've spent hours troubleshooting this but just can't seem to figure out what is wrong. I've tried reproducing using basic Account objects on simplified pages and unfortunately can't reproduce even with the same page configurations.

Any ideas what this might be?  Can someone take a look?  (I'll email support with Org ID info just in case).

Thanks!
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
I think I've isolated this and in the process simplified the surface area for troubleshooting.

I was able to track this down to the use of customLabelDependencies inside of my component pack.  I have a lot of custom labels :)

  • If I do not include any of my custom components on Master Page B (there weren't any on Child Page B1 to begin with) then the page loads successfully without the URL error.  
  • If I include my custom component but remove the table, the page loads successfully.  
  • If I have my custom component and a field editor, the page loads correctly.  
  • It only appears to error when I have my custom component and a table component on Master Page B. 
Important - If I remove the customLabelDependencies from my component page, I'm able to succesfully have Master Page B contain my custom component AND a table.

I've taken the above and reduced the complexity of the repro:

1) Page A - Basic page with only a page title component.  The page title component contains a button that triggers the popup.  The popup includes Page B
2) Page B - Basic page with two components - 1) Custom component that has a long list of customLabelDependencies; and 2) default table component against any model (no config other than stock settings)

What's odd is that if I put my custom component and a table on Page A, it loads fine.  It's only when I have a page include and that page include contains custom component and a table. I'm guessing the label loading behavior for page includes is different than pages that are loaded the standard wya? It looks like Skuid might be passing each individual label key to the labels URL which is resulting in the max length?

I have this simplified repro setup in my org.  I'll send over details to support.

Thanks!
(Edited)
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Barry, you are correct that this behavior is localized to Page Includes. Skuid uses different approaches to load Custom Labels into a Skuid Page when you're using Page Includes than it does for regular page loads. In the Page Include scenario, Skuid fetches the Labels via a PageReference getContent() , which is the source of this URL length exceeded error.

We'll see if we can figure out a way to avoid this issue.
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Thanks Zach.  It appeared to be something happening server side so I assumed a callout or like you mention, a getContent call, appreciate the extra detail.

While you guys work on a solution, is there any workaround that you can suggest?  I'm blocked with this currently.  The only thing I can think of is have two component packs that are the essentially the same, one with the labels (for my base page) and one without (for my include page).

Thanks!
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
This will be fixed in Banzai Update 5. Other than temporarily moving your custom label dependencies out of your Component Pack temporarily, I don't have a good workaround idea.
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Awesome, thanks for the quick fix Zach!

For the workaround, what I did was temporarily move my labels directly to Master Page A and out of the component pack.  This avoided the extra component pack but did require all of our master pages to have the same label set.  Looks like I'll be able to put humpty back together with update 5, thanks again!
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Hey Zach - This is still occurring with Update 5 (Skuid 7.24).  Did it make the Update 5 cut or is this still in progress?
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Barry, using the requested API version is a good idea, I think that would be viable as it is possible to use that, and for this particular situation would be helpful.
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Cool, good to know you can check the version referenced from within APEX.
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Hi Zach -

This appears to be resolved even in my particular boundary case as of Skuid 7.27 (Update 6) although I didn't see anything mentioned in the release notes.  Can you confirm that this was addressed in Update 6?

Thanks!
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Confirmed, this should be resolved for your boundary case of 7.27.
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Thanks Zach!