rebane2001 / matterport-dl

A downloader for matterport virtual tours
The Unlicense
320 stars 79 forks source link

Missing draco and basis js/wasm assets from download #62

Closed lowell80 closed 2 months ago

lowell80 commented 2 years ago

I'm running into an issue with what appears to be missing javascript / WASM resources. The downloaded model loads shows the background image and then goes blank after just a few seconds. I suspect the root issue is highlighted in server.log:

2022-06-30 12:45:53 WARNING  404 error: /libs/draco/gltf/draco_wasm_wrapper.js may not be downloading everything right
2022-06-30 12:45:53 WARNING  404 error: /libs/draco/gltf/draco_decoder.wasm may not be downloading everything right
2022-06-30 12:45:53 WARNING  404 error: /libs/basis/basis_transcoder.js may not be downloading everything right
2022-06-30 12:45:53 WARNING  404 error: /libs/basis/basis_transcoder.wasm may not be downloading everything right
2022-06-30 12:45:53 WARNING  404 error: /api/v1/jsonstore/model/trims/<<MODEL_ID>> may not be downloading everything right
2022-06-30 12:46:07 WARNING  404 error: /terms/terms-en-US.html may not be downloading everything right

(That last one was me just clicking links; so it probably doesn't impact normal functionality.)

I attempted to resolve this myself. I have plenty of Python experience, but my JS skills are at least a decade old and the kids these days do things quite differently. Webpack, and transpiling, and now web assembly? :-) I see references to these files in 670.js and 309.js with a bunch of "load" "loadAsync" but I think my lack of understanding of modern JavaScript magic limits how far I can take this. (As much as I'd love to deep dive and finally get my head wrapped around this, there's only so many hours in a day!)

I'll gladly share the model id via private channel, but would prefer not to broadcast it.

Note that I'm running on a custom branch locally. I ran into some other issues documented here on github issues, so I applied the following branches to apply yet-to-be-merged fixes:

Just to avoid any confusion about how my version varies from main:

20aa2d9 (HEAD -> main) Merge remote-tracking branch 'mitchcapper/nocache_graphpost_logging_pr'
a7f7138 Merge remote-tracking branch 'mitchcapper/better_logging_brute_js_pr'
bc8c2db (mitchcapper/graph_post_getmodeldetails_add_pr) Added GetModelDetails graph post
bbd8ecf (mitchcapper/nocache_graphpost_logging_pr) Disable browser cache for viewing, load .nice js files that exist, make graph post data errors more clear
f64196d (mitchcapper/better_logging_brute_js_pr) Download logging standardized, brute JS file option
e014495 (origin/main, origin/HEAD) Add js files (closes #38)
950ef38 Fix the logging module on <3.9 Python versions

Oh, and this fix:


     def end_headers(self):
         self.send_my_headers()
-        SimpleHTTPServer.SimpleHTTPRequestHandler.end_headers(self)
+        SimpleHTTPRequestHandler.end_headers(self)
mitchcapper commented 2 years ago

I don't believe i have seen as much WASM from matterport previously. If this doesn't happen on random models please find my email on my GH page and send me the url.

mitchcapper commented 2 months ago

This should be fixed now, please test again on master and let us know if not