Experience Builder - Cannot read property ‘background’ of undefined

2180
12
Jump to solution
07-09-2020 09:28 PM
StephenUsmar2
New Contributor II
  • I am trying to launch Experience Builder from my AGOL account and keep getting the error message "Cannot read property ‘background’ of undefined”. This is not consistent and occasionally/rarely can get through. This is also happening for 5 others in my team from our organizational account. All other web apps work fine.
  • It doesn't happen with another organizational account we manage for a customer so isn't PC, network related (we all work from separate locations). 
  • Only changes recently have been to our short url for AGOL, accepted the HTTPS requirement and accepted the template Homepage for AGOL.
  • All users are User Type = Advanced and all have the Addons for the web apps. 

This is stopping a significant development for us using the new & updated tools from Esri so would like it resolved. Any input and ideas really appreciated.

Tags (2)
1 Solution

Accepted Solutions
YiweiMa
Esri Contributor

This issue is caused by the header, button, or body properties in the sharedTheme object returned from the Portal to be null. Usually, it would return an object as:

{ header: {}, body, {}, button: {}, ... }, which the properties are not empty.

I will look into this, and in the meantime, please add a logo, or colors to the header, button, or body to force the sharedTheme to not be null. 

View solution in original post

12 Replies
shaylavi
Esri Contributor

Hi Stephen,

What browsers are you using at your organization?

Have you tried running it on the latest version of Chrome or other modern up-to-date browsers? it sounds like compatibility issues.

I assume you found that error in the console view of the developer tools?

Shay

Shay
JimKyle
New Contributor II

I am having the exact same issue.  It seems specific to an AGOL account.   When I use one AGOL account with Chrome - launching Experience Builder works but when I use a different AGOL account launching Experience Builder (in any browser Edge/Chrome/Firefox) results in "Cannot Read property 'background' of undefined". 

JunshanLiu
Occasional Contributor III

@Stephen Usmar can you post the console error screenshot? This may help us find the reason.

0 Kudos
DeidreWolf
Esri Contributor

Have you checked the network traffic for any errors? Are there any errors with the shared themed settings? If you adjust a shared themed setting in the organization, does the error go away?

0 Kudos
JimKyle
New Contributor II

Hi. Esri Canada informed me to try deleting a custom logo I had in shared themes and that fixed the problem.

0 Kudos
Randall_LewisHealth___Policy_F
New Contributor II

I am having the same issue with Firefox, Chrome, and Edge. All have been updated and all other web programs of ESRI's work fine. I'm am only having issues with Experience Builder. F12 reviels this under the console:

F12 under console reveals this:

index.js:44 Initializing theme manager failed. TypeError: Cannot read property 'background' of undefined
    at Object.t.getMappedShareThemeVariables (index.js:29)
    at e.generate (index.js:11)
    at e.mergeThemeVarsToJimuVars (index.js:16)
    at eval (index.js:16)
    at eval (index.js:16)
    at Object.eval [as next] (index.js:16)
    at a (index.js:16)
eval @ index.js:44
index.js:29 Uncaught (in promise) TypeError: Cannot read property 'background' of undefined
    at Object.t.getMappedShareThemeVariables (index.js:29)
    at e.generate (index.js:11)
    at e.mergeThemeVarsToJimuVars (index.js:16)
    at eval (index.js:16)
    at eval (index.js:16)
    at Object.eval [as next] (index.js:16)
    at a (index.js:16)

0 Kudos
YiweiMa
Esri Contributor

Hi, I am a developer from the Experience Builder dev team.

Can anyone post a screenshot of the settings within the Shared theme setting if you don't mind? It is located at Organization/Setting, then click Manage shared theme colors.

I will try to reproduce this issue and see what is going on.

Randall_LewisHealth___Policy_F
New Contributor II

DeidreWolf
Esri Contributor

Randall Lewis Health & Policy Fellowship‌ in the Shared Theme settings, I would change the background color to white and see if that resolves the issue.