Blank screen on first page load

  • 6
  • Problem
  • Updated 3 years ago
  • Solved
We are getting blank screen when we go to visualforce tab for the first page load. We have visualforce page  'PracticeView' that contains skuid page 'PracticeView' and corresponding visualforce tab 'PractiFI'. Also, PractiFI is default landing tab/page for our app.  When we go to PractiFI tab, we get blank screen (most of the time) and we need to refresh the browser to get the contents. If we open the console (in chrome) we get errors.I have attached the error screen shot below. Any idea?



Photo of Gyan

Gyan

  • 1,422 Points 1k badge 2x thumb

Posted 4 years ago

  • 6
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,530 Points 10k badge 2x thumb
Hi Barry, I never saw an official issue, but I did notice that how Salesforce authenticated static resources changed between the two versions of Salesforce.

The error was being cause when Skuid requested a certain static resource say skuid__SkuidJS. If there was not a certain session cookie set, Salesforce would serve up a HTTP 302 to /visualforce/session instead of serving up the requested content with a HTTP 200 like you'd expect.  The HTTP 302 would take your poor browser on a wild HTTP 302 goose chase that passed through /visualforce/session and /visualforce/recsession and back to /visualforce/session and finally to back to your intended destination with your session cookie included.

The problem however was that if your original request included a managed package namespace, somewhere along the chain, it was removed, and ended with a bad, although authenticated request.

However, by examining network traffic in Spring 15, it looks like Salesforce is doing a much better job authenticating resources.  I'm still not 100 percent sure how all this works, or what exactly salesforce is doing with these 302s, but from what I've seen, this issue is gone in Spring 15 and you should actually see less latency because a lot of these 302s have been eliminated.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,508 Points 20k badge 2x thumb
Are you getting any JS errors?  Can you post those - or send via email? 

Can you reliably reproduce the issue?  If so could you grant us login rights and send us an Org ID and the repro steps via email?

We'll try to get to the bottom of this.  
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,530 Points 10k badge 2x thumb
Ok, Glenn.

I was able to recreate the issue in our Demo org. At first I couldn't because of two issues. I only get this problem when the "Serve Static Resources from the Visualforce Domain" critical update is enabled. Also, when I had a Skuid page load as a Home Page component I couldn't replicate the issue either.

A quick (hacky) workaround would be to have your home pages load in something that used Skuid.

Another workaround for now would be to disable that critical update. (It shows I still have 51 days before it will be automatically applied.)

We'll keep looking at this issue and possibly raise a case with Salesforce.
Photo of Glenn Elliott

Glenn Elliott, Champion

  • 7,748 Points 5k badge 2x thumb
Good spot, mate. That makes sense re the critical update. In our production org, the critical update is activated and I consistently get the failure. In our demo org it's deactivated and I don't get the failure. I then went to the production org, deactivated the critical update, retested and I don't get the failure anymore. So that gives us a 50 day window.

As for your workaround, PractiFI loads a Visualforce page with a Skuid page by default, bypassing the Salesforce home page, so that probably won't work for us.

Thanks for your help Ben & Rob. Keen to hear how you get on with it from here. 
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,508 Points 20k badge 2x thumb
Thanks Glenn. 
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,530 Points 10k badge 2x thumb
Quick Update on this...

I found this "known issue" that looks to be quite related to what we're seeing here. Feel free to  click "This issue affects me".

https://success.salesforce.com/issues_view?id=a1p300000008XWkAAM
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,530 Points 10k badge 2x thumb
Another quick update on this issue. I've been working with Salesforce support on this and we finally have a "known issue" that relates to this issue. Another update is that the enforcement of this critical update has been delayed until the Spring 16 release.

Here's the link to the known issue.
https://success.salesforce.com/issues_view?id=a1p300000001ACTAA2

Feel free to click the "This issue affects me" button in the issue.
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,530 Points 10k badge 2x thumb
Glenn, I feel like I've seen it both ways. But I think you're right in most cases new orgs will have the Critical Updates turned on with no way to turn them off. I have access to a Spring 16 org right now. I'll see if I can make this bug happen there when I get a chance.
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,868 Points 4k badge 2x thumb
I second what Glenn said. All of our new TrialForce customer orgs have this enabled by default and no way to turn it off, even though the TF Source org has it turned off. Salesforce essentially told me "too bad" when I logged a case about this. 

It's particularly frustrating that new user's first exposure to our app is a blank screen and we have to tell them "just refresh". I wish Salesforce would provide assistance with it. 
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,530 Points 10k badge 2x thumb
Hey Everyone, another update on this. It looks like this is still not fixed in Spring 16. We decided to put some code into our Banzai Update 7 that will automatically refresh the page if the resources have not been loaded properly. Let us know if you still get this issue after installing Banzai Update 7.
(Edited)
Photo of Blake Curtis

Blake Curtis

  • 268 Points 250 badge 2x thumb
Thanks for the update. It seems to be working much better so far.
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,868 Points 4k badge 2x thumb
I got notified by Salesforce that they fixed the underlying problem: https://success.salesforce.com/issues_view?id=a1p300000001ACTAA2

I haven't tested yet, although the Skuid solution of auto refresh has been working for us.