Select to view content in your preferred language

Issue with libtess.js

626
3
Jump to solution
05-04-2023 01:00 AM
GlendaSeah
New Contributor

GlendaSeah_0-1683187148888.png

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?

0 Kudos
1 Solution

Accepted Solutions
UndralBatsukh
Esri Regular Contributor

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.

View solution in original post

0 Kudos
3 Replies
UndralBatsukh
Esri Regular Contributor

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

0 Kudos
GlendaSeah
New Contributor

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.

0 Kudos
UndralBatsukh
Esri Regular Contributor

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.

0 Kudos