Well as far as I know we did not activate the secure upload feature. But as fas as I am not the only admin I can not be sure about that. And if I am getting it right, your count should return 0 when the feature has never been activated? Well, it is a lot more than 0 235 in fact
If you do not currently have secure media enabled you donāt need to enable it. It must have been enabled at some point because of how many secure uploads you have. Try running the uploads:secure_upload_analyse_and_update rake task; this will go through all your uploads and mark them as secure/not secure based on site settings (if you have secure media disabled they will all be marked as not secure).
Iām guessing, but the backtrace looks like itās trying to serialise a list of messages, or a list of information from messages, and is failing when it comes to serialise a particular image. The image is presumably the profile image of a user. Only one account is affected, so perhaps the bad image is for a user who only communicated with this affected account.
Possibly the failing list construction is for the most recent N messages. Perhaps you could send N messages (with different topic titles) to the afflicted account, so the list only contains good messages?
Well I tried to run rake uploads:secure_upload_analyse_and_update but the output was
This task only works for external storage.
So I tried to active the activate secure media option. But unfortunately or lets say for the sake of avoiding admin errors. This option can only be activated by configuring Amazon S3 buckets. And I am absolutely sure that no one ever made a S3 setup before.
So I can not run the rake script because I do not have any S3 Storage available. So I canāt say if it has an effect on the pry(main)> Upload.where('secure').count
I am wondering why we still have some secure uploads when we never had S3 activated?
Any clues on that.
But in fact
Did the trick. So I am fine for now. Even if I have no clue why we are experiencing such behavior. I would be happy to learn what else could be the reason.
Thanks in advance and for all your time you already spent.
In fact your little hint did the trick. I just wrote one new message and posted another answer and then the error disappeared.
Even being my hero for the moment does not free you from further questions I hope you are OK with giving me some more understanding of what in hell happened here.
First of all to give me a better understanding of how to read the logs. I mean, what a great guess you made. What did you lead to think about a serialization problem might be the one breaking it?
Why not the cook_url or I do not know, anything else?
Secondly what are your consumptions, do I have to be aware of running in such a problem again? Or maybe with another user?
Do you think there is a way to narrow it down which message, user, image could be the bad guy here. Is there any other chance to take a look into that than ā¦ clicking through the messages and hoping to get a effect on one of the private messages posts?
The funny thing is that some admins just did the exact same thing, like writing a new message (topic) to the affected account and we did experience any other behavior. Somehow the last sent message from me to the affected account did the trick.
And the last one, can I have your phone number for further emergency shout outs? Just kidding!
But for real, thanks a lot, a lot lot, a lot lot lot. I really got stuck here an I am so glad that our user ā as I mentioned, one of our admins ā can get back on track. Thank you Ed_S!
Ha ha - seems like I got lucky. The thing about a stack trace is that it runs from the specific to the general - itās not just a list of things, but a picture of the nested interactions from general code down to the specific machinery. So, the āimageā idea seemed interesting, because there are only profile images in the message list. And I think weāve seen odd issues with profile images before.
But I have no idea why the code is looking at secure storage, if youāve never used it.
I suspect a database query could list the images which would be fetched in this case, but I donāt know how you might find the rogue profile. If indeed, this is the story behind the stack trace.
Well in fact it is luck what keeps us alive sometimes, right?
Still thank you, I really got a little frustrated and deleting all messages was really just a last option.
Well, maybe you can give me some hint on to topics here. For me, being relatively new to docker and discourse I am a litte lost by your suggestion to fire a db query. What DB is used by discourse and can I do something like
./launcher enter app
mysql select bla
Or is it mongo db? But entering an fireing the query inside the container is at least the right way to go, isnāt it?
And is there a list of fields or properties I can browse through, like a reference or something so that I could bring up some thoughts about the right query?
But just to get this clear, even if I manage to get the list of profile images in the inbox list ā there is still no suggestion for narrow it down which one would be the bad guy or what to do with even if we find it, right? Any thoughts on that maybe?
Moreover I am surprised that there are usual problems with profile images. Is there a specific topic I could read through to get more insights on that? Or maybe some kind of guide how to handle profile images or restrict the usage or something? On behalf of avoiding such problems?
I donāt know much about the database side, but I recommend the Data Explorer plugin which is an officially supported plugin, and this topic. (Best to start a new topic if you have new questions - others may benefit from the thread, and a suitable topic title will bring more help.)
Edit: perhaps see also
where there are hints of what the mechanism looks like and how you might query it.