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

warn: parse failure: bitcoin.org #982

Closed
fredrikaverpil opened this issue Mar 5, 2024 · 5 comments
Closed

warn: parse failure: bitcoin.org #982

fredrikaverpil opened this issue Mar 5, 2024 · 5 comments

Comments

@fredrikaverpil
Copy link

fredrikaverpil commented Mar 5, 2024

Today I started seeing this error in my terminal when entering a project with dev activated.

cd projectx
warn: parse failure: bitcoin.org
warn: parse failure: bitcoin.org
env +go.dev~1.21 +npmjs.com +git-scm.org

rm pkgx.yml
cd ..
env -go.dev~1.21 -npmjs.com -git-scm.org
warn: parse failure: bitcoin.org
warn: parse failure: bitcoin.org
warn: parse failure: bitcoin.org

cd projectx
env +go.dev +git-scm.org

cd ..
env -go.dev -git-scm.org
warn: parse failure: bitcoin.org
warn: parse failure: bitcoin.org

An org-wide search for bitcoin: https://github.com/search?q=org%3Apkgxdev+bitcoin&type=repositories

I have to be frank here and say I'm not super happy to see something is trying to potentially reach out to bitcoin.org from my machine...

Copy link

dosubot bot commented Mar 5, 2024

Hello @fredrikaverpil! I'm Dosu, your friendly bot here to tackle bugs, field questions, and guide you towards becoming a stellar contributor. While we wait for a human maintainer, feel free to lean on me. Let's get to the bottom of this together!

Based on the information you've provided, it seems like the warn: parse failure: bitcoin.org error message is related to an instance of PantryParseError. This error type is specifically handled in the pkgx codebase and is associated with parsing errors that occur when processing data from a project, in this case, bitcoin.org.

The PantryParseError is designed to catch and handle errors that arise during the parsing of data, indicating that there was an issue with interpreting the structure or content of the data associated with bitcoin.org. The error handling code suggests reporting this as a serious issue, implying that it could be due to unexpected or malformed data that the parser was unable to process correctly.

Here is the relevant code snippet from the pkgx codebase:

} else if (err instanceof PantryParseError) {
    render('parse error', err.project, [
      ['this is a serious issue. please report the bug']
    ], `https://github.com/pkgxdev/pkgx/issues/new?title=parse+issue+${err.project}`)
}

This section of the code is specifically designed to handle PantryParseError instances, and it directs the user to report the bug, indicating that the error is significant and likely due to issues with the data being parsed. You can find this in the err-handler.ts file.

As for the dev command, it is used to facilitate the utilization of developer environments by automatically determining and integrating the necessary packages based on a project's keyfiles. It operates on top of pkgx and its packaging primitives, requiring pkgx to be integrated with the user's shell. The dev command dynamically adjusts the development environment according to the project's dependencies as specified in keyfiles like package.json or .node-version, among others. It supports customizing the environment through project files and can manage shell environment variables. The environment activated by dev remains active within the project directory across terminal sessions, and it can be deactivated with dev off. More details can be found in the dev.md documentation.

Unfortunately, I wasn't able to find any specific references to bitcoin.org within the pkgx codebase or any dependencies or external libraries that could be causing this error. It would be helpful if you could provide more information about when and where this error occurs, or any other relevant details that could help in identifying the cause of this issue.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@jhheider
Copy link
Contributor

jhheider commented Mar 6, 2024

Don't worry, nothing in our code contacts bitcoin.org. What has likely happened is the package file for the bitcoin server (named: bitcoin.org > https://github.com/pkgxdev/pantry/blob/main/projects/bitcoin.org/package.yml) is likely corrupt in your pantry. Running pkgx --sync should re-download the pantry (you can review the whole thing in that repository if you're concerned, but it's all YAML files that describe how to build/test the software we provide).

It could have happened to any file in the pantry, and is almost certainly a coincidence that it's that specific package. @mxcl is tracking reports of pantry corruption (these have gone down significantly as we've improved synchronization methods), so he might have further questions.

Obviously, since our software is open source, you can search this repository and pkgxdev/libpkgx if you still have concerns, but I can assure you we have not implemented any code to contact bitcoin.org, which is just the homepage for the bitcoin core project.

edited to add:

here's the org-wide search for bitcoin: https://github.com/search?q=org%3Apkgxdev+bitcoin&type=code

you can see they are all software recipes in the pantry.

@fredrikaverpil
Copy link
Author

fredrikaverpil commented Mar 6, 2024

Thanks @jhheider, I kind of suspected this, as there's a bitcoin.org package. I'll try the sync command. I see now that there's been other reports of parse failure too, not related to this package.

Does pkgx sync automatically sometimes when running pkgx or when does it run (without me explicitly running the sync command, I mean)?
I know I've been hitting ctrl+c a lot when entering an invalid/non-existing command and I believe pkgx is running under the hood there...

@fredrikaverpil
Copy link
Author

Yes, pkgx --sync fixed it. 👍

@jhheider
Copy link
Contributor

jhheider commented Mar 6, 2024

It should sync periodically, but if a sync is broken, it might be a bit before the next one.

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

2 participants