WebGL texImage2d: SECURITY_ERR using rasterizeHTML.js - webgl

I'm using rasterizeHTML.js to create a canvas representing DOM elements of the webpage (such as a screenshot of the page), and then I'm passing it to texImage2d, in order to use this canvas as a texture. Althought it works fine in Firefox 21.0, in others browser (Chrome, Safari..) I get the following error:
SECURITY_ERR: DOM Exception 18: An attempt was made to break through
the security policy of the user agent.
Is there a way to bypass the security policy? I want to use it locally. I tried also to use a local webserver (MAMP) because I thought it could by due to the same origin policy but the error is the same... Thanks a lot!

The local web server is needed, but have you also made sure that all of the images you are loading are from that server, not from other origins? Use the browser's web inspector to make sure you are not loading any resources from other domains.

Related

Google Colaboratory ServiceWorker Error On Chrome

Whenever I open a Colaboratory Document I always get the same error message:
NotSupportedError: Failed to register a ServiceWorker: The user denied permission to use Service Worker.
This is happening on chrome and my browser allows for ServiceWorkers (chrome://serviceworker-internals/), what's going on? Because the thing is all the code still runs.
Colab's output frames use service workers to support some functionality such as displaying richer graphs (Altair and Plot.ly).
The error message indicates that third-party cookies are disabled in your browser, this will prevent the browser service workers from working. The option should be configured under chrome://settings/content/cookies.
I tried white-listing in chrome link (chrome://settings/content/cookies) the following:
https://[*.]googleusercontent.com:443
[*.]colab.research.google.com
Here it was the best approach, better than simply liberatin the 3rd part cookies
Seems to work so on.
Usually there are two causes for this error:
1- you didn't allow cookies on colab domain, so you need to change you browser settings
2- you are using an adblocker

FancyProductDesigner cross origin issue

I am using fancyproductdesigner to decorate the Images....And these image hosted on s3 so when FPD try to generate the deisgned images it was giving cross origin error ..
I already made settings in s3 as recommended by them after that it works on firefox but giving errors on other browsers.
Any Help ??
We use azure blob storage with fancyproductdesigner. Found out that even though you set the CORS settings correctly on azure, we need to alter a function call in the source of fancyproductdesigner.js in the following way.
fabric.Image.fromURL(url, callback, {crossOrigin:'Anonymous'});
Please note the addition of third parameter here. This will set the image crossOrigin parameter before the image is loaded into canvas through fabric.js. The canvas will not be tainted anymore.

Why am I getting the message "The specified request cannot be executed from current Application Pool"?

Quite not sure why I see this error.
I navigate to my Login View like so http://test.staging.com/mywebsite/Login
My Login view was just redone using MVC but I have seen this same error message going to an aspx page as well...
If I use http I get the error message The specified request cannot be executed from current Application Pool.
If I use https://test.staging.com/mywebsite/Login, I'm good.
If I don't specify a protocol, test.staging.com/mywebsite/Login, I get the error as well
Is there an error happening under the covers and my custom error page can't be shown like discussed here?
What are some other causes of this error?
That usually means your custom errors are configured to run as a different AppPool.
You can read more at MSDN. (See section "Using Custom Errors from Another Application Pool").
There are two ways to correct this behavior. The first is possibly not one that you are interested in because it would require you to change your current architecture and run both sites in the same application pool (such as share the same worker process memory space). To do this, simply move the /errors virtual directory to run in the same application pool as the site for which it serves the custom error.
The second way is to make use of a registry key provided by IIS 6.0. This registry key makes sure IIS 6.0 does not check the metadata during the execution of the custom error and therefore allowing this to work.
See the article for information on the registry key fix.
It may also mean that you are using something along the lines of Server.Transfer to a page that is in a different AppPool.
It could be because you're using different versions of ASP.NET for one or many apps in the pool.
Make sure all apps in the pool use the same version of ASP (e.g. ASP 2.0.50727)
If you just added a new app, try changing the app momentarily to a different version of ASP, then back to same version. I experienced an issue where the displayed version was correct, but under the hood, a different version was used!
Check your event log, under Application, to get more details about the error.
The message would be caused by your page server-side redirecting to a page served by another application pool. Such as for example, in your link, the error page.
I know this is an old thread, but I stumbled upon it and found a different solution. Here's what worked for me: Make sure your application handles .asmx files correctly
From IIS:
Right Click on your project > Properties > Configuration
If necessary, add the .asmx file extension that maps to the aspnet_isapi.dll
Limit to: "GET,HEAD,POST,DEBUG" and restart.
Because I can't comment on vcsjones's answer, I'll add it down here. The DWORD value IgnoreAppPoolForCustomErrors needs to be set under HKLM\SYSTEM\CurrentControlSet\Services\W3SVC\ Parameters vs HKLM\SYSTEM\CurrentControlSet\Services\W3SVC referenced in that technet article. Set it to 1 and do an iisreset and you're good to go.
Source Blog Post
In my particular case, I received this error while trying to serve a content (non ASP.NET) website while it was an Application. Right-Clicking the virtual folder and removing the application fixed it for me.
In my case the application used the application pool that didn't exist. I have no idea how it's happened.

WebGL just stopped working locally for no reason

I was playing with some WebGL tutorials and, for no reason, WebGL just stopped working. I even loaded an untouched WebGL HTML page that I downloaded from the web that worked fine before. When I FTP that same exact code to my web server and load it, it works fine. Two questions...
Why would WebGL all of a sudden just stop working locally across ALL browsers?
Why would WebGL HTML code run fine online, but not locally?
I should also mention I restarted my computer, uninstalled/reinstalled Chrome and Firefox, and cleared all my internet cache.
Thanks so much for all your wisdom!
Found the problem. To prevent a local page from accessing your whole hard
disk drive, each local file:// URI is its own domain, which means that
local textures are always treated as cross-domain. In Firefox, I was able to get around this by modifying the about:config and setting security.fileuri.strict_origin_policy to false
Easiest way to work around this problem:
Use some IDE like Netbeans or Visual Studio to run your application. They use a local server automatically, so you don't have to run it on your own server or mess around with your browsers. Letting browsers access local data is more or less a security issue.

How can step through an Action that is requested from JavaScript during execution?

There is this one action that is requested using javascript during the loading of a page, it takes over 25 seconds to resolve. Looking at the code makes me think there is a scaling issue, but I am wondering if there is any way I can step through the code during the request so I can see what is happening. I try clicking 'debug/start debugging' but it won't launch the proper URL (access to the site is subdomain based), and it will also not find certain dependencies. I am able to browse the site directly via URL locally after mapping a URL via my hosts file to localhost (127...) but the default url that pops up (localhost...) from debug does not work because it is not formatted properly.
Any ideas?
You can attach the debugger to your browser by selecting "Attach to process" under "Debug" menu.
In the past, at least with ASP.NET we have used tracing to debug issues. You will just need to enable it in the webconfig. If you use warn, the messages will show in red and be easier to spot.

Resources