Can't upload library to Web Editor

I'm trying to get started with the Web Editor. I have many projects working fine with the IDE on my PC.

I've been trying to upload a library that's needed for my project. I zip the library and start the upload process. The wheels grind for 30 seconds and I get the message:

Libraries that could not be uploaded:

[] library.properties not found

Any ideas?

Thanks,

Nick

Hi. The Arduino Web Editor requires that imported libraries have a metadata file named library.properties in the root of the library folder. You can find the specification for this file here:

Here's how you can make the library compatible for importing into the Arduino Web Editor:

  1. Unzip your library .zip file.
  2. In the root of the library folder, create a file named library.properties.
  3. Open the library.properties file in a text editor.
  4. Copy the example library.properties from here: Library specification - Arduino CLI
  5. Paste the copied example library.properties text into the library.properties file you have open in the text editor.
    The information in the file is mostly unimportant for your purposes. However, you will want to change the name value to something appropriate, since that is how the library will be identified after being imported into the Arduino Web Editor.
  6. Save library.properties file in the text editor.
  7. Zip the library folder.
  8. Try the import to Arduino Web Editor again.

As the editor progresses in its development library requirements become a little more strict.

Am also attaching a PDF that might help you a little.

Bob.

Importing sketches and libraries.pdf (285 KB)

Thanks for the responses. I did find an example library.properties file and edited it to more or less describe the library I was trying to upload. After that, it did upload and I was able to use it.

It's interesting that the stuff in the file was generally informational and didn't seem to include anything that could be required for building a project.

Also interesting that the library still works when I'm using the resident IDE on my PC. Guess it's sort of grandfathered.

Well, on to the next hurdle. I was informed that I've exceeded my maximum upload space of 100 MB by having 127 MB used. Actually I've uploaded one sketch of about 20 kB and one library.

Next after about four attempts at compiling, I got a message saying I've exceeded the maximum number of compiles in a day.

I may have to stick with the 'resident' IDE. :frowning:

Nick

Yes there are some limits to the CREATE editor.
The 100mb limit is definitely one of those.

Libraries can also eat up that space quicker than sketches.
See the PDF for explanations.

if you are doing lots of multiple revisions the desktop is better.
For most create user's the limits don't seem to pose many issues.

Very occasionally you can sneak around the max per day issue by clearing a browser cache etc. but no guarantee.

nicholask:
Thanks for the responses. I did find an example library.properties file and edited it to more or less describe the library I was trying to upload. After that, it did upload and I was able to use it.

Great job! I'm glad you managed to get your library so that it would import.

nicholask:
It's interesting that the stuff in the file was generally informational and didn't seem to include anything that could be required for building a project.

You're correct that it's mostly just informational metadata, which is displayed in the Arduino Library Manager.

The name value is used to name the folder the library is installed to for libraries imported to the Arduino Web Editor or installed via Library Manager in the Arduino IDE.

The version value is appended to the folder name for the Library Manager libraries that are pre-installed in the Arduino Web Editor, since all versions of all libraries are pre-installed.

The author, maintainer, sentence, and paragraph values are just displayed in Library Manager.

The category value is used to limit searches in the Library Manager.

The url value is used to create a "more info" link in Library Manager.

The examples for libraries with an architectures value that doesn't match the architecture of the currently selected board will appear under the File > Examples > INCOMPATIBLE menu in the Arduino IDE. If the library is compiled for a board with an architecture that doesn't match the architectures value, a warning is displayed. When multiple libraries contain a file that matches the #include directive, the library with an architectures value matching that of the currently selected is given preference (though other factors are also used).

The includes value determines which files #include directives will be automatically added to the sketch for when you select the library from the Sketch > Include Library menu in the Arduino IDE, or click the "Include" button in the Arduino Web Editor. If that field is not defined, #include directives for all header files in the library are added.

The dot_a_linkage, precompiled, and ldflags fields definitely do affect compilation, but these are not very widely used due to being fairly new, complex, and only useful in rare circumstances.

nicholask:
Also interesting that the library still works when I'm using the resident IDE on my PC. Guess it's sort of grandfathered.

That's correct. The library.properties file is a relatively recent feature. Up until a few years ago, not a single Arduino library had a library.properties file, and you will find many libraries that still don't have this file. If the Arduino IDE didn't offer backwards compatibility for the old libraries, it would cause a lot of problems, and there is really no reason not to support the old format.

There is a new 1.5 library format where the source files are stored in the src subfolder of the library folder, and with this format the library.properties file in the root of the repository is mandatory for the Arduino IDE to recognize it as a valid library. However, the Arduino IDE does not require a library.properties file for libraries in the 1.0 library format, where there is at least one header file in the root of the library folder. That file is all the Arduino IDE needs to recognize the folder as containing a valid library.

I'm not sure whether the Arduino Web Editor's requirement for 1.0 format libraries to have a library.properties file is intentional or a bug and whether it has always been this way, or is a recent change. I haven't heard of this problem before now. I did send a message about this thread to the developers who do the Arduino Web Editor, so it's been brought to their attention at least.

nicholask:
I was informed that I've exceeded my maximum upload space of 100 MB by having 127 MB used. Actually I've uploaded one sketch of about 20 kB and one library.

nicholask:
Next after about four attempts at compiling, I got a message saying I've exceeded the maximum number of compiles in a day.

I'm sorry to hear you're having so many problems with the Arduino IDE. Some library authors do put huge files in their libraries, like a PDF file or high resolution images. In this age of cheap hard drives and high bandwidth Internet connections, you wouldn't really notice a few hundred megabytes in a library installed on your PC, but it can cause you to hit the Arduino Web Editor's 100 MB limit very quickly, even though the actual source files of the sketches and libraries you're using are only a tiny fraction of the disk space.

I've never hit either of these limits, but my use of the Arduino Web Editor is only to help people who are having problems with it, and I try to clear out my sketchbook and custom libraries on a regular basis since I don't need them after resolving each support request.

There are momentary glitches from time to time with the Arduino Web Editor, but these are usually fixed quite quickly, so it's worth checking back after a while. The response time will tend to be longer for issues that occur on a weekend, since the development team can't even begin to investigate until the start work on Monday. So you might want to check back after a little while to see if the problem has magically fixed itself.

having trouble importing libraries to the online editor, the examples could be a lot better really not sure why you would use the online editor. it sounds nice in theory.....if you are going to add new products, lets keep up with the documentation. Nice to see they were updated with needing a properties file?!?!?...

my conclusion is the online editor can only do basic programming, its not a good tool for advanced users that need to add additional libraries.

@shrekware

Maybe the attached file would help you a little.
The lib requirements are getting a little stricter which is more in line with advanced users IMHO.

Bob.

Importing sketches and libraries.pdf (285 KB)

the instructions seem to be wrong, I dont see anywhere it says to add a properties file to the zip file and what else is missing, no spaces in the name?!?. It would be great if the example to upload a non standard library was correct or worked, If you could provide working instructions for adding a library for everyone to use, it would be appreciated

It is a "general guide" for the web editor.
Not sure why I would include an example of a NON STD lib.

Haven't updated it in a while so thanks for the reminder to add the properties section.
It does cover a lot of the reasons Libs fail though which was the original intention.

If you write something up I would be glad to include it and credit you for it.

Bob.

a general guide is nice, but there is a feature that says you can import libraries that are used in regular IDE, I use a ton of libraries all the time in the IDE and its very simple and efficient to add them. If the Online editor has a feature it should work or be documented on how it works, or put a big BETA logo over it, and we will know it could be buggy feature. Currently i am not sure how anyone could figure out how to add a library without hand holding thru the process, sounds tedious and i dont like hand holding

I was actually trying the online editor, to see if it was better or easier than the IDE, the concept was to try and teach others how to program their own boards for monitoring their farms, but so far it seems to be the wrong tool for anything you would want a novice to use. I guess I am better off configuring the controllers myself and mailing them out, trying to teach the public how to download the IDE and use it, good luck with that.

the online editor sounded good. but.....

The CHROME version is used by so many educational establishments along with the regular online IDE at many levels.
Pretty sure it doesn't need a beta logo at this stage of development.

As I said if a lib adheres to the correct protocols it should not need any special precautions to import.
The properties file was a quite recent change and I think Pert has covered this topic although it would be nice to see his work incorporated into the documentation.

I did suggest that a "dummy" properties file be made by the editor during any lib uploads but it would have meant a lot of changes IIRC.

As one of the many testers for the online IDE multiple and bulk lib uploads was something I did a lot of which gave me the basis for the guide and other help documents.

Bob.

if I cant import a library with current instructions and methods

beta version (plural beta versions)

(computing) An early version of a program or application that contains most of the major features, but is not yet complete.

If you really want to teach me to suck eggs on the term BETA try with Microsoft or any other OS first please.

Bob.

shrekware:
I was actually trying the online editor, to see if it was better or easier than the IDE, the concept was to try and teach others how to program their own boards for monitoring their farms

All the libraries in the Arduino Library Manager index are pre-installed in the Arduino Web Editor. If you have a situation where you want it to be easy for beginners to upload a specific firmware, my advice is to work with the authors of the library dependencies of that firmware to get them added to the Arduino Library Manager index. This would mean that the people you're trying to teach don't need to worry about libraries at all. They just open the sketch in the Arduino Web Editor and upload it to their board!

Information on adding libraries to the Arduino Library Manager index is here:

I'm happy to provide any assistance needed to make this happen. All we would need from the library author is:

  • If changes are required to the library structure or library.properties, merge the pull request for that change.
  • Create a release or tag in the library's repository.
  • Give approval to have it added to the Arduino Library Manager index.

I can do everything else. After that, it will take 1.5 weeks at most for the library to be pre-installed in Arduino Web Editor.

I wanted to thank pert for the VERY helpful post. I have a library that was written by Trent Gleghorn. It is for button debouncing in software. It is MARVELOUS. It's based on the work done by Jack Ganssle. Trent wrote it as a general purpose library for C++ and C, but he also configured a folder to be easily used as an Arduino library. It is basic, but worked fine when used on my computer. I kept getting the library.properties error message.

This solved the problem, and I did as best I could to include the appropriate information and credit where it is due.

In case someone is in search of a good button debouncing (debounce) solution, this is really good.

the original article by Jack Ganssle is here: Debouncing Contacts and Switches
It is entertaining and instructive. Recommended reading

I've attached the pre-zipped library. I know this is not the most relevant forum, but Google will find a way to it if people need a good switch debounce library.

John Bower

ButtonDebounce.zip (8.08 KB)