Select to view content in your preferred language

Directions widget Error in Web Mapping App

3601
4
09-09-2015 10:29 AM
VictorBelogurov
Deactivated User

Hi all.

I developed Web Mapping Application with Directions widget. It works fine in  Web AppBuilder for ArcGIS.

But it calls errors in Web App Viewer:

"    init.js:1488 dojo.io.script error Error: Token Required

    at Error (native)

    at Object.h.load (http://js.arcgis.com/3.14/init.js:896:343)

    at http://js.arcgis.com/3.14/init.js:181:69

    at c (http://js.arcgis.com/3.14/init.js:66:221)

    at d (http://js.arcgis.com/3.14/init.js:66:10)

    at resolve.callback (http://js.arcgis.com/3.14/init.js:67:350)

    at c (http://js.arcgis.com/3.14/init.js:66:436)

    at d (http://js.arcgis.com/3.14/init.js:66:10)

    at resolve.callback (http://js.arcgis.com/3.14/init.js:67:350)

    at http://js.arcgis.com/3.14/init.js:1486:46 "

and I don't set beginning and stopping points.

Please, help me with Directions widget.

0 Kudos
4 Replies
VictorCoelho_EsriCanada
Esri Contributor

Hello Victor,

Could you please confirm the version of Web AppBuilder that you're working with (Online/Portal or Developer) ?

0 Kudos
VictorBelogurov
Deactivated User

I work with Web AppBuilder Online/Portal.

0 Kudos
VictorCoelho_EsriCanada
Esri Contributor

Did you deploy the App on your Web server ? If yes, take a look at this document : Deploy app—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers

The application can be reached from outside of your organization ? I was able to create an application with the Direction Widget without issues.

According to the AppBuilder documentation the use of the Widget require an ArcGIS Online for Organizations subscription  , check the doc here :

Directions widget—Web AppBuilder for ArcGIS | ArcGIS

0 Kudos
QunSun
by Esri Contributor
Esri Contributor

Hi Victor,

It's not an error of WAB. By default, Directions widget use route service. If the route service is private, when accessing this private service by arcgis-js-api, you will get a "Token required" error and arcgis-js-api will automatically print this erron on console. It is the API's normal behaviour. After get the error info, API will send another request with token to access the private route service. So all works fine.

arcgis-js-api always prints errors on console and it doesn't matter. Forget it !