no token found

15051
35
04-08-2016 08:30 PM
JanDucnuigeen
New Contributor II

I'm new to Web AppBuilder, and trying to follow the directions here:

Get started—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers

I've put the web app builder zip download in my C: direction, unzipped it, and ran the bat file.

The builder opens up my browser (Firefox) to this page:

http://[mymachinename]:3344/webappbuilder/?action=setportalurl

and gives me the option to specify the URL for my ArcGIS Online organization or portal. I put in my URL and I get a green check mark next to it.

Following the directions in the link above, I go into my content online, Add Item-> Application, and fill in the requirements, such as:

Type: Web Mapping
Purpose: Ready to use, API; Javascript

URL: http://[mymachinename]:3344/webappbuilder

Then add item.

After adding the item, I register it, using redirect URI as http://[mymachinename] and https://[mymachinename]

I then copy the App ID to the clipboard.

In the browser window that Web Appbuilder opened up, I click on the continue button after my

URL: [myorganizationname].maps.arcgis.com

Then it gives me the place to insert my App ID. I paste the app id I get earlier and press continue.

It then gives me a screen where it asks if I will approve or not: "Map 4 wants to access your ArcGIS Online account information" and there's a button to "Approve" or "no thanks". I click approve, and it them simply redirects back to my earlier URL input for my ArcGIS Online organization ([myorganizationname].maps.arcgis.com).

When I look at the command window for Web AppBuilder, there's a line that says:

"No token is found, redirect /webappbuilder to /webappbuilder/?action=setportalurl

This happens over and over, even when I create a new Web AppBuilder folder on my C: drive and try the process again with a fresh version. I always get the dredded "No token is found" line in the command window, and it redirects to the set portal url page. I've restarted my machine, closed browser, tried it with Chrome, and still the same problem. I've also tried registering the URI as

http://[mymachinename]:3344 and

https://[mymachinename]:3344

as well as

http://[mymachinename]:3344/webappbuilder and

https://[mymachinename]:3344/webappbuilder

but the result is the same.

What could be going wrong, or what am I doing  wrong?

Tags (1)
35 Replies
CharlesLetcher
New Contributor

This one helped me (finally). 3 days off and on.

What worked for me was: https (not http) AND internet explorer AND multiple redirect URLs AND lower case machine name.

0 Kudos
vipulsoni
Occasional Contributor

Hi,

 

I have tried all the above listed steps too.. unfortunately none of them work.

 

This seems to be a known problem with WebAppBuilder and without a documented solution or patch.

 

WAB Dev Edition - No Token Found, keeps on redirecting after Portal authentication and doesn't work at all.

 

 

0 Kudos
AmyKlug
Occasional Contributor III

Get your computer exact name from your PC (search "computer" and in Windows you should get a result: settings "view your pc name). This example the computer name will be 201587-a

Enter these re-direct URL's during the app registration process in Portal.  This example will use the domain esri.com

There should be 6 entries:

http://<MyComputerName>.esri.com or http://201587-a.esri.com

http://<MyComputerName>.esri.com:3344 or http://201587-a.esri.com:3344

http://<MyWebAdaptorName>.esri.com

https://<MyComputerName>.esri.com
https://<MyComputerName>.esri.com:3344
https://<MyWebAdaptorName>.esri.com

0 Kudos
MarcelFrehner
New Contributor III

I observed the exact same behavior as described by Jan. It works for me if I enter the portal URL using port 7443 instead of going through the web adaptor (examle: https://machine.domain.com:7443/arcgis  instead of https://machine.domain.com/portal) in the Web AppBuilder configuration.

I experimented with the allow origin setting in portal and I verified that my IIS has the following setting: <add name="Access-Control-Allow-Origin" value="*" />. But these settings did not resolve the original issue.

0 Kudos
JordanKing3
New Contributor III

I had the same issue with this.

I managed to get past it by:

  1. Setting Portal to HTTPS only.
  2. Deleting the WAB folder and re-extracting it, then running startup.bat again.
  3. I couldn't get it to work using https://<machine><domain>:3344/webappbuilder, so I just used HTTP only.

NOTE: I also set the same <machine><domain> in my Trusted Servers and Allowed Origins within the Portal Security settings. No idea what out of all of this was the solution...

0 Kudos
JustinO_Brien
New Contributor II

This behavior can be caused when using Portal if the sever is sending multiple Access-Control-Allow-Origin headers when the client makes a POST request to the oath2 endpoint.

This can be hard to diagnose, because when the error occurs the client is immediately redirected to the Portal domain selection page. To get around this, open the console on your ( modern, no Internet Explorer! ) browser by pressing CTRL + Shfit + i and then toggle 'Persist logs' in the console setting. You will now see every error and request that occurs while the tab is open. What you would be looking for is something like this:

Reason: Multiple CORS header ‘Access-Control-Allow-Origin’ not allowed

If this is the case, find your Portal site's web.config file, which should be in C:\inetpub\wwwroot if you are using the IIS default, and look for this group of tags:

<httpProtocol>
     <customHeaders>
       <add name="Access-Control-Allow-Origin" value="my.webappbuilder.domain:3344" />
     </customHeaders>
</httpProtocol>‍‍‍‍‍‍‍‍‍‍

Backup your .config file by copy-pasting the file and then rename it to old.web.config or something similar. After doing this, delete the code block from your file and save. Retry logging in to Portal via Web Appbuilder. You may have to refresh the site in IIS.

You should also check to see if the CORS module is installed on your IIS server. This module inserts a <cors> tag that handles CORS header settings, and can create conflicts if Portal has been set up to supply custom headers like the one above.

0 Kudos