WARP-LAB / files_3dmodelviewer

3D Model Viewer for Nextcloud
GNU Affero General Public License v3.0
38 stars 6 forks source link

importing model is failing #11

Closed MikeRD03 closed 1 year ago

MikeRD03 commented 1 year ago

Describe the bug

I am using 3D viewer in my v25 snap installation. Once I try to open any STEP file it displays "importing..." forever.

To Reproduce

Just open any STEP file

Expected behavior

expected to see a 3D model preview

I have checked that the files are not corrupted

Yes, using Autodesk Inventor and SW eDrawings. Tried many different files. All without issues in these desktop apps.

Browser log

There is an error in the browser log (Opera 64bit):

occt-import-js.js:1 Uncaught (in promise) TypeError: err is not a function at occt-import-js.js:1:162214

Installation and configuration

How the app was installed?

App server configuration Parameters

Versions

Nextcloud

Desktop

Opera Browser, most recent version also tried Edge and Firefox with same result

kroko commented 1 year ago

I assume the error is observed only for STEP (and probably IFC, draco stuff & rhino), other standartish supported formats do load, correct?

kroko commented 1 year ago

Installed Nextcloud via snap, can replicate.

It seems that the issue is that /snap/nextcloud/current/conf/mime.types does not hold WebAssembly MIME.

Can be traced upstream via https://github.com/nextcloud-snap/nextcloud-snap/blob/master/snap/snapcraft.yaml back to Apache source https://github.com/apache/httpd/blob/trunk/docs/conf/mime.types

1) To solve this issue the right way (IMHO 😄 ), please contribute to Apache - they should add wasm mime type and then wait till it populates down the chain to NC snap. All other ways are hacks.

httpd/docs/conf/mime.types

application/wasm wasm

2) A faster way might be adding

AddType application/wasm .wasm

to https://github.com/nextcloud-snap/nextcloud-snap/blob/master/src/apache/conf/httpd.conf#L187 as that is controlled by NC not Apache upstream.

3) The fastest way would be dropping Snap.

kroko commented 1 year ago

@MikeRD03 did PR to NC snap repo, will see if/how fast it populates to you.

kroko commented 1 year ago

@MikeRD03, please update to 25.0.6snap1 and check if WASM stuff works now. closing, if anything this can be reopened. ref: https://github.com/nextcloud-snap/nextcloud-snap/issues/2381#issuecomment-1516960215

MikeRD03 commented 1 year ago

updated and working with 25.0.6! Thank you! MikeRD03