Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 errors and missing JSAPI dependencies #66

Open
sbuscher opened this issue Mar 22, 2019 · 2 comments
Open

404 errors and missing JSAPI dependencies #66

sbuscher opened this issue Mar 22, 2019 · 2 comments

Comments

@sbuscher
Copy link

I created a vanilla app (just a basemap) with WAB Dev Edition 2.11 and built it using esri-wab-build 1.1. After setting up ..\buildOutput\app in my local IIS the app wouldn't load due to 404 errors:

simpleLoader.js:80 GET https://localhost/https://localhost//jsapi/jsapi/dojo/resources/dojo.css net::ERR_ABORTED 404
simpleLoader.js:80 GET https://localhost/https://localhost//jsapi/jsapi/dijit/themes/claro/claro.css net::ERR_ABORTED 404
simpleLoader.js:80 GET https://localhost/https://localhost//jsapi/jsapi/esri/css/esri.css net::ERR_ABORTED 404
createElement @ simpleLoader.js:80
https://localhost/https://localhost//jsapi/jsapi/dojox/layout/resources/ResizeHandle.css net::ERR_ABORTED 404
simpleLoader.js:80 GET https://localhost/https://localhost//jsapi/jsapi/init.js net::ERR_ABORTED 404

Note the extra 'https://localhost/' in the url. There was an earlier issue (404 Errors when loading the built app) related to this and it looks to be persisting. I can get around the errors by manually uncommenting the following line in buildOutput\app\env.js:

//apiUrl = './arcgis-js-api';

Should this already be taken care of by esri-wab-build, or at least documented on the readme?

There are additional errors once env.js is modified:

dojo.js:22 GET https://localhost/esri-wab-build/arcgis-js-api/esri/geometry/support/pe-wasm.js?wab_dv=2.11 net::ERR_ABORTED 404
AbsolutePositionLayoutManager.js?wab_dv=2.11:4 Load widgetOnScreen: 648.35009765625ms
worker-init.js:29 failed to load resource (https://localhost/esri-wab-build/arcgis-js-api/esri/config.js)
worker-init.js:29 DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'https://localhost/esri-wab-build/arcgis-js-api/esri/config.js' failed to load.

The build process didn't include the geometry or config packages in ..\buildOutput\app\arcgis-js-api.

@lwuersch
Copy link

lwuersch commented Apr 4, 2019

I had the same initial error like you and for me it worked to just replace apiUrl = null at the beginning of env.js with the link to the api version (for example apiUrl = 'https://js.arcgis.com/3.27/'). I did not uncomment //apiUrl = './arcgis-js-api';

@mlewis22
Copy link
Contributor

mlewis22 commented May 29, 2019

I can also add that the esri/geometry is not copied over

\app\arcgis-js-api\esri\geometry - is missing.

Manual Work Around - Manually copy it from the build-src folder.

Looks like an addition property is required in the utilscripts.js
docopy(path.join(from, "esri/geometry"), path.join(to, "arcgis-js-api/esri/geometry"));
docopy(path.join(from, "esri/geometry/support"), path.join(to, "arcgis-js-api/esri/geometry/support"));

If i get round to it ill add a pull request asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants