Note that there are some explanatory texts on larger screens.

plurals
  1. PODeploying a salesforce.com flex app without visualforce
    primarykey
    data
    text
    <p><strong>SHORT VERSION:</strong> I have a Flex app that uses Salesforce.com's API. I am trying to deploy it to a remote server but keep getting "Error during login process." when I try to have it log in to salesforce's servers. What gives?</p> <p><strong>LONG VERSION</strong> (maybe someone finds this useful later): I have a flex application that's an add-on for salesforce.com </p> <p>If I upload it as a static file to salesforce and then embed it in a visualforce page, it works fine. This method uses "loginBySessionId" rather than loginByCredentials.</p> <p>I would like to be able to run it outside of salesforce's servers. IE, I would like to host the app on my own server and have people enter their credentials in the app and have it login to salesforce's servers. This way, if someone wants to try my application, they do not have to be salesforce administrators and do not have to install the app into a visualforce page.</p> <p><strong>Here's where the trouble is.</strong> If I enter my login information and run it from the compiler, it connects and loads the right data. If I export it as a production release, it still runs fine. However, if I either upload the release files to my own server, or if I transfer them to another computer and run them locally, i get an "Error during login process" Seems some others have had similar issues, but no solutions and nothing new.</p> <p>Weirder still, if I transfer the project files to another computer and recompile them, it suddenly works. So basically, seems like I have to recompile the app for each computer I plan on running it on, but that's not practical. Even still, I don't see how that could possibly be making a difference, compiling on one vs the other. And yes, same versions of flash, same versions of Flex.</p> <p>Does anyone have any suggestions on how to resolve this? Am I just misunderstanding something with how to deploy flex applications or is this some screwy thing with the salesforce API and there's a workaround?</p> <p><strong>As one added thing that makes this problem particularly frustrating</strong> is that I can't use the debugger because if I compile it on another computer, it works, so in order for me to get the error I have to build, then transfer to another computer. I feel like this could be a key to the problem, but I'm not sure how.</p> <p>Here is some applicable code, pretty basic:</p> <pre><code>&lt;flexforforce:F3WebApplication id="app" statusChanged="statusChangedHandler(event)" loginComplete="loginCompleteHandler(event)" loginFailed="loginFailedHandler(event)" sessionExpired="sessionExpiredHandler(event)" serverUrl="http://na9.salesforce.com/services/Soap/u/19.0" requiredTypes="Account,Contact,Opportunity,Lead,Task,User" /&gt; protected function loginClickHandler( event : MouseEvent ) : void { _username = 'LOGIN@LOGIN.COM'; _password = 'PASSWORD+SECURITY_TOKEN'; CursorManager.setBusyCursor(); app.loginByCredentials( _username, _password ); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload