Closed AevumDecessus closed 3 days ago
Interesting, that's a strange one. It's actually due to the file attachment data in the model, switch_locale is just the outermost method for the request.
Is this for a few specific files, or for everything?
Could you go to the advanced admin area and look at the file list? The path is /admin/model_files
. If you scroll that list to the right, you should see a column called "attachment_data". Could you tell me what it shows? Mine look like this:
If yours look different, that will be a clue. I wonder, as you're using MariaDB, whether this is related to JSON fields on MySQL/MariaDB being a bit... different, somehow.
unfortunately /admin/model_files
is one of the pages showing this issue
Ah. Good point.
If you can docker exec -it manyfold bundle exec rails console -s
, and then puts ModelFile.first.attachment_data.inspect
that might give us the same view (albeit with a bit more faff). Or use ModelFile.find_param("<id_from_url>").attachment_data.inspect
if it's with a specific file.
`
from the rails console
irb(main):001> puts ModelFile.first.attachment_data.inspect
"{\"id\":\"multibin/multipoint/0-5h/mp9/bin-to-bin-connector/0-5h-bin-to-bin-rail-click-connector#1081/0.5H - Bin-To-Bin Rail Click Connector.stl\",\"storage\":\"library_1\",\"metadata\":{\"filename\":\"0.5H - Bin-To-Bin Rail Click Connector.stl\",\"size\":88184,\"mime_type\":\"application/octet-stream\"}}"
=> nil
from the DB
select attachment_data from model_files limit 5;
| "{\"id\":\"ender5plus/enclosure/3dup-ender-5-plus-enclosure#2/3dup-corner-L.stl\",\"storage\":\"library_1\",\"metadata\":{\"filename\":\"3dup-corner-L.stl\",\"size\":716184,\"mime_type\":\"application/octet-stream\"}}" |
| "{\"id\":\"assortment-collection/assortment-boxes-40/1x1-square-40#3/assortment box 40 1x1.STL\",\"storage\":\"library_1\",\"metadata\":{\"filename\":\"assortment box 40 1x1.STL\",\"size\":742084,\"mime_type\":\"application/octet-stream\"}}" |
| "{\"id\":\"ender5plus/enclosure/3dup-ender-5-plus-enclosure#2/3dup-corner-R.stl\",\"storage\":\"library_1\",\"metadata\":{\"filename\":\"3dup-corner-R.stl\",\"size\":751484,\"mime_type\":\"application/octet-stream\"}}" |
| "{\"id\":\"ender5plus/enclosure/3dup-ender-5-plus-enclosure#2/3dup-ender5plus-tray-lid.stl\",\"storage\":\"library_1\",\"metadata\":{\"filename\":\"3dup-ender5plus-tray-lid.stl\",\"size\":20084,\"mime_type\":\"application/octet-stream\"}}" |
| "{\"id\":\"ender5plus/enclosure/3dup-ender-5-plus-enclosure#2/3dup-ender5plus-tray.stl\",\"storage\":\"library_1\",\"metadata\":{\"filename\":\"3dup-ender5plus-tray.stl\",\"size\":50784,\"mime_type\":\"application/octet-stream\"}}" |
OK, great, it looks like for some reason it's not parsing the attachment data JSON field into a sensible format before trying to use it. This might be to do with the fact that we have to prompt MariaDB to do that explicitly; perhaps that's not working. What version of MariaDB are you using?
CONTAINER REPOSITORY TAG IMAGE ID SIZE
mariadb lscr.io/linuxserver/mariadb latest 97a0f37586f2 335MB
OK, that's version 10.11.10 of the server, by the look of it. Thanks. I'll take a look at what might be going on and get back to you!
yeah confirmed version (had to go look up the command again)
MariaDB [(none)]> select VERSION();
+----------------------+
| VERSION() |
+----------------------+
| 10.11.10-MariaDB-log |
+----------------------+
1 row in set (0.000 sec)
One more thing - has Manyfold worked at all for you, or has this error hit you straight away?
Manyfold has been working for ages, this only happened when I upgrade to 0.88 from iirc 0.83
OK, thanks - that's odd. I've got another report of the same issue, so there's definitely something gone wrong somewhere.
@AevumDecessus any chance you could try to run some different versions instead of latest
and see when the error appears? Since 0.83 (which was only a month ago) there haven't been any major changes to the database that will cause incompatibilities, so you should be safe enough to try the ones in between.
Looks like the problem was included in the 0.87.0 release
fantastic, thanks, that'll really narrow it down!
Good news, I've got it replicated locally...
OK, it broke in 78c59b83d7a3bd61b11388fc89903f281340d88c
Right, I think this should be fixed! If you want, give the edge
image a try, or wait for the next release, probably tomorrow.
Can confirm, everything is good in the 0.89.0 release, thanks for the quick deep dive and resolution!
Describe the bug
Server Environment
To Reproduce Steps to reproduce the behavior:
/models
/collections
/admin/files
Expected behavior Expected to view standard pages as normal
Error Logs
/models
/collections
/admin/files