Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

PlatformIO not downloading all ModularSensors dependencies

Home Forums Mayfly Data Logger PlatformIO not downloading all ModularSensors dependencies

Viewing 11 reply threads
  • Author
    Posts
    • #14792
      Matt Barney
      Participant

        I recently began having the following problem: Any new PIO project I create will fail to compile, beginning with this error:

        Indeed, the TinyGSM library is missing from .pio\libdeps\mayfly, where PlatformIO should have downloaded it automatically.

        This is despite specifying these directives in platformio.ini file (attached):

        And despite ModularSensors’ library.json manifest specifying TinyGSM as a dependency (along with about 19 others). If I manually install TinyGSM using ‘pio lib install’, the compiler gets past that, but fails when it encounters the next dependency, SDI12, and so on.

        For the past many months, given a proper ini file, PIO would automatically download all ModularSensors dependencies, about 24 libraries. As of now, any new PIO project I create will only automatically download these 4: EnableInterrupt, EnviroDIY_DS3231, and EnviroDIY_ModularSensors, and SdFat.

        Is anyone else experiencing this? I have a colleague who recently began doing Mayfly development using PlatformIO, and he had the same problem. Mine *seems* to have begun after getting a new PC (and thus a reinstall of VSCode and PIO).

        My development environment:
        PlatformIO Core 5.0.2
        VSCode 1.50.1
        Windows 10 Pro 64-bit

        Thanks for any insights,

        Matt

        Attachments:
      • #14794
        fisherba
        Participant

          There are smarter people at this than me, but I have  run into  two  solutions when  I have the issue you just had.

          1. rebuild/compile again.  It’s lame, but it sometimes solves the error.
          2. If #1 fails, I manually remove the .pio directory and rebuild the whole thing.
        • #14796
          Matt Barney
          Participant

            Hi Beth,

            Thank you for sharing your experiences! I’ve tried those things too, and I’ve definitely had them work for me in the past. I thought I had gotten pretty good at smacking PIO around and getting it to behave, but today is apparently not that day…I’ve repeatedly restarted VSCode, created brand new projects, as well as cleaning out the .pio folder, and even reinstalling PIO and VSCode several times. Something appears to be impeding PIO from traversing all of its dependencies on this machine. I just tried it on another box that has an older version of VSCode, and it worked properly there.

            Best,
            Matt

          • #14797
            fisherba
            Participant

              In theory, you  could  add  the missing  pieces manually….

            • #14798
              Matt Barney
              Participant

                Yes, that works for sure; I had to do so last week just to get a couple of Mayfly loggers built and shipped out to the field. Now I’m revisiting the issue in order to get my dev environment back in order.

              • #14799
                Matt Barney
                Participant

                  Update: This looks to me like a PIO issue. Reverting to earlier versions of PlatformIO IDE, it works; i.e., it downloads all ModularSensors’ dependencies as expected, and my project compiles successfully. This is using a ‘minimal’ platformio.ini file that looks like this:

                  …And my only source code is the default template main.cpp that is populated when doing a PIO -> New Project.

                  At the moment, I’ve reverted to PlatformIO IDE v1.10.0 as follows: In VSCode’s Extensions pane, click the Settings ‘gear’, select Install Another Version.

                  -Matt

                • #14801
                  LittleManistee
                  Participant

                    I’ve been experiencing exactly the same thing Matt described.  Atom and Platform IO quit working for me, gave the same compile error.  I uninstalled them and then they would not reinstall.  So I loaded VSC  and Platform IO and got the same compile error.  Matt sent me instructions on how and where to manually put the libraries in my project files in VSC and that got me going again.  I vaguely remember Platform IO doing some updates before things quit.

                    I’m going to install the older version as Matt describes and see what happens.

                  • #14803
                    Matt Barney
                    Participant

                      Thanks @armas. I have filed an issue with PlatformIO and am awaiting a response. -Matt

                    • #14806
                      Sara Damiano
                      Moderator

                        I’m sorry for being late on this.

                        It’s definitely something with the newest versions of PlatformIO and the very weird part is that for me *sometimes* it works and other times it does.

                        What I’ve usually ended up doing is putting *everything* into the lib_deps section.

                         

                      • #14807
                        Sara Damiano
                        Moderator

                          Also, with PlatformIO version 5 you can now specify the owner along with the library name in the lib_deps section so you’re sure you get the right one.

                        • #14817
                          Matt Barney
                          Participant

                            Thank you, Sara, for the additional tips for working around this PIO issue. I haven’t gotten a response yet on their github issues page, so need to post it on their community forum for others who are experiencing the same issue.

                            Matt

                          • #14972
                            Matt Barney
                            Participant

                              This issue is fixed in the latest PIO dev version. Details can be found in the PIO issue thread.

                              Matt

                          Viewing 11 reply threads
                          • You must be logged in to reply to this topic.