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

Unable to run example apps #1098

Closed
beardeddude opened this issue May 24, 2024 · 5 comments
Closed

Unable to run example apps #1098

beardeddude opened this issue May 24, 2024 · 5 comments
Assignees
Labels
A-developer-xp Area: developer experience C-bug Category: This is a bug. P-critical Critical priority

Comments

@beardeddude
Copy link

Hey, I'm trying to run the example apps and haven't been able to get freenet to run. After originally following the docs and installing from the cargo repo I discovered that was wrong and uninstalled freenet and fdev, cleared everything and then built from source using the build-all.sh script.

While everything built and installed the freenet binary gives me this one line error when I run it (with or without the debugging).

$RUST_BACKTRACE=1 RUST_LOG=freenet=debug,locutus_core=debug,locutus_node=debug,info freenet local
Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }

When trying to build either example app I get the following on the publish step. I assume this is because freenet is not running.

fdev publish --code build/freenet/freenet_microblogging_posts contract --state build/freenet/contract-state
Putting contract AcZLENHfJLmPMJp6vLrLpWs19tBtHLe9iwgBcmVV3d3C
2024-05-24T21:32:45.538684Z ERROR fdev::commands: err=IO error: Connection refused (os error 111)
Error: fail to connect to the host(127.0.0.1:50509): IO error: Connection refused (os error 111)
make: *** [Makefile:47: publish-posts] Error 1

"freenet --help" does work but that is about all I can get it to do. I'm running Ubuntu. I have tried clearing the shared cache files and have reset and started over multiple times. The freenet binary from the repo does run but gives the "Missing export initiate_buffer" error from #963

Any idea what im missing here? Any help would be appreciated. Thanks.

@beardeddude
Copy link
Author

beardeddude commented May 25, 2024

OK so I dug in a little deeper and I know whats going on. This is an issue introduced with #1066 . I haven gone to deep into this but there seems to be a general issue that the code in this PR assumes the config.toml file is in the working directory.

Its fist fails to create it in the default dir of "/tmp/freenet" because the File::create method does not build intermediate dirs. But then when those dirs are manually created it fails to load the config file because in config.rs line 109 it tries to open the config file but does not include the path only the file name.

It seems there are a few issues. But they all seem to be related to the case of a first time setup of the config files.

@iduartgomez
Copy link
Collaborator

First, thanks for putting the time for writing an actual useful report and even better digging into the problem.

We are suffering from typical OSS problems with lack of resources, time constraints etc. so we are rushing things to point and then will stabilise the test suite again which would have caught up this... main is unstable yet but I guess something broke in the apps vs. last release and that's what you couldn't get it to run.

Anyways, @al8n could you please take a look at this and ensure we actually can initialise things from a fresh installation? We will want tests using a container for testing this out in the future but let's get a fix in ASAP please. It must work in both cases when we are setting things in the tmp dir or in the config dir for a proper release install.

@iduartgomez iduartgomez added C-bug Category: This is a bug. P-critical Critical priority A-developer-xp Area: developer experience labels May 25, 2024
@iduartgomez
Copy link
Collaborator

@beardeddude if you are building from source (which you should) I recommend you use https://github.com/freenet/freenet-core/tree/main/apps/freenet-ping instead for testing out thing work since that's more up to date and should work.

@iduartgomez
Copy link
Collaborator

#1100

should fix the config building issue

@beardeddude
Copy link
Author

yep, that fixed it. Thanks!

This is an incredibly cool project. I'm looking forward to the launch. Keep up the good work. If I wasn't such a rust noob I would volunteer. For now ill just play with what you guys have built and try and learn what I can.

Closing this issue as solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-developer-xp Area: developer experience C-bug Category: This is a bug. P-critical Critical priority
Projects
None yet
Development

No branches or pull requests

3 participants