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

ActiveRecord error on install, no images able to be seen or uploaded. #3690

Open
kykyi opened this issue Jul 3, 2020 · 1 comment
Open
Labels
type:bug Error, flaw or fault

Comments

@kykyi
Copy link

kykyi commented Jul 3, 2020

Images aren't able to be seen on install.

ActiveRecord::RecordInvalid: Validation failed: Filename has contents that are not what they are reported to be

I did try to stackoverflow this issue but was in a circle of Paperclip and ActiveStorage and was not sure this was the usual behaviour.

Thanks in advance.

Solidus Version:

Solidus 2.10

To Reproduce

No images able to be seen or uploaded

Screenshots

Screenshots attached
issue1
issue2

Desktop (please complete the following information):

  • Windows 10
  • Rails 6.0.3.2
  • Ruby 2.6.6

Additional context

Full error on install

C:\Sites\sbc_solidus_app>rails g spree:install
      create  config/initializers/spree.rb
      append  public/robots.txt
       exist  app/assets/images
      create  vendor/assets/javascripts/spree/frontend
      create  vendor/assets/javascripts/spree/backend
      create  vendor/assets/stylesheets/spree/frontend
      create  vendor/assets/stylesheets/spree/backend
      create  vendor/assets/images/spree/frontend
      create  vendor/assets/images/spree/backend
      create  vendor/assets/javascripts/spree/frontend/all.js
      create  vendor/assets/stylesheets/spree/frontend/all.css
      create  vendor/assets/javascripts/spree/backend/all.js
      create  vendor/assets/stylesheets/spree/backend/all.css
      create  app/overrides
      append  db/seeds.rb
     copying  migrations
    creating  database
        rake  db:create
Created database 'db/development.sqlite3'
Created database 'db/test.sqlite3'
     running  migrations
        rake  db:migrate VERBOSE=false
     loading  seed data
        rake  db:seed
Loading seed file: stores
Loading seed file: store_credit
Loading seed file: countries
Loading seed file: return_reasons
Loading seed file: states
Loading seed file: stock_locations
Loading seed file: zones
Loading seed file: refund_reasons
Loading seed file: roles
Loading seed file: shipping_categories
Create the admin user (press enter for defaults).
Email [[email protected]]:
Password [test123]:
Done!
     loading  sample data
        rake  spree_sample:load
Loaded Payment Methods samples
Loaded Tax Categories samples
Loaded Tax Rates samples
Loaded Shipping Categories samples
Loaded Shipping Methods samples
Loaded Products samples
Loaded Taxonomies samples
Loaded Taxons samples
Loaded Option Types samples
Loaded Option Values samples
Loaded Product Option Types samples
Loaded Product Properties samples
Loaded Variants samples
Loaded Stock samples
rake aborted!
ActiveRecord::RecordInvalid: Validation failed: Filename has contents that are not what they are reported to be

Tasks: TOP => spree_sample:load
(See full trace by running task with --trace)
      insert  config/routes.rb
**************************************************
We added the following line to your application's config/routes.rb file:

    mount Spree::Core::Engine, at: '/'
**************************************************
Solidus has been installed successfully. You're all ready to go!

Enjoy!

Error on image upload

[paperclip] Trying to link C:/Users/baden/AppData/Local/Temp/RackMultipart20200703-31256-5yu8f.png to C:/Users/baden/AppData/Local/Temp/4af52202f77beb11ba59ce2056aa787820200703-31256-16fjol4.png
[paperclip] Link failed with File exists @ syserr_fail2_in - C:/Users/baden/AppData/Local/Temp/4af52202f77beb11ba59ce2056aa787820200703-31256-16fjol4.png; copying link C:/Users/baden/AppData/Local/Temp/RackMultipart20200703-31256-5yu8f.png to C:/Users/baden/AppData/Local/Temp/4af52202f77beb11ba59ce2056aa787820200703-31256-16fjol4.png
[paperclip] Trying to link C:/Users/baden/AppData/Local/Temp/4af52202f77beb11ba59ce2056aa787820200703-31256-16fjol4.png to C:/Users/baden/AppData/Local/Temp/4af52202f77beb11ba59ce2056aa787820200703-31256-vdbud1.png
[paperclip] Link failed with File exists @ syserr_fail2_in - C:/Users/baden/AppData/Local/Temp/4af52202f77beb11ba59ce2056aa787820200703-31256-vdbud1.png; copying link C:/Users/baden/AppData/Local/Temp/4af52202f77beb11ba59ce2056aa787820200703-31256-16fjol4.png to C:/Users/baden/AppData/Local/Temp/4af52202f77beb11ba59ce2056aa787820200703-31256-vdbud1.png
Command :: file -b --mime "C:/Users/baden/AppData/Local/Temp/4af52202f77beb11ba59ce2056aa787820200703-31256-vdbud1.png"
[paperclip] Content Type Spoof: Filename unnamed.png (image/png from Headers, ["image/png"] from Extension), content type discovered from file command: . See documentation to allow this combination.
[paperclip] Trying to link C:/Users/baden/AppData/Local/Temp/4af52202f77beb11ba59ce2056aa787820200703-31256-16fjol4.png to C:/Users/baden/AppData/Local/Temp/4af52202f77beb11ba59ce2056aa787820200703-31256-zzre2g.png
[paperclip] Link failed with File exists @ syserr_fail2_in - C:/Users/baden/AppData/Local/Temp/4af52202f77beb11ba59ce2056aa787820200703-31256-zzre2g.png; copying link C:/Users/baden/AppData/Local/Temp/4af52202f77beb11ba59ce2056aa787820200703-31256-16fjol4.png to C:/Users/baden/AppData/Local/Temp/4af52202f77beb11ba59ce2056aa787820200703-31256-zzre2g.png
Command :: file -b --mime "C:/Users/baden/AppData/Local/Temp/4af52202f77beb11ba59ce2056aa787820200703-31256-zzre2g.png"
[paperclip] Content Type Spoof: Filename unnamed.png (image/png from Headers, ["image/png"] from Extension), content type discovered from file command: . See documentation to allow this combination.
[paperclip] Trying to link C:/Users/baden/AppData/Local/Temp/4af52202f77beb11ba59ce2056aa787820200703-31256-16fjol4.png to C:/Users/baden/AppData/Local/Temp/4af52202f77beb11ba59ce2056aa787820200703-31256-doolmg.png
@gsmendoza
Copy link
Contributor

Hello @kykyi ! Did you still continue to encounter this issue on Windows?

@kennyadsl kennyadsl added the type:bug Error, flaw or fault label Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error, flaw or fault
Projects
None yet
Development

No branches or pull requests

3 participants