Giter Club home page Giter Club logo

Comments (6)

sorentwo avatar sorentwo commented on August 16, 2024 1

Thanks for reporting your struggle and the solution here @aximuseng!

from carrierwave-aws.

aximuseng avatar aximuseng commented on August 16, 2024

I had a hunch that is was Dropzone (which still may be the issue). My old app used 4.x and this new one was 5.x. I downgraded and the issue persists.

I have another uploader that works fine - the issue is just this one which happens to use Dropzone.js

from carrierwave-aws.

aximuseng avatar aximuseng commented on August 16, 2024

I switched to FOG and I get the same error - looks like a temp file issue. I get a better error message via fog:

Excon::Error::NotFound
Expected(200) <=> Actual(404 Not Found)
excon.error.response
  :body          => "<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>uploads/tmp/1571981392-820410573725319-0002-3934/LDT_export.xlsx</Key><RequestId>968BFF30B5502600</RequestId><HostId>yoqwixTfgqxppxOTsC6yKI2NJDY8YvmsuHFqvJkaC3IfzauEvyGBSch/b2pu/gdrTb6taxQSUQc=</HostId></Error>"
  :cookies       => [
  ]
  :headers       => {
    "Content-Type"        => "application/xml"
    "Date"                => "Fri, 25 Oct 2019 05:29:55 GMT"
    "Server"              => "AmazonS3"
    "x-amz-delete-marker" => "true"
    "x-amz-id-2"          => "yoqwixTfgqxppxOTsC6yKI2NJDY8YvmsuHFqvJkaC3IfzauEvyGBSch/b2pu/gdrTb6taxQSUQc="
    "x-amz-request-id"    => "968BFF30B5502600"
    "x-amz-version-id"    => "NPV4VoXhQ8OrY2vOSqmjYLrgEqELxjlt"
  }
  :host          => "otproduction.s3.us-west-2.amazonaws.com"
  :local_address => "159.203.1.40"
  :local_port    => 51808
  :path          => "/locations/hdnw2xf8/uploads/mc4x2klf/LDT_export.xlsx"
  :port          => 443
  :reason_phrase => "Not Found"
  :remote_ip     => "52.218.217.193"
  :status        => 404
  :status_line   => "HTTP/1.1 404 Not Found\r\n"

I don't think it's related to this gem - perhaps carrierwave specific.

from carrierwave-aws.

aximuseng avatar aximuseng commented on August 16, 2024

This issue strikes again. I thought I had this addressed. The error would just show up as an annoyance in my Sentry.io logs. Now in my recent update throws an error (sort of).

Here is my code:

      if feed_params[:file]
        upload = @feedable.uploads.new(notes: feed_params[:notes], uploadable_type: @feed.feedable.class.base_class.name, uploadable_id: @feed.feedable.id)
        upload.file = feed_params[:file]
        upload.save
        @feed.update(linkable_type: 'Upload', linkable_id: upload.id)
      end

I am creating a record and then if the user uploaded a file I create a new upload. The file uploads and is saved in the DB. The controller stops after the upload.save and throws the error but not a full exception. If I manually refresh the upload is there but that @feed.update after the save is never executed.

Zero clue where to look next on this.

from carrierwave-aws.

aximuseng avatar aximuseng commented on August 16, 2024

Current Gemfile.lock:

    carrierwave (2.1.0)
      activemodel (>= 5.0.0)
      activesupport (>= 5.0.0)
      addressable (~> 2.6)
      image_processing (~> 1.1)
      mimemagic (>= 0.3.0)
      mini_mime (>= 0.1.3)
    carrierwave-aws (1.5.0)
      aws-sdk-s3 (~> 1.0)
      carrierwave (~> 2.0)

This one does NOT use dropzone.

from carrierwave-aws.

aximuseng avatar aximuseng commented on August 16, 2024

I did some digging in my uploaders. The offending uploader had this:

  def full_filename (for_file = model.file.file)
    "preview_thumb.jpg"
  end

I was setting my versions to static names. I don't need this and don't know why this fixes it or caused the problem but hopefully this helps anyone down the road that hits this error. Also not sure why fog had the same error.

from carrierwave-aws.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.