5

I've been following the documentation listed here:Lightning/Visualforce Documenation and seeing different results between my developer org and my sandbox environment.

When constructing the example in the documentation and loading the visualforce page, the developer org renders the referenced component.

The sandbox version results in the following error in the console:

"https://salesforcedomain/c/lcvfTest.app?aura.format=JSON&aura.formatAdapter=LIGHTNING_OUT

Failed to load resource: the server responded with a status of 404 (Not Found)"

I've referenced the required lightning.out.js in both examples. Is there a permission or missing dependency or something in my sandbox that might cause this result?

  • both are in winter' 16 ? – Himanshu Oct 19 '15 at 17:26
  • is mydomain enabled? – SF Ninja Oct 19 '15 at 17:37
  • Both are in winter 16 (version 35), both are using mydomain. – Jake Landis Oct 19 '15 at 18:01
  • 1
    same issue on winter 16 (worked on winter 15), created a case with support – Pavlonator Oct 19 '15 at 21:00
  • Lightning Components for VF was not supported in any '15 release so I am confused by your comment that this worked in Winter '15 (did not even exist in the codebase until Winter '16). – Doug Chasman Oct 20 '15 at 14:20
2

I was able to get a Lightning component to be served out of a VF page (without a custom domain) using the steps referenced in the question, but only when specifying the visual.force.com domain format.

Worked: https://c.cs3.visual.force.com/apex/lightningHW

Failed: https://cs3.salesforce.com/apex/lightningHW

(cs3 being the salesforce instance from which my sandbox happened to be served.)

The "preview" button on the dev console VF Page editor redirects to the failing URL above. Changing the url to the alternate format worked.

I cannot (yet) speak to the impact of this alternate domain-name format on other aspects of page access. However other org VF pages do appear to be served out properly when using this domain name format.

0

I suspect that the difference is namespaced org versus non-namespaced org using "c:lcvfTest.app" - what is the namespace (not the mydomain but the org namespace for packaging) of your Sandbox org? Can you try referencing this namespace explicitly in the $Lightning.use() call, e.g. if your org's namespace was foo:

$Lightning.use("foo:lcvfTest", function() {
   ...
}
  • Is it possible to have a namespace for a Sandbox org? I was under the impression you could only create unmanaged packages in sandbox. – Jake Landis Oct 20 '15 at 15:27
  • I am also facing same issue. This works fine in developer account but not in sandbox. I checked there is no namespace issue. – user25787 Oct 25 '15 at 7:58
  • Have either of you opened a case on this yet? I'd like to get one of my team mates to look into this ASAP and it would help us get a solution faster if we have repro details etc. – Doug Chasman Oct 26 '15 at 0:28
  • @JakeLandis looking back at your original question you listed the 404ed URL as salesforcedomain/blah - can you paste the exact URL? If that is the main salesforce domain then something is wrong because LC4VF is served from the Vusualforce namespaced domain only. If your org has Serve VF Pages from the Salesforce Domain perm enabled (very rare) you cannot use LC4VF because of security requirements. – Doug Chasman Oct 26 '15 at 10:52
  • @JakeLandis when you request a simple VF page what is the domain that it is being served from? – Doug Chasman Oct 26 '15 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.