D365 Hacks: The Browser Strikes Back
If you've worked with Dynamics 365 long enough, you know that some error messages are helpful. And some are...well...not quite as helpful.
Today’s Problem
Yesterday, I was working on a custom Dynamics 365 CRM app when I was greeted with the below upon log in: "An error has occurred. Please try again. If the problem persists, contact your system administrator."

I could not load any table (custom or system). What an ironic error message since I am the sys admin!

The app existed in my solution. The Dataverse data was there. An agent and Power Automate flow connected to the app and its data were working perfectly.
So, this started a troubleshooting rollercoaster. And, as it turned out, the problem wasn't the app, the solution, Dataverse, or even the tables.
It was my browser. Here's how I worked it out and eliminated some other suspect issues in the process, the D365 Hacks way.
Troubleshooting Steps – Yes, Your Highnessness?
Step 1: Check whether the app still exists
Upon checking in the maker portal, the app was definitely present under: Solutions > [My Solution] > Objects > Apps
It also had a valid unique name I could use for further investigations: ang_SmartHotel365

So, it hadn't simply disappeared.
Step 2: Try opening the app directly
I tried opening the app using its unique name in a direct URL.
Here is how YOU can also construct it yourself in case you do not have it bookmarked somewhere.
From the maker portal and the Session details, get the Instance url:

At the end of the link, add “/main.aspx?appname=<appName>” thanks to the unique Name of the app found above
In my normal browser session, it still did not work. Gave me once again the error message.
But, when I tried the same link in an Incognito session, it worked! That was my first big clue. The app wasn't actually missing.
Step 3: Verify the AppModule - Our first OData catch of the day
The resulting URL gave me the App ID once the app loaded with a URL like:
<Instance url>/main.aspx?appid=<App ID>
I then queried Dataverse to confirm that the AppModule existed through the Web API URL. To do that, I constructed the following:
<Instance url>/api/data/v9.2/appmodules(<APP ID>)?$select=name,appmoduleid,uniquename
The API returned the app details as expected. The format may look odd but do not worry.

So now I knew: the Dynamics 365 app existed and Dataverse could resolve it.
Step 4: Test a table directly
Next, I wanted to know whether this was really an app problem.
I opened the Account table directly through the main browser session:
<Instance url>/main.aspx?pagetype=entitylist&etn=account
And got once again: "An error has occurred. Please try again. If the problem persists, contact your system administrator."
Interesting. Once again, when I tried the Incognito session, it worked. Also, I could see the Account data perfectly well in the Maker Portal, but the Dynamics 365 interface couldn't load it in a normal browser session.

It was now clear as day: The app wasn't broken. The tables weren't broken. The environment wasn't broken.
That was the breakthrough. Something in my normal browser session was interfering with the Dynamics 365 experience.
Step 5: Clear the browser site data
I went into Edge's site-data settings to clear a few things up:
In the normal Edge window, I opened the affected Dynamics 365 app
Clicked the padlock/site information icon to the left of the address bar
Selected Cookies and site data and then cleared the relevant stored data for the Dynamics 365 environment, Power Apps and just to play it safe the rest of the Microsoft sites
Closed all Dynamics 365 and Power Apps tabs
Completely closed Edge
Reopened Edge and signed back into Dynamics 365
Opened my impacted Dynamics 365 app again and tested the tables
Lo and behold. Everything worked.
The app opened. The tables opened with the right data. The error was gone.
Ah! A great warrior. (Dataverse) Wars not make one great.

To summarize the troubleshooting journey:
So, if you hit a similar problem, here's the sequence I'd recommend:
Check the Dynamics 365 exists in the solution.
Try opening it using its unique name.
Use the resulting URL to identify the App ID.
Verify the AppModule through the Dataverse Web API.
Try opening a standard table directly.
Try the same thing in an Incognito window. If it works there, clear the relevant Dynamics 365/Power Apps site data and restart the browser.
Adventure. Heh! Excitement. Heh!
See you at the next D365 Hack read.
.jpg)








Comments