iOS file viewer breaks BF

Customer has just bought to my attention a problem on one of my sites, there is a page which allows the customer to download files stored on the server, this is all working correctly and on iOS a dialog pops up asking whether to view or download the file.


Download works perfectly and view works ok if the file is an image, but if the file is a docx there is a problem. The file will display properly using the inbuilt file viewer but when the customer navigates back to return to the downloads page, almost everything is unresponsive and when a button is pressed to trigger a path action the following error is shown.

No idea how best to deal with this as it seems to be at a lower level than I have access to in the code base, any ideas?

That error seems to be thrown from the device browser and BF is only surfacing it.
I suspect some type of security trap as it thinks your doc is trying to run JS.

A quick google shows its a common issue, how ever I did not google for a solution but, I suspect there is one.

My suspicion is

  • Browser app (BF) opens a doc that could be malicious
  • After doc opens browser sees JS code try to run
  • Browser thinks cdoe came from the doc
  • Browser blocks execution

So, perhaps the way in which it’s opened …

HTH

c