cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JayKae
Level: Power Up

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
JayKae
Level: Power Up

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.

2 REPLIES 2
JayKae
Level: Power Up

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.

Community Support Team
Community Support Team

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
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 370 members 4,688 guests
Please welcome our newest community members: