New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OfflineGenerationError: You have offline compression enabled but key "%s" is missing from offline manifest. #797
Comments
the only thing i can see is that you have apart from that, you could check whether the manifest.json exists in the place you'd expect it to and whether it contains anything useful at all. if nothing else helps, you'd need to properly debug this i guess :( |
I tried but not very successfull. I get this thing : '%s' isn't accessible via COMPRESS_URL ('%s') and can't be compressed. What do you mean by properly debug ? |
Yeah the manifest.json is good I think. When I do compress he upload it to S3, I have the same file on S3 and in my local staticfiles. The file look good too, he even have the empty compress block I've put on the page I'm trying to load.
|
When I refresh the page with the error, the key change all the time. If I understood right it's not suppose to change at every refresh, only at every compress. Feel like he can't find the manifest... |
If the key is changing every time it probably means there is something dynamic in your templates that compress depends on (such as a variable or a method call inside {% compress %} blocks). IIRC the fact that in your manifest URLs have expiry times (and not very far-future ones) is also an indicator that something is mis-configured but I haven't played with storages in a very long time. |
I removed ALL my compress tag except one on the page im trying to load. The page look like this :
The manifest look like this then :
And the 25c file look like this :
They all both exist and look the same in local and in S3. Look like the compression go well. But then when loading the page he still ask me for random key. |
I can't see your HTML inside the |
Oh yeah I see what you mean now. That could be a probable cause. I'm trying to find a way to achieve that. I don't think it come from django compressor, more from S3Boto no ? |
Right. |
Do you have any idea where this can possibly happen ? Im digging in the compressor and boto source code but I really don't see at what point, and most important why, he change the url like that. I don't see anything on the web about it. Is this a S3 config ? Or a compressor / s3boto config ? Something like "DONT_TOUCH_MY_URL_PLEASE = True" ? |
AWS_QUERYSTRING_AUTH = False Oh... my... |
any progress? |
Hey, sorry I had still some test to do but weekend. But of what I tested it work fine now, @diox were right. Thanks to both of you, I own you on this one. If you come around LA one day I would love to offer you a coffee or a beer, you deserved it ! |
@karyon @RemyAlves I am getting same error with django-storage and django-compressor==4.3.1 |
Hi guys,
I'm posting here because im out of idea, and tried almost everything. I'm trying to use django-compressor with S3BOTO to serve all my static and media file directly from S3. Everything almost work, when I do the offline compression I get all my files on S3, same with collect static, but then I get this famous error the missing key in the manifest. I tried to search on a lot of different forum, website, tutorial, but couldnt help myself, and we have to deliver soon.
Thank you for your help !
Settings.py :
s3utils.py :
The text was updated successfully, but these errors were encountered: