AnsweredAssumed Answered

esri new Portal(myUrl) returns a dojo error: CancelError “All requests canceled”

Question asked by David.Wendelken on Dec 6, 2016
Latest reply on Dec 8, 2016 by David.Wendelken

Esri ArcGis Javascript API 3.18

I'm issuing a new Portal("myUrl") command and getting back an error.

It's a dojo error, "CancelError" "All requests canceled."

It's a new https installation of the api on a new federated portal.

I have code that works when calling the esri portal so I think my code is probably correct. That would leave a installation configuration problem. So far, I'm stumped.

My test web site is on the same webserver as the portal.

Here's a link to the plunkr with working code against Esri servers:

https://plnkr.co/edit/RFlStZbHA5axAD3J2KQt?p=preview

Any ideas?

Here's the code:

<!DOCTYPE html><html>  <head>    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">     <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">    <title>New Portal</title>     <link rel="stylesheet" href="http://js.arcgis.com/3.18/esri/css/esri.css">  </head>  <body>    <div id='mainContent'>      <input id='message' value='initial value' />    </div>     <script>var dojoConfig = { parseOnLoad: true };</script>    <script src="https://js.arcgis.com/3.18/"></script>    <script>    dojo.require('esri.arcgis.Portal');    dojo.require("esri.IdentityManager");    dojo.require("dojox.lang.aspect");     var portalUrl = 'https://www.arcgis.com';    var portal = null;    var message = document.getElementById('message');     var init = function() {      message.setAttribute('value', 'pre new portal');      portal = new esri.arcgis.Portal(portalUrl);      message.setAttribute('value', 'past new portal');      portal.on("error", function(errorMsg) {         message.setAttribute('value', 'error=' | errorMsg.message);               });      portal.on("load", function (data) {         message.setAttribute('value', 'success');               });

Outcomes