Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Solved]Refused to execute script because it's MIME type is not executable

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved]Refused to execute script because it's MIME type is not executable
 Login/Join
 
Gold member
posted
Hi,

We are migrating from Webfocus 8010 to Webfocus 8204. We have certain fex files which are being called within an HTML. These fex files have JS embedded in it and it is failing to execute. Here's an example, below script(checkaccess.fex) is setting the value of variable check. This fex is being called within the html page and the value of check is being referred in another JS inside the HTML page. But it fails to run with the error:
"run.bip?BIP_REQUEST_TYPE=BIP_LAUNCH&BIP_folder=IBFS%3A%2FWFC%2FRepository%2FOPERA%2FStaffing_Analysis_Suite%2F&BIP_item=flexibility_index.htm:1 Refused to execute script from '*****************BIP_item=CheckAccess.fex' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled."

 -SET &ECHO =  ALL

-IF &&EXTRASALLOWED CONTAINS 'StaffingAnalysis' THEN GOTO ACCESS; 

-NOACCESS

-HTMLFORM BEGIN

        var check = 'NO';

-HTMLFORM END

-GOTO DONE

-ACCESS


-HTMLFORM BEGIN

        var check = 'YES';

-HTMLFORM END




-DONE 


The difference I notice between the 8010 version and 8204 version is in the response headers.

I am getting "X-Content-Type-Options: nosniff"
in the 8204 version and I believe this is causing the issue. However, i have not been able to find where this is being set. We are ussing IIS10 for SSO, Tomcat 8 and Webfocus 8204.

This message has been edited. Last edited by: Kartik Katyal,


WebFOCUS 8010,8204
Windows
 
Posts: 59 | Registered: June 26, 2015Report This Post
Expert
posted Hide Post
I think I would open a case with TechSupport on this one.

Although I have seen the mime type issue before somewhere.

How are you running the CheckAccess.fex ?

Can you post a snippet of code ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Calling it withing the script tag in our html and then utilising the output in a JS function.
 <script src="/ibi_apps/run.bip?BIP_REQUEST_TYPE=BIP_LAUNCH&BIP_folder=IBFS%253A%252FWFC%252FRepository%252FOPERA%252FStaffing_Analysis_Suite&BIP_item=CheckAccess.fex"></script>


<script type="text/javascript">

function checkaccess()

{

        if (check == 'NO')
        {
                window.location.href = "/ibi_apps/run.bip?BIP_REQUEST_TYPE=BIP_LAUNCH&BIP_folder=IBFS%253A%252FWFC%252FRepository%252FOPERA%252FCommon_Replicated_Objects&BIP_item=No_Access_page.htm";
        }

}
</script> 


WebFOCUS 8010,8204
Windows
 
Posts: 59 | Registered: June 26, 2015Report This Post
Expert
posted Hide Post
Try adding type="text/javascript" to your call.

e.g.
<script type="text/javascript"...


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Tried already but that didn't help. It kept giving the same error message.


WebFOCUS 8010,8204
Windows
 
Posts: 59 | Registered: June 26, 2015Report This Post
Gold member
posted Hide Post
I think it is validating the type with the actual extension of the file that are being called, because it doesn't error out for the .js files.

Also it doesn't error out if I give the fex files an extension of "text/plain" but then it doesn't resolve var check = "Yes" as javascript.

Wonder if it's something in the redirection settings that needs to be changed.


WebFOCUS 8010,8204
Windows
 
Posts: 59 | Registered: June 26, 2015Report This Post
Expert
posted Hide Post
What browser are you having the issue on ?

I was going to suggest adding "SET HTMLFORMTYPE = JS" to your fex.

This will remove any comments/execution run text from the returned text.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
That worked.

Thanks!!


WebFOCUS 8010,8204
Windows
 
Posts: 59 | Registered: June 26, 2015Report This Post
Expert
posted Hide Post
That OK

A bit surprised, as I could not replicate here.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Solved]Refused to execute script because it's MIME type is not executable

Copyright © 1996-2020 Information Builders