I have published builds of our PowerApp using 2.0.791 and 2.0.795 and started getting an error in the stock splash screen.
This error was not present on builds relesaed with PowerApps 2.0.762. I belive I have isolated the issue to the app's OnStart event (more details below).
This exact code is working fine on builds published 2.0.762. However, this code is generating errors in build 2.0.791. When I remove this code and publish it using build 2.0.762, the error goes away.
Has anyone seen similar issues? Or does anyone from the community / product team have any ideas?
I tried to republish using an older version of the studio referenced here, but am unable to open our Development environment using it.
Clear(collSessionAudio); LoadData(collSessionAudio, "ocollSessionAudio", true); LoadData(collPlansMaster, "ocollPlansMaster", true); Clear(collPreferences); LoadData(collPreferences, "ocollPreferences", true); If(CountRows(collPreferences) > 0, Set(searchFilterVal, LookUp(collPreferences, myFilter<>"", myFilter) ), Set(searchFilterVal, ""));
It seems that we are seeing similar inconsistencies as well. We've seen that doing a full uninstall / re-install of PowerApps has a positive affect on the random crashing.
We have also seen the app fully crash when it attempts to load. In these cases, we found that re-installing PowerApps helped.
I believe the issue is related to loading collections of cached data using LoadData() that are empty in the App Start event.
From what I understand, the error message 'There was a Problem Loading Your Data' will appear:
- When you call LoadData() when the cache doesn’t exist
- When SaveData() is used on an empty collection
That's the same issue I've been struggling with. I was wondering this:
I am calling SaveData() when the user exists a particular screen. I'm not checking to see if they have loaded the collection before calling SaveData(). My suspicion is that if the the collection is empty and it is saved, the error occurs when it is loaded again. I'll test this out and let you know what I find.
The other thought is that if your suspicion proves correct, how do we clear out any affected files from the device? Even if I use IsEmpty to check the collection for data before saving the file to the device going forward, there might be a file already on the device from a previous session that was saved from an empty collection.
I'm using the overload for the LoadData function already to ignore errors if the file doesn't exist. So this scenario seems to be covered.
Agreed. I also think that there may be a need for caching empty collections.
For example, we are caching Audio files that are collected while our app is disconnected. These files are held in the cached collection and then removed after they have been synced. We wouldn't want to keep a record of the these audio files in the collection after they are synced.
I am also wondering if we will still see the error while trying to load a collection that is empty due to Remove() or RemoveIf() calls vs. one that is empty due to a Clear().
I built a new app to test this out with - using the desktop designer version 2.0.820
I can also confirm that this bug is still not fixed even in 2.0.820 version! Whenever calling LoadData() with ignore errors parameter the error is still shown.
Call LoadData() with true value for ignore errors parameter on a file that was not saved before (no SaveData() called).
Expected - no error is shown to the user.
Actual result - error "There was a problem loading your data" is displayed...
How long can fixing something that was working fine in earlier versions of PowerApps can take? It is slready almost a month..
@claudiosvcc this error does not cause the app to crash, at least in my case
So what we have learned is the following:
1. LoadData () when used with the overload of "true" to avoid errors when the file does not exist is just broken (and is the real cause of the error). It is displaying the file-does-not-exist error even when using the "true" value to suppress it. We are waiting for Microsoft to fix this to avoid the error in the future.
2. The state of the collection does not matter when using SaveData (). Saving an empty collection to the device does not cause the error with LoadData, but the opposite is actually true that the LoadData function will no longer error since the file exists (even if it is empty).
3. There may be some work-around to use SaveData to create the offline files to avoid subsequent errors with LoadData. If the files exist, then the LoadData function will not error.
4. The error is not impacting the functionality of the application. If the application is unable to Load the data from the device because the file does not exist, the rest of the application will work normally.
Now it seems that I may need to re-think my logic based on #3, so that I can create the files on the device before needing to use them (to avoid subsequent errors). This I have to weigh vs the likelihood that Microsoft will fix the LoadData bug soon. 😞
Keep up to date with current events and community announcements in the Power Apps community.
Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.
Check out the latest Community Blog from the community!