Skip to content

Invalid byte sequence in UTF-8  #155

@jasoncomes

Description

@jasoncomes

When running bundle exec cap production evolve:down:files get this error:

DEBUG[1be24480] 	2016/09/LeTourneau-University-768x196.webp is uptodate
DEBUG[1be24480] 	2016/09/LeTourneau-University.jpg is uptodate
DEBUG[1be24480] 	2016/09/LeTourneau-University.webp is uptodate
DEBUG[0262be27] Running /usr/bin/env [ -f /var/log/evolution/wordpress.log ] && [ $(stat -c %U /var/log/evolution/wordpress.log) == 'deploy' ] on production.affordablecolleges.com
DEBUG[0262be27] Command: [ -f /var/log/evolution/wordpress.log ] && [ $(stat -c %U /var/log/evolution/wordpress.log) == 'deploy' ]
DEBUG[0262be27] Finished in 0.201 seconds with exit status 0 (successful).
INFO[59ba9174] Running /usr/bin/env echo Mon\ Nov\ 21\ 13:09:30\ 2016\	jasoncomes@Jason-MacBook-Pro.local\	evolve:files:down\	Failure >> /var/log/evolution/wordpress.log on production.affordablecolleges.com
DEBUG[59ba9174] Command: /usr/bin/env echo Mon\ Nov\ 21\ 13:09:30\ 2016\	jasoncomes@Jason-MacBook-Pro.local\	evolve:files:down\	Failure >> /var/log/evolution/wordpress.log
INFO[59ba9174] Finished in 0.172 seconds with exit status 0 (successful).
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host production.affordablecolleges.com: invalid byte sequence in UTF-8
/Library/Ruby/Gems/2.0.0/gems/colorize-0.7.3/lib/colorize.rb:71:in `scan'
/Library/Ruby/Gems/2.0.0/gems/colorize-0.7.3/lib/colorize.rb:71:in `colorize'
(eval):4:in `green'
/Library/Ruby/Gems/2.0.0/gems/sshkit-1.5.1/lib/sshkit/formatters/pretty.rb:31:in `block in write_command'
/Library/Ruby/Gems/2.0.0/gems/sshkit-1.5.1/lib/sshkit/formatters/pretty.rb:30:in `each'

This is caused by the Marketing/Content team uploading files with invalid UTF8 names, breaking the possibility to pull down. Moving forward we'll be adding something along these lines to prevent this issue -> https://wpartisan.me/tutorials/rename-clean-wordpress-media-filenames. For the meantime is there a way to find the file names on the production server to be able to fix(find invalid UTF8 byte characters and rename command for files in the uploads directory) or something we can do on the server to prevent this error. Right now, its broken on affordablecolleges.com and onlinecolleges.net.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions