{"id":7751,"date":"2015-02-10T12:42:30","date_gmt":"2015-02-10T12:42:30","guid":{"rendered":"https:\/\/test.simple-talk.com\/uncategorized\/sharepoint-apps-blank-page-displayed-when-navigating-to-app\/"},"modified":"2016-07-28T10:56:14","modified_gmt":"2016-07-28T10:56:14","slug":"sharepoint-apps-blank-page-displayed-when-navigating-to-app","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/blogs\/sharepoint-apps-blank-page-displayed-when-navigating-to-app\/","title":{"rendered":"SharePoint Apps: Blank Page Displayed when Navigating to App"},"content":{"rendered":"<p>I was trying to get a SharePoint app up and running in our environment but was running into a bit of an oddity.&#160; After clicking on our App&#8217;s icon in Site Contents, I was taken to a blank page.&#160; It wasn&#8217;t a SharePoint error page.&#160; It wasn&#8217;t an IIS error page.&#160; It was just a blank page. I happened to view source, and this is what showed up:<\/p>\n<p>&lt;html&gt;&lt;head&gt;&lt;META HTTP-EQUIV=&#8221;Content-Type&#8221; CONTENT=&#8221;text\/html; charset=utf-8&#8243;&gt;&lt;meta id=&#8221;quot;Robots&#8221;&#8221; content=&#8221;NOINDEX &#8221; \/&gt;&lt;\/head&gt;&lt;body&gt;&lt;\/body&gt;   <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;script type=&#8221;text\/javascript&#8221;&gt;    <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var gearPage = document.getElementById(&#8216;GearPage&#8217;);    <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(null != gearPage)    <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {    <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; gearPage.parentNode.removeChild(gearPage);    <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; document.title = &#8220;Error&#8221;;    <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }    <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;\/script&gt;    <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;\/html&gt;<\/p>\n<p>At this point I was even more confused.&#160; I thought it was something our company had done, because our logo is a series of gears and there is a section of JavaScript looking for an element called GearPage, but it turns out this is entirely from SharePoint &#8211; I have no idea what it is or what it&#8217;s trying to do, but it is from SharePoint.&#160; Another oddity is that I was getting this error when navigating to the App using HTTPS, but when I changed the protocol to HTTPS the app showed up just fine.&#160; <\/p>\n<p><strong>Solution &#8230; at least for one protocol<\/strong><\/p>\n<p>In order to access the app web, you have to be running the same protocol used in the default URL of your web application.&#160; In my case, I was accessing the App from a zone that used HTTPS.&#160; However, the default URL for the web application was using HTTP.&#160; As such, SharePoint threw up this friendly error page with nothing on it but some random JavaScript gibberish.&#160; When I switched my default URL to use HTTPS instead of HTTP, I was able to click on the App icon and have it launch correctly. <\/p>\n<p>Of course, I now have the same problem accessing the app web from HTTP, but since we mostly work in the HTTPS world this is &#8220;working&#8221; for me.&#160; I&#8217;m not sure at this point in time if there is a way to access it using both protocols.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was trying to get a SharePoint app up and running in our environment but was running into a bit of an oddity.&#160; After clicking on our App&#8217;s icon in Site Contents, I was taken to a blank page.&#160; It wasn&#8217;t a SharePoint error page.&#160; It wasn&#8217;t an IIS error page.&#160; It was just a&#8230;&hellip;<\/p>\n","protected":false},"author":46738,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2],"tags":[],"coauthors":[],"class_list":["post-7751","post","type-post","status-publish","format-standard","hentry","category-blogs"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/7751","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/46738"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=7751"}],"version-history":[{"count":3,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/7751\/revisions"}],"predecessor-version":[{"id":42465,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/7751\/revisions\/42465"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=7751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=7751"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=7751"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=7751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}