cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JayKae
New Member

PowerApps - Cannot read property 'getSelectedItem' of undefined in browser

Good Morning!

 

I came in to work today to email stating that an app that had been working on Friday was not working today.  The app loads and pulls information from the database, but then errors out.  I have a gallery on the left side which displays people, when selected their information shows on the right side of the screen.  I reference it like the galPeople.Selected.FirstName, etc.

 

Everything works fine in the designer, I am able to see information load and change.  When I load it up in the browser I get my people loaded on the left side but no matter who I click on nothing loads for me.  I get the following JS error in the Chrome console.

 

Uncaught TypeError: Cannot read property 'getSelectedItem' of undefined
    at r.l.onBeforeGetSelected (ProxyStaticContent?staticContentPath=https%3A%2F%2Fcontent.powerapps.com%2Fresource%2Fapp%2Ffh7ns4gi2lm08%2Fctrllib%2Fgallery%2Fjs%2Fgallery.js:1)
    at ControlWidget._callControlMethodByName (ProxyStaticContent?staticContentPath=https%3A%2F%2Fcontent.powerapps.com%2Fresource%2Fapp%2F2nnbp26grmau2%2Fpublish%2Fjs%2Fpa.common.bundle1.js:1)
    at ControlWidget._getPropertyValueOnBeforeMethodCall (ProxyStaticContent?staticContentPath=https%3A%2F%2Fcontent.powerapps.com%2Fresource%2Fapp%2F2nnbp26grmau2%2Fpublish%2Fjs%2Fpa.common.bundle1.js:1)
    at ControlWidget.getPropertyValue (ProxyStaticContent?staticContentPath=https%3A%2F%2Fcontent.powerapps.com%2Fresource%2Fapp%2F2nnbp26grmau2%2Fpublish%2Fjs%2Fpa.common.bundle1.js:1)
    at r.o.getPropertyValue (ProxyStaticContent?staticContentPath=https%3A%2F%2Fcontent.powerapps.com%2Fresource%2Fapp%2F0sh5q7i3qhgc0%2Fpublish%2Fjs%2Fpa.core.bundle1.js:7)
    at _re6.112.Visible (initScreen_1.js?sv=2018-03-28&sr=c&sig=JRneqcz3luh6ILPvCwZrT5%2BRE4omkyBOogeOsFNAczA%3D&se=2019-06-18T00%3A00%3A00Z&sp=rl:1202)
    at r.o._runPropertyRuleInternal (ProxyStaticContent?staticContentPath=https%3A%2F%2Fcontent.powerapps.com%2Fresource%2Fapp%2F0sh5q7i3qhgc0%2Fpublish%2Fjs%2Fpa.core.bundle1.js:7)
    at r.o._runPropertyRule (ProxyStaticContent?staticContentPath=https%3A%2F%2Fcontent.powerapps.com%2Fresource%2Fapp%2F0sh5q7i3qhgc0%2Fpublish%2Fjs%2Fpa.core.bundle1.js:7)
    at r.o.runDependentRules (ProxyStaticContent?staticContentPath=https%3A%2F%2Fcontent.powerapps.com%2Fresource%2Fapp%2F0sh5q7i3qhgc0%2Fpublish%2Fjs%2Fpa.core.bundle1.js:7)
    at _re5.54.AllItems (initScreen_1.js?sv=2018-03-28&sr=c&sig=JRneqcz3luh6ILPvCwZrT5%2BRE4omkyBOogeOsFNAczA%3D&se=2019-06-18T00%3A00%3A00Z&sp=rl:445)

I tried changing some of the experiemental settings and disabling them.  When I saved it, I noticed I had a new version of PowerApps had been published.  Everything was initially published with PA Release 3.19054.15, now I have 3.19061.14.

 

I tried clearing my cache, using the Win 10 desktop application (the same issue occurs), using different browsers (Edge, Chrome, and Firefox tested) and all the same issue.  This is impacting other users of the app so I do not believe it is my machine, but something up in the cloud.  I did test my other apps and they all seem to be working, so it may be related to just this one app.  But is is odd that it works in development with no errors when using the Error Check feature but does not work in production.

 

Can anyone provide any assistance?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
JayKae
New Member

Re: PowerApps - Cannot read property 'getSelectedItem' of undefined in browser

So after spending several hours it appears that it was a combination of the following Preview and Experimental Features:

  • Delayed Load
  • Use non-Blocking OnStart rule
  • Explicit Column Selection
  • Try the enhanced Group control (Experimental)

I kept changing and republishing, clearing cache and refreshing, and these combined seemed to be what caused the issue.  When I disabled them all one by one the problem persisted, but when I had them all disabled everything (mostly) worked.  I neded up having to tweak a few things in the app itself to get the desired behavior back as the Delayed Load and OnStart rules were causing issues with them off.

View solution in original post

2 REPLIES 2
Highlighted
JayKae
New Member

Re: PowerApps - Cannot read property 'getSelectedItem' of undefined in browser

So after spending several hours it appears that it was a combination of the following Preview and Experimental Features:

  • Delayed Load
  • Use non-Blocking OnStart rule
  • Explicit Column Selection
  • Try the enhanced Group control (Experimental)

I kept changing and republishing, clearing cache and refreshing, and these combined seemed to be what caused the issue.  When I disabled them all one by one the problem persisted, but when I had them all disabled everything (mostly) worked.  I neded up having to tweak a few things in the app itself to get the desired behavior back as the Delayed Load and OnStart rules were causing issues with them off.

View solution in original post

Community Support
Community Support

Re: PowerApps - Cannot read property 'getSelectedItem' of undefined in browser

Hi @JayKae ,

 

What is the data source that you use for this app? Can you please share the related formulas too?

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (4,914)