chrome failed to load spotfire link - html

I am currently displaying the spotfire web player link via simple html call and it is working fine when using the Mozilla Firefox browser but if trying to load on Chrome browser it fails to load and here is the error on the web player display on the link:
Failed to load application
Could not load localized labels
Could not load configuration
And here is the simple html call:
<object data="http://myHost/spotfire/wp/render" type="text/html" style="width:100%; height:1000px;">
Alternative Content
</object>
Any suggestion/comments TIA

I wonder if it has to do with Chrome's update to block cross-site scripting.
In your console do you get any errors describing Cross-site/samesite=none errors thrown?
I had a similar issue with Chrome when using Spotfires Javascript API and it only occurred in Chrome. Here is a Post regarding it.
The overall fix was an update to the Spotfire Server setting of SameSite.

You have to setup a registry key. I have a blog post on this.
https://datashoptalk.com/use-chrome-web-player/

Related

SandBoxed Error When Displaying PDF in HTML Element

I am using the following code to display a PDF document in an HTML element.
<embed src="PDFURL" type="application/pdf" width="100%" height="474px" />
Whenever the code is run in Firefox it works perfectly, however when run in Chrome it returns this error in the console:
"Failed to load 'PDFURL' as a plugin, because the frame into which the plugin is loading is sandboxed."
I have changing "embed" to "object" and "iframe" but neither have worked. Is there a solution to get it to work in Chrome?
One possible reason for this problem is the Content Security Policy “sandbox” header.
sandbox
Enables a sandbox for the requested resource similar to the iframe sandbox attribute. The sandbox applies a same origin policy, prevents popups, plugins and script execution is blocked.
(The whole description can be found under https://content-security-policy.com/)
Unfortunately, the only possible way to get this working is to remove the sandbox value from Content Security Policy. Because there is no possible value to enable plugins.
The sandbox header works the same way as the sandbox attribute for iframe. See also Flash not work in iframe within sandbox attribute

Webpage timing out on resource that isn't included in HTML

I am building a simple webpage (http://www.riffomonas.org/reproducible_research/) using Jekyll that is taking a long time to load on Safari. On Firefox and Chrome it loads instantly. In Safari, when I go in to the Web Inspector, it has two errors. The first...
Failed to load resource: The request timed out
The resource it was trying to get is http://api.pubpeer.com/v2/pubposts?filter=doi&devkey=PubMedSafari.
The second...
TimeoutError (DOM Exception 23): The operation timed out.
It's indicating that it was trying to access PP.js
The weird thing to me is that neither the API link or the Javascript are referenced in the code or the rendered HTML.
Any suggestions?
It turns out that the problem was the PubPeer Safari extension, which they are no longer supporting. Once I removed the extension everything worked great.

Chrome Extension Error - Website with Youtube embed video [duplicate]

I recently started receiving the following console errors, without any code changes taking place.
I did not install any extensions recently.
Failed to load resource: net::ERR_FAILED chrome-extension://enhhojjnijigcajfphajepfemndkmdlo/cast_sender.js
Failed to load resource: net::ERR_FAILED chrome-extension://hfaagokkkhdbgiakmmlclaapfelnkoah/cast_sender.js
Failed to load resource: net::ERR_FAILED chrome-extension://enhhojjnijigcajfphajepfemndkmdlo/cast_sender.js
Failed to load resource: net::ERR_FAILED chrome-extension://fmfcbgogabcbclcofgocippekhfcmgfj/cast_sender.js
Failed to load resource: net::ERR_FAILED
I have several YouTube player embeds on the page that are triggering this error, but they are simple:
<iframe width="100%" height="100%" src="http://www.youtube.com/embed/OUR_YOUTUBE_ID?showinfo=0&wmode=transparent" frameborder="0" allowfullscreen=""></iframe>
Has anybody else experienced this?
Apparently YouTube constantly polls for Google Cast scripts even if the extension isn't installed.
From one commenter:
... it appears that Chrome attempts to get cast_sender.js on pages that have YouTube content. I'm guessing when Chrome sees media that it can stream it attempts to access the Chromecast extension. When the extension isn't present, the error is thrown.
Read more
The only solution I've come across is to install the Google Cast extension, whether you need it or not. You may then hide the toolbar button.
For more information and updates, see this SO question. Here's the official issue.
I'm going to add to the answer given before.
It's not a bug in your code or the browser's code. It's the JavaScript code inside the YouTube iframe polls for the extensions it could interoperate with in case they were installed (likely to determine if the extension is installed).
Look at the source of www-embed-player.js (loaded from s.ytimg.com, it's YouTube static files CDN).
You'll find the following:
function Wj(a){return"chrome-extension://"+a+"/cast_sender.js"}
To stop seeing those cast_sender.js errors, edit the youtube link in the iframe src and change embed to v
The error is try to fix a Youtube error.
The solution to avoid your Javascript-Console-Error complex is to accept that Youtube (and also other webpages) can have Javascript errors that you can't fix.
That is all.
A simple fix for this is to install the Google Cast extension. If you don't have a Chromecast, or don't want to use the extension, no problem; just don't use the extension.
In addition to what was already said - in order to avoid this error from interfering (stopping) other Javascript code on your page, you could try forcing the YouTube iframe to load last - after all other Javascript code is loaded.

Unable to enable Chrome app in iframe

I'm trying to load the native messaging example app in an external webpage as follows:
test.html
<html>
<head>
</head>
<body>
<iframe src="chrome-extension://knldjmfmopnpolahpmmgbagdohdnhkik/main.html"</iframe>
</body>
</html>
I have added the web_accessible_resources property in the app's manifest:
manifest.json
{
// <some code snipped>
"web_accessible_resources": ["main.html"]
}
However, when I use the app within test.html, I get the following error in the console, coming from a JavaScript file within the app:
Developer Console
Uncaught TypeError: Object # has no method 'connectNative'
main.js:51
The problematic line of code is the following:
main.js
port = chrome.runtime.connectNative(hostName);
Here's a screenshot - the problem happens when I click on the Connect button (which calls the connect function):
Obviously, this works when the app is run standalone. How can I go about loading the app in a webpage?
You can't. With very few exceptions, Chrome avoids proprietary extensions to the open web. You're asking for exactly that: an external web page that has nonstandard abilities simply because it's opened in Chrome rather than another browser. As the web is today, that kind of behavior would lead to a poor developer and user experience. The native-messaging documentation suggests that the functionality you want is available to Chrome extensions and Chrome apps. And as you're finding out, that's indeed the case: it works as an app, but not as a web-standard iframe. This is by design.
You probably want to write a Chrome extension. Your webpage should detect whether the Chrome extension is installed and whether the user's browser is Chrome. If it's not Chrome, it should give an appropriate error message. If it is Chrome but the extension is not installed, it should urge the user to install your extension.

Accessing a Drive Preview from an iFrame in Chrome via SSL

I have an application that uses Google Drive for document storage and preview functionality, but recently the iFrames that the documents are loading into are not displaying anything. Upon inspection of the console, Chrome declares that it blocked the fram from running insecure content, and that is why the file preview did not load.
The initial call to preview this file is to a url that looks like this:
https://docs.google.com/document/d//preview
There is a redirect along the way that takes the following form but because it uses http instead of https, Chrome blocks the content from loading.
http://www.google.com/url?sa=p&q=https://www.google.com/accounts/ServiceLogin?service%3Dwise%26passive%3Dtrue%26go%3Dtrue%26continue%3Dhttps://docs.google.com/document/d//preview?pref%253D2%2526pli%253D1
Is there any way around this issue? It is blocking a core functionality of my application currently, so any advice would be appreciated. I can provide a screenshot of the full stack of network loads in necessary, but this is the only URL that is not http compliant.
Thanks in advance for your help.
Hacked that. Add a "?pli=1" without quotes at the end of the URL to avoid redirect (after "/preview" or "/edit") and land directly to the document.