Directions Widget doesn't work with a custom NAServer

1140
8
08-26-2016 11:48 AM
CarlosSousa_Ferreira1
New Contributor III

I've created a Web Mapping Application using the WebApp Builder and tried to add a Directions Widget configured with a custom (public) NAServer, but it doesn't work: it keeps trying to load the service (see image below) and then it gives me an error of service "not found or not recognized" and suggests me to check the URL and/or credentials.

The NAServer is public, so there is no need to provide any credentials, and the URL is check and recognized automatically when you set it in the configuration form of the widget.

The routing service of the NAServer works fine, as I successfully used it in ArcMap.

I even accomplished to set a sample application, using the code provided in: Directions | ArcGIS API for JavaScript 3.17 , and it works fine, as shown in the image below:

The problem seems to be with the configuration of the directions widget.

I already tried to download the application and check the configuration code for the widget, but with no success.

Any thoughts / suggestions? Thanks.

0 Kudos
8 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Carlos,

   Have you checked your browsers web console to see if the error(s) there shed any light on what your NA Service is missing that the widget is looking for?

0 Kudos
CarlosSousa_Ferreira1
New Contributor III

Just tried it.

It gives the following warning:

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Carlos,

  does the spinning icon ever go away? if so what does the web console say then?

0 Kudos
CarlosSousa_Ferreira1
New Contributor III

It takes quite some time, but yeah. It then fires a "Timeout exceeded" error on the console.

In the widget it gives me a message of service "not found or not recognized" and suggests me to check the URL and/or credentials.

The routing service that I'm using it's from an HTTPS server. Could the problem be that it is trying to access the service through HTTP and receives an error? If so, how can I correct this?

Thanks

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Carlos have you tried in a browser other than Chrome?

0 Kudos
CarlosSousa_Ferreira1
New Contributor III

Hi, Robert,

Actually I hadn't :-P...  I works in Internet Explorer!

I've then cleared the cookies and browser data from Chrome, but the problem persists

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Carlos,

   Chrome has had some issue with esri requests and https. One way around is to use a proxy.

0 Kudos
CarlosSousa_Ferreira1
New Contributor III

OK. Thanks for your efforts.

0 Kudos