cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DSut
Advocate I
Advocate I

Power Apps launch function blocked by browsers

Hi,

One of my canvas apps contains URL based hyperlinks to files in our web based document management system.

I use the launch function in my app to open file links in a new browser tab. 

This works for the first link clicked in the browser session but subsequent links produce the following browser error message:

Your request originated from a website that Content Server identified as potentially unsafe.

I have confirmed that this is actually a browser security issue and not related to our document management system's settings. 

I only see this error message when the app has been accessed via a link (desktop shortcut, email link, MS Teams 'go to website' icon etc).

Playing the app from make.powerapps.com fixes the problem and all linked files launch without error. 

I've narrowed down the issue and found that when the app is accessed via a link the URL automatically receives &skipAppMetadata=true as an additional parameter. 

If this parameter is removed or manually set to false then the launch function works as expected.

The problem I have is if I set it to =false in my URL links, it is automatically changed back to true on most, but not all instances. 

Does anyone know how to code the URL so it always maintains the false setting for this parameter?

5 REPLIES 5
adzocol
Helper I
Helper I

Hello @DSut 

 

I have the exact same issue. I'm linking from a SharePoint list to a Canvas App. I used JSON to format the column in SP with the following. It worked fine and then all of a sudden it just loops when trying to open the app. I also noticed that &skipAppMetadata=true as an additional parameter. 

 

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "a",
  "txtContent": "@currentField",
  "attributes": {
    "target": "_blank",
    "href": "='https://apps.powerapps.com/play/<myappID>?Title=' + [$Title]"
  }
}

 

 Checking in the Developer tools section I see the following

 

 

DevTools failed to load source map: Could not load content for https://content.powerapps.com/resource/app/ifk66f3plbt0b/publish/js/D:/a/_work/1/s/obj/Assets/js/Core/Core.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

 

Did you manage to get this resolved? Even if I hard code SkipAppMetadata=false it has no effect. Very frustrating as it works sometimes but more often than not it fails. 

 

Thank you

Colz

Hi @adzocol,

No, I still haven't found a solution for this. 

I agree, it is frustrating that hard coding the SkipAppMetadata parameter to false is sometimes ignored and overwritten.

Hi @DSut,

 

Here's what I've learned so far

 

  1. I created 2 Test Apps. One with a Form and one without a Form
  2. I have 2 columns on my SP list. One links to the app PrintFormTest and the other PrintTestNoForm
  3. On my laptop using Edge browser, both apps have the loading loop problem i.e. the url gets appended with '&SkipAppMetadata=true'. If I amend this to '&SkipAppMetadata=false' it changes to 'true' when the app attempts to open and I have the same circular loading issue.
  4. On my desktop machine the same problem for the App with the Form, PrintFormTest. But bizarrely, PrintTestNoForm, which uses a DataTable instead of a Form, works without issue. I've tested this about 50 times now and it does not append the skipAppMetadata and loads without issue each time. The only difference here is I'm using Chrome. 
  5. So I updated Chrome on both machines to ensure both were on the same version. Tried again and that resolved the issue on Chrome for both Apps.
  6. I cleared cache on Edge and that resolved the issue there as well. 

Cheers,

Colz

DSut
Advocate I
Advocate I

Hi @adzocol,
From my research into the fault, I found some discussion that the SkipAppMetadata parameter determines whether the App loads from scratch or utilises existing cache from a previous session. 
It seems that if the browser has previous session metadata it will override the parameter and set it to true regardless of the parameter's hard coded value.
Whilst this speeds up the App load times, the previous session metadata creates a security conflict somehow resulting in the error message in both Chrome and Edge.
I too found that clearing cache on the browsers resets the problem but I also had it return fairly quickly.
I also noticed that the number of cookies used when the error appeared was different to when it didn't so something within the cached metadata is determining this. 

My app utilises forms so this may also be a piece of the puzzle. 

I'm still not sure what the long term fix is for this.

I really don't want to rewrite the app without forms and I can't ask the app users to clear their browser cache every time the want to use the links within the app.

Hi @DSut 

 

Good information. Thank you. 

 

I do see the problem if I change the Form and then Save and Publish. Clearing cache resolves this. But, so far at least, once I have reset cache after republishing it is working as expected. I'll keep an eye on it though. 

 

Best regards,

Colz

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,760)