Navigation Menu

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

ASCII-8BIT to UTF-8 Encoding Error When Transferring PNG #159

Open
EpocSquadron opened this issue Sep 2, 2016 · 2 comments
Open

ASCII-8BIT to UTF-8 Encoding Error When Transferring PNG #159

EpocSquadron opened this issue Sep 2, 2016 · 2 comments

Comments

@EpocSquadron
Copy link

I am encountering an issue when using dandelion in a CI pipeline. Dandelion is running inside a docker container where the Encoding.default_external and Encoding.default_internal have both been set to UTF-8 (for older sass builds to function correctly with icon font definitions). Since implementing that, I started receiving this error when Dandelion attempts to write a png file to the destination server over SFTP.

Any idea why this happens, and the best way to handle?

Here's the error output that occurs during build:

Writing file:  android-chrome-192x192.png
/usr/lib/ruby/2.3.0/delegate.rb:341:in `write': "\x89" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
    from /usr/lib/ruby/2.3.0/delegate.rb:341:in `<<'
    from /usr/lib/ruby/2.3.0/delegate.rb:341:in `block in delegating_block'
    from /usr/lib/ruby/gems/2.3.0/gems/dandelion-0.5.0/lib/dandelion/utils.rb:7:in `temp'
    from /usr/lib/ruby/gems/2.3.0/gems/dandelion-0.5.0/lib/dandelion/adapter/sftp.rb:33:in `write'
    from /usr/lib/ruby/gems/2.3.0/gems/dandelion-0.5.0/lib/dandelion/deployer.rb:49:in `deploy_change!'
    from /usr/lib/ruby/gems/2.3.0/gems/dandelion-0.5.0/lib/dandelion/deployer.rb:13:in `block in deploy_changeset!'
    from /usr/lib/ruby/gems/2.3.0/gems/dandelion-0.5.0/lib/dandelion/changeset.rb:32:in `block in each'
    from /usr/lib/ruby/gems/2.3.0/gems/dandelion-0.5.0/lib/dandelion/diff.rb:39:in `block in each'
    from /usr/lib/ruby/gems/2.3.0/gems/dandelion-0.5.0/lib/dandelion/diff.rb:39:in `each'
    from /usr/lib/ruby/gems/2.3.0/gems/dandelion-0.5.0/lib/dandelion/diff.rb:39:in `each'
    from /usr/lib/ruby/gems/2.3.0/gems/dandelion-0.5.0/lib/dandelion/changeset.rb:20:in `each'
    from /usr/lib/ruby/gems/2.3.0/gems/dandelion-0.5.0/lib/dandelion/deployer.rb:9:in `deploy_changeset!'
    from /usr/lib/ruby/gems/2.3.0/gems/dandelion-0.5.0/lib/dandelion/command/deploy.rb:55:in `deploy_changeset!'
    from /usr/lib/ruby/gems/2.3.0/gems/dandelion-0.5.0/lib/dandelion/command/deploy.rb:30:in `execute!'
    from /usr/lib/ruby/gems/2.3.0/gems/dandelion-0.5.0/lib/dandelion/cli.rb:73:in `execute!'
    from /usr/lib/ruby/gems/2.3.0/gems/dandelion-0.5.0/bin/dandelion:8:in `<top (required)>'
    from /usr/sbin/dandelion:23:in `load'
    from /usr/sbin/dandelion:23:in `<main>'
@paugarcia
Copy link

I have the same issue!

@scttnlsn
Copy link
Owner

I haven't really looked into this much but I suspect it's an issue with the Tempfile encoding: https://github.com/scttnlsn/dandelion/blob/master/lib/dandelion/utils.rb#L6

@paugarcia What type of file are you trying to upload when it fails? Is it also an image?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants