SharePoint 2016 Mobile View Not Working On Mobile Devices

Issue

The last couple of days, I got stuck in an issue in which whenever the users browsed the sites on their mobile devices, the Mobile View was not working and it showed a blank page with site collection name written on the top left along with a mobilesuite navbar in the bottom of one of the SharePoint 2016 on-premise farms. When they clicked on the ellipsis and switched to the PC View, nothing happened. It showed just a blank page.

SharePoint 2016 Mobile View Not Working On Mobile Devices

While troubleshooting, if they clicked on the "GoTo" button, it threw the following error message.

"Sorry, it seems like your connection is too slow. Try connecting to Wi-Fi or going somewhere with better reception."
 
SharePoint 2016 Mobile View Not Working On Mobile Devices
 
I have multiple SharePoint farms with different configurations, so I tested the same scenario on two farms. One farm was where I have a User Profile service along with MySite host and the second farm is where the User Profile service is without MySite Host. I tested the below scenario on both, iOS as well as Android, devices and also tried Safari, Chrome, and Samsung browsers.

Farm with UPA and MySite host

When I perform the testing in this farm, I am able to browse the SharePoint sites on mobile devices as well as in the browser. Perfect!

Farm with UPA but no MySite host

When I performed the testing on this farm, I was unable to browse the sites on the mobile devices. That's pain.

As per the documentation, there is no such requirement of UPA along with MySite host for browsing the sites on the mobile devices. Now, I moved to the next step to deep dive into it and checked what the root cause was.

ULS logs

There is nothing in ULS logs for me even with Verbose logging. I tried different categories but got no clue over here. I used the F12 Developer tool (I configured my browser so it acts as a mobile browser).
 
In the working farm
 
If I browse the sites on mobile, I noticed it loaded the following JS files.
  • mblappbar.js
  • mblsuitenav.js
  • touchappstrings.js
  • touchapp.js
  • mylinks.js

SharePoint 2016 Mobile View Not Working On Mobile Devices
 
It rendered the page properly without any error in the developer tool.

In the non-working farm

I opened the sites in a mobile browser and noticed that all the JavaScript files were loading properly except mylinks.js which was not loading at all. After further checking the mylinks.js file, I came to know that this is the file which looks for the information from person.aspx page and that puts the dependency on MySite host. Because we don’t have the MySite host configured in this farm, so there was no person.aspx page, which is where the Mobile View got broken on the mobile devices.

Now, it is a blank page with nothing on it. In developer tools, it showed the error on loading the touchapp.js file. This is the main file which makes calls to all the other JavaScript files.

SharePoint 2016 Mobile View Not Working On Mobile Devices

So now, the question arises why this dependency. To get the answer, I contacted MSFT. As per MSFT, it is a bug and they will fix it in future updates.

Resolution

I created a MySite host site collection and configured it inside of the User Profile Service’s MySite settings. I removed the permission for everyone because we don’t want anyone to create the MySite host on this farm. As soon as the stuff was configured, everything started working as expected.

If you don’t have the MySite host configured in your farm then you will get into this problem. You have to create a MySite host in order to make the mobile view work properly.

Note
If you don’t allow MySite for your users, then you have to remove the permissions from the MySite Host page so that no one can create a MySite page.

Hope this will help you for now. I will update once they release the fix for this one. By the way, this problem exists in SharePoint 2019 preview as well.