Issues with Alaveteli 0.43 - ActiveStorage and PDFs uploaded to platform in replies?

22 views
Skip to first unread message

Mattias Axell

unread,
Jun 27, 2023, 11:27:57 AM6/27/23
to alavet...@googlegroups.com
Hi!

Anyone got this problem before? We haven't had this issue reported until now and this is the only error message I got so far but can try to get one with more details:

An ActiveStorage::FileNotFoundError occurred in attachments#show:

ActiveStorage::FileNotFoundError
app/models/foi_attachment.rb:76:in `body'

Do you know what this can be? PDF requirement library not working?

Best,
Mattias

Graeme Porteous

unread,
Jul 20, 2023, 12:11:22 PM7/20/23
to alavet...@googlegroups.com
Just following up on this. I had a call with Mattias last week to work through this problem. It appears there might be an issue with the `inline` background job mode which we introduced in 0.43.


For now, if other are looking to upgrade to 0.43 I would recommend going with the Redis/Sidekiq route as described in the Alaveteli upgrade notes.

--
Graeme Porteous
gra...@mysociety.org


--
You received this message because you are subscribed to the Google Groups "Alaveteli Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alaveteli-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/alaveteli-dev/CAEJghOrG6STtjfNh9L1DxuiHLJC%2BoBVqDy2Zp%3Db2icyVYoQTdA%40mail.gmail.com.

laurent...@gmail.com

unread,
Aug 24, 2023, 9:52:38 AM8/24/23
to Alaveteli Dev
Hi!
We just hit more or less the same error on madada (but with the redis setup). It looks like it was caused by redis crashing and me missing the error notification a few days ago.
I think I've fixed the root cause, how do I "rebuild" the attachment? we're getting errors on a link like https://oursite.fr/request/MMMM/response/NNNN/attach/XX/somefilename
I guess there must be some console incantation to extract the file from the raw email file?

thanks!
Laurent

Gareth Rees

unread,
Aug 31, 2023, 11:35:03 AM8/31/23
to Alaveteli Dev
Hey Laurent,

You can force a re-parse the message in the console like:

    IncomingMessage.find(ID_OF_MESSAGE).parse_raw_email!(force = true)

The ID_OF_MESSAGE will be the "NNNN" from the example URL you provided.

Best,

Gareth

Graeme Porteous

unread,
Aug 31, 2023, 12:10:26 PM8/31/23
to alavet...@googlegroups.com
And just to note, be careful when doing this parse_raw_email approach because if you've used set the attachment prominence to hiding them then this could be reset and attachments made public again.

--
Graeme Porteous
gra...@mysociety.org


Laurent Savaëte

unread,
Aug 31, 2023, 12:16:19 PM8/31/23
to alavet...@googlegroups.com

Thanks Graeme, I just did this and it fixed the problem.

Caveat duly noted! It's worth keeping in mind, indeed!

Reply all
Reply to author
Forward
0 new messages