function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
reddeadreddead 

Javascript Remoting running on mobile device always get VFRemote.js.map 503 (Service Unavailable)

I am using javascript remoting for a visualforce page to save some data, everything works as expected on desktop/pc (none of the errors below occured), but just not mobile device(using iphone 6 plus safari&chrome here ), it always gives this error below in the inspector console when page load initially:

[Error] Failed to load resource: the server responded with a status of 503 (Service Unavailable) (VFRemote.js.map, line 0)

when remote debugging on iphone using Safari web inspector,the error thrown as below. This was not happening when open page with any desktop browser though, only on mobile device

    controller.upsertData(record,
     function(result, event) {
         if(!event.status)
         console.log(event.message);
     }
    );

Visualforce Remoting Exception: Unable to connect to the server (communication failure).  VFRREmote.js:2318

Any ideas/hints would be appreciated.
bob_buzzardbob_buzzard
Not being able to get a .map file is benign - they are something that is used when debugging to trace a minified version of included JavaScript back to the full version. 

The communication failure indicates that the device couldn't make a connection to Salesforce. I see this intermittently when on 3G networks etc, and I've always put it down to moving in and out of range. It is always possible that remote calls will fail though, so its best to wrap them in try/catch and be prepared to retry.