Failed to log in. - Forum - Mobile - Progress Community

Failed to log in.

 Forum

Failed to log in.

This question is answered

Hi, I have a problem with a mobile application.

Setup:

Local Progress tomcat webserver with default settings. It is published to internet as an external address via a route in firewall.

Local Progress appserver hosting a mobile service.

I use the standard log in script.

I get the "Failed to log in." error with different exception contents per browser. The exception is generated in Progress.session.js by the login method. FF give me failure error "NS_ERROR_FAILURE" when xhr.send(null) is executed (line 799). While IE gives "Access is denied." from _setXHRCredentials, when xhr.open(...) is executed (line 1055).

I get the same error "Failed to log in." also from native android application running on device. Running on mobile in a browser I get Network Error 101.

I also tried to add  <b:property name="allowAll" value="true" /> to OECORSFilter in appSecurity-anonymous.xml, with no effect.

Maybe someone faced the same issue and can give me a help.

Thank you.

Verified Answer
  • Hello,

    I just wanted to give you a couple of suggestions in case that they help.

    The errors that you are getting may also mean that you cannot connect to the machine.

    Are  you able to access  the URL directly from the web browser (you may want to try from a machine/device that is in your intranet as well as on the internet as you intent to use it from a mobile device)?

    (http://host:port/<service-name>/rest/<service-name>/<resource-name>)

    Do  you see any error messages in the JS Console?

    A CORS issue could occur if the web server serving the web page and the web server serving the data (Mobile Service) are on different domains (different host / port / or scheme). However, the setup for OECORSFilter allowAll=true should have worked.

    If you move the code of the app to the same server as the Mobile Service, does it work?

    (If it still fails then the problem is not CORS.)

    I hope this helps.

  • Hi,

    Do you see any network traffic at all when the xhr.send() is executed, either in the Network tab of your debugger or in a standalone HTTP monitor? What happens if you try the Chrome browser?

    Regards,

    Wayne

  • Hi,

    I found the error. The addresses to services were not accessible from outside.

    What confuses me was that the simulator from progress was working well while the one with local sources didn't.

    Checking the generated sources I see that even the progress simulator is using local browser to make service calls. It generates a set of js files which encapsulate the calls to services, these js files are run in the browser.

    Thanks,

    Daniel.

All Replies
  • This looks like a cross-domain issue.

    Please check if the catalogURI or the serviceURI point to the correct external address or use a relative path.

  • I use external address.

    I also think that is related to CORS.

  • Hello,

    I just wanted to give you a couple of suggestions in case that they help.

    The errors that you are getting may also mean that you cannot connect to the machine.

    Are  you able to access  the URL directly from the web browser (you may want to try from a machine/device that is in your intranet as well as on the internet as you intent to use it from a mobile device)?

    (http://host:port/<service-name>/rest/<service-name>/<resource-name>)

    Do  you see any error messages in the JS Console?

    A CORS issue could occur if the web server serving the web page and the web server serving the data (Mobile Service) are on different domains (different host / port / or scheme). However, the setup for OECORSFilter allowAll=true should have worked.

    If you move the code of the app to the same server as the Mobile Service, does it work?

    (If it still fails then the problem is not CORS.)

    I hope this helps.

  • Hi,

    Do you see any network traffic at all when the xhr.send() is executed, either in the Network tab of your debugger or in a standalone HTTP monitor? What happens if you try the Chrome browser?

    Regards,

    Wayne

  • Hi,

    I found the error. The addresses to services were not accessible from outside.

    What confuses me was that the simulator from progress was working well while the one with local sources didn't.

    Checking the generated sources I see that even the progress simulator is using local browser to make service calls. It generates a set of js files which encapsulate the calls to services, these js files are run in the browser.

    Thanks,

    Daniel.