Mac M1 uploading issue
Uploading manuscripts sometimes doesn't work with M1 Macs; this has been the case for a while. However, there's some slightly new behavior: now when a file doesn't work, line 39 of config/permissions.js
in getManuscriptOfFile
logs this to the console:
File without objectId encountered: {
kotahi-server-1 | name: 'demo-withpng.docx',
kotahi-server-1 | storedObjects: [
kotahi-server-1 | {
kotahi-server-1 | key: '535785856a4f.docx',
kotahi-server-1 | type: 'original',
kotahi-server-1 | size: 2810840,
kotahi-server-1 | extension: 'docx',
kotahi-server-1 | mimetype: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
kotahi-server-1 | url: 'http://filehosting:9000/uploads/535785856a4f.docx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=nonRootUser%2F20220623%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220623T073810Z&X-Amz-Expires=86400&X-Amz-Signature=5018f53b2f608996d83bf0b6e915883ef06b46f8c985d849ba2d6cfec50118d5&X-Amz-SignedHeaders=host'
kotahi-server-1 | }
kotahi-server-1 | ]
kotahi-server-1 | }
Eventually there's "failed to fetch" error; then you're back at "Upload Manuscript". If I go to that URL, it downloads the DOCX I just uploaded, suggesting that it's making it into filehosting
though something's going wrong after that.
I don't think this is a serious error; nobody's serving Kotahi on an M1, so this is more of a developer problem than anything else. But maybe this new logging behavior helps diagnose what's going wrong?
Edit: maybe this is a serious or a new issue? I can't actually upload anything now. None of the files that I'm uploading appear to have an objectId
attached to them. @vignesh-d7 can you take a look?