forcedotcom / aura

This project is archived, please see the readme for additional resources.
Apache License 2.0
674 stars 333 forks source link

Issue while loading lighting components on android #172

Closed coolmk09 closed 5 years ago

coolmk09 commented 6 years ago

Hi all,

I have developed an hybrid application, our application is based on Salesforce MobileSDK 5.3 (for iOS) and SDK 6.0 (For Android).

This app uses lighting components within the hybrid app, from last couple of days (may be more then a month) we observed that lighting has stopped working for android platform and now app is no longer able to load lighting components.

Here is the code that I have used to load lighting component

We use following url to load lighting framework https://salesforce-mydomain-url/lightning/lightning.out.js

Code to create lightning component on the fly

$Lightning.use("c:MyLightningApp.app", function () {
                $Lightning.createComponent("c:MyLightningComponent", {},
                   "myLightningDiv",
                    function (cmp) {
                        console.log("Component created!");
                        console.log(cmp);
                    }
                );
            }, ""https://salesforce-mydomain.lightning.force.com" ", "Bearer " +  "myoauth-access-token");

Currently I am getting error (attached) when try to load component.

MyLightningApp.app?aura.format=JSON&aura.format.adapter=LightingOut :: ERROR_TOO_MANY_REDIRECTS

when debugging on chrome network tab, I have observed following URL requests

MyLightningApp.app?aura.format=JSON&aura.format.adapter=LightingOut

followed by

https://salesforce-mydomain.my.salesforce.com/visualforce/session?url?https://xxxxxxMyLightningApp.app%3FAura.FormatAdapter%3DJSON%26aura.format.adapter%3DLIGHTNIG_OUT

recursively. this tries almost 8-10 times then I received the error(attached)

Please note this works fine on iOS and lighting component load successfully there.

Any help? Am I missing something?

Regards, Manish Kumar