Select to view content in your preferred language

Many issues (solved/unsolved) on OFFLINE installation of EXB and questions related.

4167
5
02-18-2021 07:35 AM
AlexisCuicui
Emerging Contributor

Dears,

I have installed EXB v1.3 , in Offline mode connected to a portal.

Problem 1 : Solved :

First i couldn't access the interface, an error message was displayed :

"Experience Builder developer Edition requires an ArGIS organization account with user type that includes privileges to create content"
(From client/dist/jimu-core : roleError2).

I was trying to connect with Portal administrator account (so full rights) on the experience Builder. I tried 3 accounts with various permissions but none was able to connect.

Solution :

After some digging, i just found out in the file :
client/dist/jimu-core/index.js
On line 28, Col 134408 there is a request on portal to "ValidateAppAccess" :

 

var a = 0.portal+"/oauth2/validateAppAccess?clientId="+t;

 

The t variable in the request is a string which contains the NAME of the application (printed in the console : "experienceBuilder").

The rest request "ValidateAppAccess" requires an AppID. So by changing the t variable with o.clientId :

 

var a = 0.portal+"/oauth2/validateAppAccess?clientId="+o.clientId;

 

The Interface showed up.


Problem 2 : Solved :


After those steps, i tried to create an application, when I added the map widget and tried to load a WebMap already prepared (from Portal).
The Widget keep spinning loose.

I had the same issue as @DaveFullerton on the CMD prompt (only once) :

 

server error read ECONNRESET

 

I had several Error Message in my Browser Console (look at the attached file : Console_error_COR.png).

 

Solution : 

After looking in the documentation, I've seen that API 4 assumes that CORS is enabled on server. I have enabled CORS requests on my IIS (Config_XML_CORS.png) and the problem was solved, but two points intrigues me :


- Why do we need CORS for the same domain :


https://HOSTNAME:3001
https://HOSTNAME/arcgis_api_js/library/4.18 

- Why would the builder need CORS to load the API files (when the WebAppBuilder Dev Edition doesn't need it) ?

 

Problem 3 : Unsolved :

When the map widget is initiated with various Webmapps, the switch icons are not well set (look at the attached file : WebMap_icon_fail.png).

It appears that the source image is a request on the portal rest but the request is false :

 

https://HOSTNAME/portal/sharing/rest/content/items/0686a4a2477d42c19ba838a317386875/info/null?token=XXXXXXXXXXX.

 

(Where token is an available token)

The request return an error 404 : 

Error404rest.png

I stopped digging, but i suspect many requests to be false when trying to reach portal informations.


So here are my questions :

Is it an issue that API JS 4.X can't load in the experience Builder or is it a normal behavior which need CORS enabled or proxy set-up ?

Why are the requests wrong, are they made for Online set-up ? 

-----------------------------------------------------

The last thing I'd like to report, it's the slowness of the refreshing layers when the experience is started or when the extent/zoom is reset. 

Best regards,

A.C

5 Replies
by Anonymous User
Not applicable

Hi Alexis,

I don't have an answer, but have had similar problems (not exactly the same though). A question - it sounds like you're connecting to ArcGIS Enterprise (on premise portal), not ArcGIS Online? If so, which version of Enterprise are you using?

0 Kudos
AlexisCuicui
Emerging Contributor

Hi,

I am using ArcGIS Enterprise10.7.1 on IIS (Windows).

0 Kudos
by Anonymous User
Not applicable

I sent you a direct message, Alexis.

0 Kudos
Junshan_Liu
Frequent Contributor

Hi @Anonymous User ,

The "https://HOSTNAME:3001" and "https://HOSTNAME" should be considered as two domains I think.

The reason why the CORS is required is: EXB is using system.js to load scripts dynamically. For security reason, system.js add “script.crossOrigin = 'anonymous'”, but this property requires the CORS headers

0 Kudos
AlexisCuicui
Emerging Contributor

Indeed HOSTNAME and HOSTNAME:PORT are considered as different domains for requests. It still is strang that WebAppBuilder Developper doesn't need CORS to acces API while using a different domain.

Thank you for the answer, but would you mind to developp "for security reason" pls ?

0 Kudos