1

Need to check whether MFP server up and running, if server not reachable, need to alert user that system is down.

i have used the below code

renderer.listen('document', 'mfpjsloaded', () => {
  WLAuthorizationManager.obtainAccessToken("").then(
  function(accessToken) {
    console.log("MFP Server is up and running");       
 },
 function(error) {
   console.log("MFP Server is not reachable");
 }
);

});

but app throws Application Error The connection to the server was unsuccessful. (file:///android_asset/www/index.html)

Vignesh
  • 375
  • 1
  • 2
  • 13
  • can you please update with console/server log – Gaurab Kumar May 08 '18 at 05:10
  • couldnt see anything in log also, before it reaches the FAILURE. App throws that error – Vignesh May 08 '18 at 06:17
  • at least take a screenshot of your error that displaying on mobile and post it. – Gaurab Kumar May 08 '18 at 06:32
  • The error callback provides you with a detailed error message. Provide the error message `function(error) { console.log("MFP Server is not reachable" + JSON.stringofy(error) ); }` – Srik May 08 '18 at 11:36
  • obtainAccessToken() connects to the server and gets you a token. Then on, as long as the token is valid, it does not re-make a call to the server. For the current error, post the output of the error callback – Vivin K May 08 '18 at 20:35
  • am getting "Failed to connect to IPADDRESS", how to differentiate whether SERVER is down or Adapter failed due to network drop ? – Vignesh May 09 '18 at 10:05
  • What JSON.stringofy(error) says ? this would help you to differentiate . – manjunath kallannavar May 10 '18 at 09:47
  • Is there any document or link to check the ERR CODE and ERR MESSAGE in MFP 8.0 ? – Vignesh May 14 '18 at 02:48

0 Answers0