Select to view content in your preferred language

Portal User Information Undefined Sometimes in Developer Edition 1.14

6271
23
09-12-2024 10:46 AM
Labels (1)
JeffreyThompson2
MVP Frequent Contributor

I am using Developer Edition 1.14 with ArcGIS Enterprise 10.9.1 with SSO authentication. My Experience Builder application will sometimes load in a state where certain features are unavailable. I believe this is caused by an error in how the 10.X version of ArcGIS Enterprise handles SSO authentication because of issues seen in previous versions of Experience Builder and the errors I am dealing with.

This issue was originally discovered in a custom widget that accessed the props.user attribute to apply some user based customization to my application. Sometimes the site would load as expected, other times the props.user attribute would be undefined resulting in the widget crashing. It would often take multiple reloads for the error to clear itself and the site to load correctly. The most reliable way for triggering this error appears to be making some connection to the ArcGIS Enterprise Portal then allowing it to go stale for about an hour and then refreshing the application. The most reliable way for clearing the error is to first visit the Portal homepage and then loading the application. This same code worked reliably in Experience Builder 1.12.

After wrapping the offending code in an if statement, so it would not crash the whole application. I discovered additional issues related to this error.

  • The OOTB Add Data Widget could not access any information from the Enterprise Portal. It could still access ArcGIS Online.
  • Using code based on this post, I am adding layers as Experience Builder datasources. When not in this error state, this allows me to use the Select Widget and Data Actions. But when this error state occurs, these features are unavailable.

Is this a known bug? Has it been resolved in 1.15? Is there a known fix or work-around?

GIS Developer
City of Arlington, Texas
0 Kudos
23 Replies
Junshan_Liu
Frequent Contributor

With SSO, do you mean the ExB developer edition is deployed under the same domain as the portal?

 

In your case, you mean the props.user exists after login, then about 5 minutes later, this prop is changed to null?

0 Kudos
JeffreyThompson2
MVP Frequent Contributor

The project is deployed to the same server with the ArcGIS Web Adapter. The Enterprise Portal is federated on a different server.

GIS Developer
City of Arlington, Texas
0 Kudos
SJehle3
New Contributor

I'm running into the same issue with a similar setup. We are using ArcGIS Enterprise 11.1 with IWA enabled and have an experience built in version 1.16 deployed to our web adaptor servers. The first time a user browses to the application, everything seem to work accordingly. After some time or a cache clear, the ability to search our enterprise using the Add Data tool goes away as well as other functionality such as the related data action and the elevation profile tool. The attached picture is the request and response sent after opening the Add Data tool.

Has there been any progress on this issue?

0 Kudos
BenFerguson
Occasional Contributor

I'm developing a custom widget for a client and am seeing the same portal.user being null issue in their SSO environment after initial success.  Sometimes refreshing a Portal window on the same browser will fix the problem but it does come back. 

We are using Exp Builder 1.16 and Enterprise 11.1.  I've not seen it during development using our own environment using built-in logins.

0 Kudos
Junshan_Liu
Frequent Contributor

Thanks for your feedback! We save the token in local/session storage, I believe this is caused by the saved token is expired. Could you check the following when you see the issue next time?

* Open browser developer tool

* Open Application tab

* In the Local/Session storage, find "exb_auth" key, check whether the token is expired

 

0 Kudos
BenFerguson
Occasional Contributor

Thank you for responding.  I did some more testing and when it is successful, there is an entry for "exb_auth", when it is not successful, there is no "exb_auth" key at all.  The pertinent data is visible in "Esri_recent_webmaps" however.

But your question led me to look at the fact that I had not registered this app with Portal.  This app was copied from another computer.  Once I did register the application, it seems to be working properly now.

0 Kudos
JeffreyThompson2
MVP Frequent Contributor

I can confirm that registering with the Portal did not work for my application.

GIS Developer
City of Arlington, Texas
0 Kudos
BenFerguson
Occasional Contributor

Further testing on my application shows that it improved my success rate, but it still comes up empty part of the time.

0 Kudos
JeffreyThompson2
MVP Frequent Contributor

JeffreyThompson2_0-1743694586403.png

I just upgraded to Developer Edition 1.17 and the issue is still present.

GIS Developer
City of Arlington, Texas
0 Kudos
JunshanLiu
Esri Contributor

We fixed the OAuth2 PKCE token expiration issue in 1.17. But it seems the web-tier portal may still have this issue. If you still see this issue in the 1.17, could you please help confirm whether you are using the web-tier authentication?

0 Kudos