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

Error: characters are not allowed at line #1

Closed
wout opened this issue Dec 30, 2022 · 5 comments
Closed

Error: characters are not allowed at line #1

wout opened this issue Dec 30, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@wout
Copy link

wout commented Dec 30, 2022

I'm using your fzy lib in a Lucky app and often my deploys fail with the following error:

In lib/version_from_shard/src/version_from_shard.cr:3:8

 3 | {{ run("./extract_version", dir) }}
        ^--
Error: Error executing run (exit code: 1): ./extract_version ''


stderr:

    Error reading shard.yml: ���%�	6�=Ϫ�control characters are not allowed at line

Sometimes it works, other times not, and I can't figure out why.

@hugopl
Copy link
Owner

hugopl commented Dec 30, 2022

hmmm for some reason it didn’t find your shard.yml file, so its passing an empty string to the extract_version script. Do this always happen with lucky apps? I mean… do you have ant suggestion about how to reproduce this issue?

@hugopl hugopl added the bug Something isn't working label Dec 30, 2022
@wout
Copy link
Author

wout commented Dec 31, 2022

So far, I haven't found a pattern in the errors. It only happens on deploys, but not consistently. I'm deploying to a docker swarm server using a multi-stage build process. It could be that the shard.yml isn't available in one of the build steps. And maybe when it doesn't fail, it's due to caching? I don't know.

I'm now using another fuzzy search lib because I needed to deploy some changes, but I would prefer yours.

@hugopl
Copy link
Owner

hugopl commented Jan 2, 2023

I thought in the past about remove this dependency, but got no reasons to do so, I think this bug report can be the reason I was looking for.

version_from_shard shard maybe is more useful for apps, not libraries, since if two or more libraries depend on different versions of it the dependency can cause problems.

I'll release a new version of fzy without this dependency then close this issue.

Thanks for the report.

@hugopl
Copy link
Owner

hugopl commented Jan 2, 2023

@hugopl hugopl closed this as completed Jan 2, 2023
@hugopl
Copy link
Owner

hugopl commented Jan 2, 2023

In fact it was not really fixed, hehehe, since I can't know the cause of the issue without looking how the deploy is being made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants