You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to have been a regression from 3.1.10 -> 4.0.0 with the display of non-UTF-8 files (see #2624 for previous issue).
This only happens for production environments (i.e. not development or test environment).
In 3.1.10 a directory with non-UTF-8 files will just ignore the files that can't be displayed:
In 4.0.0 (local dev container here (i.e. nightly (/pun/sys/dashboard))), however, there is only the error message, and no files are shown at all:
To reproduce this, you can create a file with non-UTF-8 name as described in #2624 and attempt to open the directory.
I noticed that there are indeed tests for this case, so I spent some time trying to figure out what is going on here, and it seems like this only happens in production (RAILS_ENV=production). With the dashboard app running as a sandbox app (RAILS_ENV=development) this works perfectly fine.
[rkarlsso@blahake ~]$ `ruby -e '"\xFF\u0001\u0002\u0003-ood-test-file".strip'`
-e:1:in `strip': invalid byte sequence in UTF-8 (ArgumentError)
from -e:1:in `<main>'
I opened a PR in OSC/ood_appkit#73, but I'm wondering whether similar cases exist elsewhere due to test environment not matching the production environment (not necessarily limited to non-UTF-8 strings, but more generally).
The text was updated successfully, but these errors were encountered:
robinkar
changed the title
File browser unable to handle directories with non-UTF-8 file names in 4.0.0
File browser unable to handle directories containing non-UTF-8 file names in 4.0.0
Feb 4, 2025
There seems to have been a regression from 3.1.10 -> 4.0.0 with the display of non-UTF-8 files (see #2624 for previous issue).
This only happens for production environments (i.e. not development or test environment).
In 3.1.10 a directory with non-UTF-8 files will just ignore the files that can't be displayed:
![Image](https://private-user-images.githubusercontent.com/61623634/409165057-a56aa425-3e08-4aef-abc5-d970801556ba.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyODAwNjYsIm5iZiI6MTczOTI3OTc2NiwicGF0aCI6Ii82MTYyMzYzNC80MDkxNjUwNTctYTU2YWE0MjUtM2UwOC00YWVmLWFiYzUtZDk3MDgwMTU1NmJhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDEzMTYwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYxYjU5OTEwZGJmODljODE0ODZiYTQ0YTA3MTUzOWUyMzhiNGYyZjEzZTU2YzAzOTQ2MmU5MzczODkyY2FhM2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.s2iDD8ygDXeV3Kxhqvcouq-UG3FGyNoOnnWCaZVCq4w)
In 4.0.0 (local dev container here (i.e. nightly (/pun/sys/dashboard))), however, there is only the error message, and no files are shown at all:
![Image](https://private-user-images.githubusercontent.com/61623634/409164809-021a54b5-baef-4e87-872a-3493130cfc00.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyODAwNjYsIm5iZiI6MTczOTI3OTc2NiwicGF0aCI6Ii82MTYyMzYzNC80MDkxNjQ4MDktMDIxYTU0YjUtYmFlZi00ZTg3LTg3MmEtMzQ5MzEzMGNmYzAwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDEzMTYwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk1NTg3ZjM3ZmUzNTc5MGNjMDA5MTMwMmM1ZDQ1N2MzOTViNDVlNTk4ZGIyNjc1NWNhNjA0YmVmZWY2MGUwOGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.kVIx_lRMv5sMZebsFM-P6a4us2j0xu-dIgtxYxv7pVo)
To reproduce this, you can create a file with non-UTF-8 name as described in #2624 and attempt to open the directory.
I noticed that there are indeed tests for this case, so I spent some time trying to figure out what is going on here, and it seems like this only happens in production (
RAILS_ENV=production
). With the dashboard app running as a sandbox app (RAILS_ENV=development
) this works perfectly fine.It seems that the OodAppKit LogFormatter is only enabled for production, which causes it to then run
strip
on the non-UTF-8 filename to log "Not showing file ... ".A quick test in the terminal shows that this is indeed the case:
I opened a PR in OSC/ood_appkit#73, but I'm wondering whether similar cases exist elsewhere due to test environment not matching the production environment (not necessarily limited to non-UTF-8 strings, but more generally).
The text was updated successfully, but these errors were encountered: