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,420 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 Barry Schnell

Barry Schnell, Champion

  • 18,206 Points 10k badge 2x thumb
Hi Ben -

Appreciate the details, thank you.  Consistent with what you describe, I noticed far fewer HTTP requests on page load and the 302 wild goose chase is gone.

Thanks again!
Photo of Glenn Elliott

Glenn Elliott, Champion

  • 7,748 Points 5k badge 2x thumb
Same here. Better page load performance and no recurrence of the major failure since Spring 15. Tickety-boo.
Photo of Glenn Elliott

Glenn Elliott, Champion

  • 7,748 Points 5k badge 2x thumb

We've been seeing what looks like a recurrence of this bug in recent weeks, perhaps since the rollout of Salesforce Summer 15.

I can recreate it consistently as we did before:

1) Open new Chrome incognito window
2) Navigate to https://login.salesforce.com
3) Input credentials
4) From SFDC home page, click a tab link that is backed by a VisualForce Tab page that contains a skuid page

Screenshot of the failed page with console:



As before, a simple page refresh fixes it every time.

This is a production org running Skuid 6.8.19.

Is anyone seeing the same?
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,206 Points 10k badge 2x thumb
Hey Glen - Just tried with 6.8.20 in a couple of sandboxes and am unable to reproduce.  Are you seeing this in just Prod or also in sandboxes?  Possibly 6.8.20 will solve your issue?
Photo of Glenn Elliott

Glenn Elliott, Champion

  • 7,748 Points 5k badge 2x thumb
I just upgraded the prod org to 6.8.20 and am still getting the failure. Every time it fails to load resources:

https://skuid.ap1.visual.force.com/resource/1433565733000/JQuery 
https://skuid.ap1.visual.force.com/resource/1436413923000/SkuidJS 

I haven't tried a sandbox.
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,206 Points 10k badge 2x thumb
Outside of SB vs prod, one other difference between your situation and mine is that I believe you are in a managed package, correct?
Photo of Glenn Elliott

Glenn Elliott, Champion

  • 7,748 Points 5k badge 2x thumb
Yep, that's right. And Ben's previous posts suggested it was namespace related.
Photo of Glenn Elliott

Glenn Elliott, Champion

  • 7,748 Points 5k badge 2x thumb
Can I give this a bump please? Can others reproduce this in a managed package environment? We're getting it repeatedly.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,228 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,228 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 Craig Rosenbaum

Craig Rosenbaum

  • 4,788 Points 4k badge 2x thumb
Any update on this? We've experienced it from time to time and its particularly frustrating when the first thing a new trial user sees after logging in is a blank screen. I understand it's a SF issue, but any advancements? 

Is there a way to display a message "behind" the Skuid page if it doesn't load? That way we could say "Please refresh your browser". I'm thinking similarly to how some ads show text behind the ad if you're running adblocker.
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,530 Points 10k badge 2x thumb
For now the resolution is to not have the "Serve Static Resources from Visualforce Domain" Critical update applied. They've extended forcing that critical update until the Spring 16 release. Word is they'll have it fixed by then.
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,788 Points 4k badge 2x thumb
When you first log into the app, the first screen is blank and requires a refresh. The update is deactivated. 
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,530 Points 10k badge 2x thumb
Interesting, I've never seen this issue before with the update deactivated. Are you getting any javascript error in the console that first time? If so, can you post a screenshot?
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,788 Points 4k badge 2x thumb
Disregard above. Apparently I somehow enabled this update in my TSO but not my development orgs. The update WAS enabled in this org. I have disabled it from my TSO so hopefully future trial templates will not have the same issue. 
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,530 Points 10k badge 2x thumb
Ok, great! Please let me know if you're still seeing this issue in an org with "Serve Static Resources from Visualforce Domain" turned off.
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,788 Points 4k badge 2x thumb
So I made sure that my TSO had the critical update disabled and created a new trial template. However, this new template has the loading issue, and does not give me an option to disable this update. In fact, it doesn't even show up under critical updates. Any ideas on how to disable this in new trials? I would think that if my trial source org had it disabled, it would be disabled in new trials too.
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,788 Points 4k badge 2x thumb
Screen on the left is my TSO, screen on the right is a trial created from it. I deactivated both of those updates today, maybe the static resource one takes longer to register on SF's back end? 

Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,530 Points 10k badge 2x thumb
Interesting, I would think that the status of critical updates would carry through to newly created trials. I have seen some brand new orgs that don't have certain critical update options at all. I think Salesforce support might be able to deactivate those critical updates even if they don't show up in the UI.
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,788 Points 4k badge 2x thumb
I created a case with Salesforce partner support about this and here was their response:

"Trialforce will not pick this up because it is a critical update and will eventually get turned on. I suggest you work with your technical evangelist, Tim, to fix this in your application"

Of course not at all helpful. I will reach out to the technical evangelist and see what they have to say, but I'm assuming there hasn't been any solution from Salesforce yet.
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,530 Points 10k badge 2x thumb
Well that's obnoxious, because that Critical Update has been delayed for 3+ releases because of bugs with it.
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,788 Points 4k badge 2x thumb
Right. Are we the only ones with this issue in Trialforce? Any other ISVs have this problem?
Photo of John Hillstrom

John Hillstrom

  • 306 Points 250 badge 2x thumb
@Ben - this is marked solved but it looks like the Critical Update is going to be forced live in my production org in 31 days.  1/7/16.  What do we do at that point?
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,530 Points 10k badge 2x thumb
@John, I'll reach out to my contact at Salesforce and see if they're making any progress on this. FYI in my experience, those dates on critical updates are never right. It will get to "0 Days" and just stay there until the next Major Update. If anything happens, it will happen when you get Spring 16 installed on your SF instance, so you have quite a bit more time than 31 days.
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,530 Points 10k badge 2x thumb
Well haven't heard back from Salesforce yet on this one, but I did just see that this Critical Update has been delayed until the Summer 16 release.

https://resources.docs.salesforce.com/200/latest/en-us/sfdc/pdf/salesforce_spring16_release_notes.pd...

Check out Page 301

Not that I didn't expect this or anything...
Photo of Glenn Elliott

Glenn Elliott, Champion

  • 7,748 Points 5k badge 2x thumb
Thanks Ben. I find that, in new orgs, this update is activated automatically and it's not available in the list of critical updates to then deactivate. Do you get the same?
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,788 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,788 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.