Select to view content in your preferred language

no token found

16805
35
04-08-2016 08:30 PM
JanDucnuigeen
Deactivated User

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
JanDucnuigeen
Deactivated User

If anyone has any ideas on how to solve this problem that would be helpful - I am still unable to solve it even the the question is marked answered for some reason.

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

See if anything in Tips and Observations for getting Web AppBuilder - Developer Edition Installed    Or  http://www.tapasdas.com/WAB.pdf   help.

also recommend you check out my blog for many resources in many custom widgets, etc.

Web AppBuilder Developer Edition - Customization Resource List

0 Kudos
JanDucnuigeen
Deactivated User

Thank you Rebecca for those links. Unfortunately none of those suggestions worked - and I have gone through them in detail. I've configured and used internet connected applications before, but I'm stumped on this one.

The "no token is found" is always where it fails. My computer name has uppercase letters letters (and numbers) in it, and at first I thought it had to be related to this, but whether I try to make my URL's or URI's uppercase or lower case, the result is the same. What's also interesting is that when you start up the Web AppBuilder bat file, and it opens the Firefox browser tab, the URL in the browser line at the top has my machine name in lowercase, such as:

http://lowercasemachinename:3344/webappbuilder/?action=setportalurl

If I try and correct this by putting the uppercase letter as my machine name appears in my Windows 7 details into the browser URL and hit enter, the browser reverts my machine name to lowercase. I wonder if that is affecting the sync between the machine when making the connection for the oAuth?

The WAB.pdf document also described WAB 1.x, and I'm using 2.0 from the website and the options are different. In that document they used "localhost" instead of machine name. I tried that as well but no luck.

I'm also using a computer in a workgroup rather than a domain. The Tips and Observations site mentions the differences, and I've made adjustment to account for this, but still the same problem occurs.

When the failure occurs, I always see this in the command window:

[2016-04-11 16:51:55.589] [INFO] server - Set isXT = true;

[2016-04-11 16:52:13.748] [INFO] server - Set isXT = true;

[2016-04-11 16:52:21.736] [INFO] server - No token is found, redirect /webappbuilder/ to /webappbuilder/?action=setportalurl

Any other thoughts on things to try?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jan,

  That would indicate to me that the redirect urls you provided when you registered your app where input using lower case urls. Can you edit the app registration item in your AGOL account and check the redirect urls?

See the first item in the FAQ:

FAQs—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers

0 Kudos
JanDucnuigeen
Deactivated User

Thank you for your reply Robert. Yes, I've tried using lowercase several times (using either lowercase machine name, or lowercase "localhost"), and that doesn't get me any farther. Each time I try something different, I of course always start with a fresh folder and unzip the web app builder package as downloaded.

So to review: I set up a web application in my AGOL account, using any number of attempts at lowercase or uppercase machine name or "localhost" in the URL (with port number and the folder name) and the URI (only machine name or "localhost"), then register the app, get the app id. Then I unzip the web app builder in a fresh directory, double click on the startup.bat file, my firefox window opens and requests my portal URL, I enter that, the green checkmark shows up, I then enter my app id from before, click continue.The URL of the browser then switches to:

https://mymachinename.maps.arcgis.com/sharing/oauth2/approve?

oauth_state=a_very_long_alpha_numeric_character_set

and I get the option to approve the app I registered before. When I press approve, the firefox window resets, and goes back to requesting my portal URL. In the command window I see:

[2016-04-11 16:52:21.736] [INFO] server - No token is found, redirect /webappbuilder/ to /webappbuilder/?action=setportalurl

It doesn't matter how many times I go through the process, it never seems to get the token.

Just so you know, my actual machine name in windows uses uppercase. But whether I try this whole process using uppercase or lowercase, the URL that is returned when the firefox window first opens is always a lowercase.

Any other ideas?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jan,

  Your steps do not sound like they are exactly following the getting started guide for registering the app:

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

Also Have you tried a different browser?

0 Kudos
JanDucnuigeen
Deactivated User

Hi Robert, yes, I have tried Chrome as well. Same problem.

The steps I have been using all along are below. What part of this seems so obvious to you that I am doing wrong? It's exactly as in the instructions in the link. I've also followed step 7 in those instructions and it makes no difference.


1. I go to My Content, Add item, add application.

2. For URL, I add http://mymachinename:3344/webappbuilder, then web mapping, ready to use, javascript defaults, I give a title and tag. Add item.

(for machinename I've tried my actual machine name in lowercase and uppercase being consistent in the same way with step 4 below)

3. I click register.

4. App Type: browser. I add in http://mymachinename   (my actual machine name in lowercase or uppercase in what is consistent with step 2 above)

and add https://mymachinename

5. I click register.

6. I copy the app id.

7. I start the startup.bat file in a fresh directory. Firefox window opens, I put in my portal URL if it's not already there, and then paste in my app id into the appropriate box. Press continue.

8. The web page asks me to approve app. I approve.

9. Page refreshes back to asking me for portal ID. Command window shows no token was found.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jan,

Number 4 in the getting started guide can be a little unclear, the url that you should use is http://machinename:3344 and http://machinename:3344.

0 Kudos
JanDucnuigeen
Deactivated User

Yes, I've tried that as well before. It makes no difference. Even tried it again just now with the port number and the result is the same.

Other thoughts?

0 Kudos