Page MenuHomePhabricator

STL 3D models broken: "Sorry, the file Undefined cannot be displayed since it is not present on the current page."
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Open any STL file such as this by clicking on the preview

What happens?:
It opens a white pop up in the top right with "Sorry, the file Undefined cannot be displayed since it is not present on the current page. Go to corresponding file page" (note the link is also broken)

What should have happened instead?:
It should show the 3D model that one can turn around by dragging it with mouse. It used to work just fine for all files, including the example one. It stopped working approximately a month ago.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):
Firefox

Event Timeline

Web browser developer console shows for https://commons.wikimedia.org/wiki/File:3D_model_of_the_human_mouth.stl?debug=true :

TypeError: wikibase.quality.constraints.ui.ConstraintReportList is undefined

Later on there is also

Error: View mediainfoview does not exist

which maybe could be better guarded against this.

Assuming for now that this is not related to 3D itself.

Tagging 3D after all – I doubt the relevant WikibaseQualityConstraints or WikibaseMediaInfo code has changed much recently, and at least the mediainfoview error is a known long-standing issue: T321532 – IMHO this error is more likely due to be due to some recent refactorings in 3D (e.g. es6 changes)

TheDJ subscribed.

The whole preview image is also not being generated. Thumbor simply returns error 500.

@TheDJ Yes, that's also an issue. Does this happen also for the file I linked? The thumbnail gets displayed on my side but I have only refreshed the page with ctrl F5 and ctrl shift R. The thumbnails are not displaying for all the files from 10 June or later here starting with "Ogham Stone at Church Island" so maybe something happened that day. The thumbnail for this item also doesn't load for more and it's been uploaded before 10 June which could be due to its very large filesize or because it just happens to be one of the few for which I didn't load the thumbnail earlier.

logstash shows a big increase in thumbor errors for STL: /opt/lib/python/site-packages/bin/3d2png: not found

https://logstash.wikimedia.org/goto/f23cfb9debc517f1668f64acc2a19485

Screenshot 2024-06-28 at 00.19.02.png (334×1 px, 44 KB)

It is possible of course that there are two issues, broken thumbnail rendering AND broken JS, but it's a bit difficult to tell this way.

@Joe can you tag the right person to fix this ?

Change #1050573 had a related patch set uploaded (by Hnowlan; author: Hnowlan):

[operations/deployment-charts@master] thumbor: update 3d2png path

https://gerrit.wikimedia.org/r/1050573

Change #1050573 merged by jenkins-bot:

[operations/deployment-charts@master] thumbor: update 3d2png path

https://gerrit.wikimedia.org/r/1050573

The thumbor-side issues were a side-effect of the upgrade that our tests didn't catch due to differences in config between prod and test - I see the supplied image rendering now (I've purged the cache for that image to be sure). However, I am still seeing the Undefined error, which I suspect is either a long-tail side-effect of the Thumbor issue, or something unrelated.

Thank you hnowlan

In

route(fileName)
                    {
                        this.loadViewer(true).then((viewer) => {
                            let fileTitle;
                            viewer.comingFromHashChange = true;
                            try {
                                let position = fileName.match(POSITION_REGEXP);
                                if (position) {
                                    position =  position[1];
                                    fileName = fileName.replace(POSITION_REGEXP,
                                    '');
                                } else {
                                    position = undefined;
                                }
                                fileName = decodeURIComponent(fileName);
                                fileTitle = new mw.Title(fileName);
                                viewer.loadImageByTitle(fileTitle, position);
                            } catch (err) {
                                mw.log.warn(err);
                            }
                        });
                    }

in the setup phase, the filename is already undefined. Will have to check where in the rewrite the went wrong.

This broke due to T64039
Which changed the signature of openImage from mw.Title to LightboxImage

We can do two things.. we can add a openMediaByTitle to mmv.bootstrap..
Or we can directly use LightboxImage from 3D and pass the lightboximage to MMVs openImage.

Glad to see progress on this, I don't know if this is already clear from the findings above but the problem only occurs on WMC but not Wikipedia or Wikidata. For example, open the WP & WD file uses of this file which can open and rotate the skeleton, while one can't do so from W.Commons. Maybe Wikidata doesn't work for some users either as reported here but it did work the times I tried it.