Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

[BUG-232618] Second Life Wiki — Broken ImageMagick installation? #9859

Open
sl-service-account opened this issue Sep 10, 2022 · 7 comments

Comments

@sl-service-account
Copy link

What just happened?

When trying to convert from SVG to PNG/JPEG, the SL Wiki shows an error similar to the following:

0 Error creating thumbnail: convert-im6.q16: delegate failed `'rsvg-convert' -o '%o' '%i'' @ error/delegate.c/InvokeDelegate/1928. convert-im6.q16: unable to open file `/tmp/magick-27061HcyJPBSaBfCZ': No such file or directory @ error/constitute.c/ReadImage/600. convert-im6.q16: no images defined `PNG:/tmp/transform_10d50930ca49.png' @ error/convert.c/ConvertImageCommand/3258. 

Note that this error seems to be closely connected to either a missing ImageMagick delegate (namely, [rsvg-convert|https://wiki.gnome.org/Projects/LibRsvg]), or a lack of permissions for ImageMagick to create & write files on /tmp.

What were you doing when it happened?

I wanted to upload a SVG and got this error instead; so I searched around the SL Wiki and found some broken SVGs here and there, which I ultimately traced to this license template originally written by @SignpostMarv in August 2008, which was also broken.
It's possible that there are more examples scattered around the SL Wiki which are broken as well.

What were you expecting to happen instead?

Images uploaded as SVG should get a thumbnail as PNG — which is how MediaWiki works when properly configured using ImageMagick. This is how things have worked in the past, so I expected that they continue to work as before.

Other information

Just that you guys really need to take some time to take a look at the SL Wiki's infrastructure. If it weren't being used by many Lindens to quickly write some information regarding a lot of new features (such as Puppetry!) and document low-level protocols, I would suggest that you should give the community a chance to maintain the Wiki and keep its infrastructure operational; but since relevant Official Linden Lab/Second Life pages not only exist, but are being actively updated by some Lindens, it's up to you guys to do proper Wiki maintenance...

Original Jira Fields
Field Value
Issue BUG-232618
Summary Second Life Wiki — Broken ImageMagick installation?
Type Bug
Priority Unset
Status Accepted
Resolution Triaged
Reporter Gwyneth Llewelyn (gwyneth.llewelyn)
Created at 2022-09-10T21:17:16Z
Updated at 2023-01-27T17:13:13Z
{
  'Build Id': 'unset',
  'Business Unit': ['Platform'],
  'Date of First Response': '2022-09-11T05:43:48.412-0500',
  "Is there anything you'd like to add?": "Just that you guys _really_ need to take some time to take a look at the SL Wiki's infrastructure. If it weren't being used by many Lindens to quickly write some information regarding a lot of new features (such as Puppetry!) and document low-level protocols, I would suggest that you should give the community a chance to maintain the Wiki and keep its infrastructure operational; but since relevant Official Linden Lab/Second Life pages not only exist, but are being actively updated by some Lindens, it's up to you guys to do proper Wiki maintenance...",
  'ReOpened Count': 0.0,
  'Severity': 'Unset',
  'System': 'Website',
  'Target Viewer Version': 'viewer-development',
  'What just happened?': "When trying to convert from SVG to PNG/JPEG, the SL Wiki shows an error similar to the following:\r\n```\r\n0 Error creating thumbnail: convert-im6.q16: delegate failed `'rsvg-convert' -o '%o' '%i'' @ error/delegate.c/InvokeDelegate/1928. convert-im6.q16: unable to open file `/tmp/magick-27061HcyJPBSaBfCZ': No such file or directory @ error/constitute.c/ReadImage/600. convert-im6.q16: no images defined `PNG:/tmp/transform_10d50930ca49.png' @ error/convert.c/ConvertImageCommand/3258.\r\n```\r\n\r\nNote that this error seems to be closely connected to either a missing ImageMagick delegate (namely, [`rsvg-convert`](https://wiki.gnome.org/Projects/LibRsvg)), _or_ a lack of permissions for ImageMagick to create & write files on `/tmp`.",
  'What were you doing when it happened?': "I wanted to upload a SVG and got this error instead; so I searched around the SL Wiki and found some broken SVGs here and there, which I ultimately traced to [this license template](https://wiki.secondlife.com/wiki/Template:License), originally written by @SignpostMarv in August 2008, which was _also_ broken.\r\nIt's possible that there are more examples scattered around the SL Wiki which are broken as well.",
  'What were you expecting to happen instead?': 'Images uploaded as SVG should get a thumbnail as PNG — which is how MediaWiki works when properly configured using ImageMagick. This is how things have worked in the past, so I expected that they continue to work as before.',
  'Where': 'On the Second Life Wiki',
}
@sl-service-account
Copy link
Author

1hannah.actor commented at 2022-09-11T10:43:48Z

+1 to this. This should be fixed, as the Wiki is an invaluable source of information for Residents; and SVG files are inherently more future-proof than raster-based formats.

@sl-service-account
Copy link
Author

Chaser Zaks commented at 2022-09-11T11:50:26Z

Confirmed.
Page that reproduces the issue: https://wiki.secondlife.com/wiki/Snowglobe

@sl-service-account
Copy link
Author

Gwyneth Llewelyn commented at 2022-09-11T14:18:45Z

Thanks for the feedback, guys! I'm well aware that, based on my previous Jira tickets regarding the SL Wiki, it's clear that LL is aware that 'a lot' needs to be 'fixed' but that such work (namely, upgrading the MediaWiki software to a more recent version — the current one is beyond its End of Life support and will not receive patches or bug fixes) requires some time from whoever they have at LL to deal with the 'accessory' servers/Web services (i.e. those that are not critical for the Second Life Grid infrastructure).

I expect that once the 'correct' Linden is assigned to the task of upgrading MediaWiki, all those errors and annoying things (such as a reliance upon Flash to show embedded videos, for example) may all get fixed all of a sudden. The only problem is to know when it happens. The actual process of migrating MediaWiki to a newer version will take just a few minutes to an hour; fixing all other tiny things will take a bit longer, but, as far as I can see, it's possible that they could fix everything in an afternoon...

Unfortunately it's not the kind of work that can be crowdsourced from residents :) 

@sl-service-account
Copy link
Author

Spidey Linden commented at 2022-09-14T14:46:58Z

Thank you for the bug report! We will investigate this issue.

@sl-service-account
Copy link
Author

Gwyneth Llewelyn commented at 2022-11-01T18:45:40Z

Hmm. It's still broken... I've tried to upload a very simple SVG just now, and the error is essentially the same as before:

Error creating thumbnail: convert-im6.q16: delegate failed 'rsvg-convert' -o '%o' '%i'' @ error/delegate.c/InvokeDelegate/1928. convert-im6.q16: unable to open file /tmp/magick-2152304tl0-VbuKYB': No such file or directory @ error/constitute.c/ReadImage/600. convert-im6.q16: no images defined PNG:/tmp/transform_c3cedde86c97.png' @ error/convert.c/ConvertImageCommand/3258.`

Note that it's just the thumbnail that is broken; the SVG has been successfully uploaded: https://ll-pwiki-assets-production.s3.amazonaws.com/images/1/13/001-happy.svg

It even shows briefly on the preview during the upload phase, correctly sized to 150x150 (while it's still a SVG). Then, after the upload, ImageMagick breaks, and from then onwards, anything linking to this file will show the error as above.

 

(Note: all other types of image, including WebP, work correctly, it's just the oh-so-very-useful SVG vector format that fails...)

@sl-service-account
Copy link
Author

Gwyneth Llewelyn commented at 2022-12-16T00:31:24Z

It seems that this issue, or something closely related to the resizing functionality of ImageMagick, has been around since 2015, as seen on this talk page that I stumbled upon by sheer coincidence.

@sl-service-account
Copy link
Author

Gwyneth Llewelyn commented at 2023-01-27T17:13:14Z

Bumping this comment thread, just to know if there was some progress :)

It's annoying because there are so many pre-2015 SVGs on the SL Wiki, all of which are now broken (but you can still download the original SVGs — they just won't be displayed, you'll just get the multiple errors shown above).

Guys, this is an easy fix. Probably just a permission or path error somewhere. It should take you only minutes to fix. I mean, it's not as if I'm asking you to upgrade MediaWiki to a more recent version (you should, due to security considerations). Or add the Lua engine, so that we can start doing templates just like on Wikipedia (which you also should install). Those are lengthy procedures for sure, requiring some testing, lest something get seriously broken.

But viewing SVGs on the SL Wiki is already broken. It cannot get worse than this!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant