encountered wasm error when setting up map view. can someone enlighten me if this is a sdk issue or is there some configuration I am missing out when doing the map publishing on arcgis pro?
Solved! Go to Solution.
Hi there,
The error "failed to execute compile of webassembly: Incorrect mime type. Expected application/wasm" - seems to be related to you not configuring your server to serve wasm content. Adding wasm hopefully will solve the issue.
Hi there,
Without a reproducible case it is not possible to say what the issue is for sure. Is possible for you to share your service or a simple test app that throws this error? Thanks
Hi UndralBatsukh,
My map is hosted in a no internet zone, unable to provide the map service but this is how i initialize my mapview
const [view, setView] = useState<MapView | null>(null);
const gl1 = new GraphicsLayer({
id: "gl1"
});
useEffect(() => {
const wmsLayer = new WMSLayer({
url: mapUrl,
});
const baseMap = new BaseMap({ baseLayers: [wmsLayer] });
const map = new Map({ basemap: baseMap });
setView(new MapView({
map: map,
container: "viewDiv",
spatialReference: { wkid: 4326 }
});
map.add(gl1);
const pointGraphic = new Graphic({
geometry: new Point({
longitude: 103.9716,
latitude: 1.35788,
spatialReference: { wkid: 4326 }
}),
symbol: new SimpleMarkerSymbol({
style: "circle",
size: "10px"
color: [266, 119, 40],
outline: {
color: [0, 0, 0],
width: 3
}
})
});
gl1.add(pointGraphic);
}, []);
Based on the above code snippet, the error is always encountered when I do a mapview. Not sure if it's because of this error hence my graphics can never be shown.
Any help would be much appreciated.
Hi there,
The error "failed to execute compile of webassembly: Incorrect mime type. Expected application/wasm" - seems to be related to you not configuring your server to serve wasm content. Adding wasm hopefully will solve the issue.