-
Notifications
You must be signed in to change notification settings - Fork 18
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
Builds fail without Internet access (IDFGH-12120) (PACMAN-808) #54
Comments
Hello @readmodifywrite Please help to provide some information about your information and the project state.
|
|
@readmodifywrite Thank you for your responses,
Could you please update the component manager by running |
Yes, it is in managed_components. No changes to target or IDF version, when I filed this report. However, I am now experimenting with v5.2. I will update if this issue persists. I cannot run the pip command now that I've updated to 5.2: See this issue: espressif/esp-idf#13196 |
So, to work around all of this, would it not make more sense to just directly copy the MDNS source into my project, and get rid of the component manager entirely? I really don't see the value of the component manager at all, especially since it is creating more problems than it solves. We never want components to auto update during a build in the embedded world. Why not just put MDNS in the esp-idf/components like everything else? The component manager is just extra overhead for nothing. What is the actual use case here? |
Ok, so you can't just manually include the MDNS source in your project, even after also adding the Kconfig to get the #defines for the configuration. It will still break with a ton of random errors, see below. This whole component manager thing seems to be designed to be impossible to get rid of. I want to manually build mDNS in my project. I do not want to use the component manager (none of the handful of other "components" are of any use to me anyway). I have no reason to deal with this extra baggage in my builds. How do I get a component to build manually in my project? The component manager is doing some kind of extra processing that doesn't appear to be documented anywhere. Build error log below: In file included from /home/jeremy/JEREMY/Twine/firmware/pickup_firmware/esp32_firmware/main/mdns/mdns_networking_lwip.c:12: .... truncated. It is over 6000 lines of this nonsense. |
How to fix the build: Add the component Kconfig to the project root to get the #defines and menuconfig. I can confirm that moving the managed component and compiling the source directly fixes this issue. |
In this case, the simplest option is to put the mdns component from https://github.com/espressif/esp-protocols/tree/master/components/mdns (or a specific version in that repo) into the (The component manager helps with dependency hierarchies more than one level deep, but in your case simply getting the single component you need manually should work.) |
Hello @readmodifywrite Some components are moved out from the ESP-IDF to the component registry to deliver bug fixes and new features, not waiting for the next ESP-IDF release. If you would like to download a single component, you can either clone the repo, as Ivan suggested. Or download an archive from the registry (download archive link in the right-hand bar) and unpack to the If you want to turn off the component manager entirely, you can set the environment variable |
Hello @readmodifywrite I accidentally closed this issue yesterday,
Neither we do! Now, the dependency solver may run on build in a few cases:
If your case doesn't fall into these categories, it's likely a bug. We'd greatly appreciate your assistance in diagnosing this issue further. Please provide us with the full output of Running of solver when the target or IDF version has changed is a necessity because dependencies may be incompatible. We are now working on the fix to only download something when deps are actually incompatible. So likely this will help in your case. We really want to make a useful tool, not an annoying one, if you wish to help the whole community by giving us more data, it will be very kind from your side. |
I found this post after wondering why I couldn't build without internet due to the same "ERROR: Cannot establish a connection to the component registry. Are you connected to the internet?" I've noticed that hitting the ESP-IDF: Full Clean will require an internet connection before it can build again. Is this the expected behavior, as it wasn't listed as one of the four reason listed above? |
@jgeertsema I apologize for the confusion. The logic behind it is simple: During the next run of CMake, it will be recreated. If you already have all the required components in the system-wide cache, no HTTP requests will be performed. You can find the location of the cache by running A couple of exceptions are In which scenario it causes you problems? We will find the best workaround. |
I believe this part isn't working as intended.
In my project I have 1 managed component that requires version 1.12.1. If I navigate to the cache path I can see the managed component at version 1.12.1. After running If I'm understanding correctly because I already have version 1.12.1 in my cache I should be able to build after a |
@jgeertsema Which version of the component manager are you using? I've tried with the most recent one - v1.5.2 and I wasn't able to reproduce the issue. We had a regression some time ago, though. Could you please try to update? https://docs.espressif.com/projects/idf-component-manager/en/latest/guides/updating_component_manager.html |
@kumekay I was using version v1.4.1 and I updated it before my last post to version v1.5.2. I was still having the issue when I made the post after updating, but today I can not recreate the issue either. I now see this "HINT: Cannot establish a connection to the component registry. Skipping checks of dependency changes." and it continues the build like I would expect. |
We have a check for the fact if the component was deleted from the registry, and this message from this checker. We are reworking now how we deal with online/offline modes, and the behavior should be much clearer in the next release. |
I also am butting into this issue. In my particular case, I'm trying to build a firmware with ESP-IDF in a Nix environment, but a Nix derivation has no network connection. @kumekay I can run the build with At the very least, if dependencies are already present, the network call should fail silently and non-fatally. It would be ideal to have a non-mutating separate command to run that installs the dependencies specified by the lock file. That needs to be a separate action from "update" or "build". |
@jonahbron We will change the default behavior in the next feature release |
I am having the same issue that I cannot build in VSCODE/ESPIDF if the machine has no access to the component registry. Auto updating components is not a good idea, and I would rather trust developer's knowledge about the components they use rather than going out of your way to make it harder to everyone. |
@hsnprojects It should be fixed in 2.0, you can try this commit: b543e18 now |
closing the issue since 2.0.0 has been released. |
I am facing the issue : ERROR: Cannot establish a connection to the component registry. Are you |
@hathorr-hub Hi, this ticket has been closed for a while. could you open a new issue and attach more detailed error messages? so we could see the root cause of the problem. |
Answers checklist.
IDF version.
release/5.1 8d2dbd461fc7a31b3d3e55ec12149e53130c13f6
Operating System used.
Linux
How did you build your project?
Command line with CMake
If you are using Windows, please specify command line type.
None
What is the expected behavior?
Builds should succeed without an Internet connection.
export.sh is checking the component registry, and failing if there is no Internet available.
Builds should never be updating components on their own, so there is no need for this check at all. Firmware builds should succeed without Internet connectivity.
What is the actual behavior?
Builds fail without an Internet connection.
Steps to reproduce.
Build an ESP32 project without Internet access.
Build or installation Logs.
More Information.
No response
The text was updated successfully, but these errors were encountered: