Skip to content
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

Image duplication fails during course duplication #4167

Closed
cysjonathan opened this issue Nov 14, 2021 · 1 comment · Fixed by #4170 or #4179
Closed

Image duplication fails during course duplication #4167

cysjonathan opened this issue Nov 14, 2021 · 1 comment · Fixed by #4170 or #4179
Assignees
Labels

Comments

@cysjonathan
Copy link
Contributor

Description of issue

Course 2147 has some images uploaded, on course duplication, the images are broken.
Currently the duplication will still go through even though images do not duplicate #4162

Demonstration

https://coursemology.org/courses/2147/ has an image uploaded
https://coursemology.org/courses/2149/ image has broken

https://coursemology.org/courses/2147/achievements/ has an image uploaded
https://coursemology.org/courses/2149/achievements/ image has broken

During duplication, logs show Carrierwave::DownloadError (could not download file: 400 "Bad Request"

Timeline of events

  1. 9 Sep 2019 Upgrade to Carrierwave 2.0 Bump carrierwave from 2.0.0 to 2.0.1 #3641
  2. 13 Sep 2019 Fix double encoding of URI in Carrierwave 2.0 Pass decoded url to Carrierwave::Downloader #3652
  3. 10 Oct 2019 Failed duplication during course duplication discovered Course duplication fails to duplicate logos #3677
  4. 14 Oct 2019 Downgrade of Carrierwave and removal of double encoding fix Downgrade carrierwave #3680
  5. 30 Sep 2021 Upgrade of Carrierwave to 2.1.1 chore(deps): bump carrierwave from 2.1.0 to 2.2.0 #4083

Since URI encoding not yet fixed in 2.1.1, we are likely encountering the same error, conversations in Carrierwave's repository about the error here:
upgrade from 1.3.1 to 2.0.0 breaks remote_x_url when coming from s3
Encoding strategy change causes sadness with previously uploaded files?

Possible resolutions

  • Downgrade Carrierwave back to 1.3.1
  • Upgrade to >=2.2.0 Fix for this issue comes in Carrierwave >=2.2.0 17 Jan 2021, will have to test as there may be other issues
@ekowidianto
Copy link
Member

ekowidianto commented Nov 19, 2021

Note: carrierwave upgrade to 2.2.0 fixes duplication for achievement badge but not course logo. Unduplicated logo error is fixed in #4179

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment