how does api GET mutableWorker.js?

3394
6
Jump to solution
06-25-2015 11:49 AM
BenFousek
Occasional Contributor III

Strange question...but does the api GET mutableWorker.js via esri/request?

Replacing geom service requests with geometryEngineAsync. Testing app deployment on highly restrictive internal network which has required all requests for services, queries, etc to go through proxy for some reason above my pay grade.

Can access http://js.arcgis.com/3.13compact/esri/workers/mutableWorker.js via browser but api request fails.

Thought? Ideas? Esri JS Team?

Thanks

0 Kudos
1 Solution

Accepted Solutions
BenFousek
Occasional Contributor III

Hosting the API locally has resolved the issue.

It had been working, but evidently the network security system decided the request for mutableWorker.js was unsafe and started blocking it.

View solution in original post

6 Replies
thejuskambi
Occasional Contributor III

Not sure, but I think it uses dojo/request.

What is that you are trying to acheive? Could you share some code to understand where you are getting error.

0 Kudos
BenFousek
Occasional Contributor III

Simply trying to use geometryEngineAsync. Works fine in development and on servers I've tested it on. The production environment is accessed via remote desktops of some kind of enterprise environment. As a result service requests (layers, queries etc) all have to be run through proxy regardless if it's a local service or in the wild. Those requests fail without proxy via the api, but work directly in the browser.

When geometryEngineAsync is used for the first time it requests mutableWorker.js. And just like services the GET request fails via the api but the file is accessible directly in the browser via url.

My question is the result of the fact the same vague GET request failure seen with unproxied services is the same one when geometryEngineAsync requests mutableWorker.js and fails.

After some discussions we're just gonna start hosting the api locally to see if that resolves the issue. The long term goal is to just do dojo builds anyway.

0 Kudos
thejuskambi
Occasional Contributor III

quick question, how are you ensuring that all the other required js files are retrieved through proxy server.

0 Kudos
BenFousek
Occasional Contributor III

None of the api js files are being requested through proxy. Only services. The request for mutableWorker.js fails without any meaningful error the same way services which are not requested without proxy fail.

0 Kudos
thejuskambi
Occasional Contributor III

But, the browser on which you use, has the proxy configured right?

The way require gets all the js files is by adding script tags to the page. so the browser will get the file according to the network/proxy settings configured on the browser.

whereas the mutableWorker.js is retrieved by using dojo request get method. It is probably why it is failing to get this particular file.

Does the map service (online service), fail as well? if that is the case, probably you need yo write a proxy handler and send all the request through that handler or have all the services and js files in house.

0 Kudos
BenFousek
Occasional Contributor III

Hosting the API locally has resolved the issue.

It had been working, but evidently the network security system decided the request for mutableWorker.js was unsafe and started blocking it.