Arm Mbed OS support forum

Mbed Studio update library problem

Hi Everyone,
I need a library for my project, specifically “https://github.com/bblanchon/ArduinoJson” and when I add this library my empy project shows error. Then I tried update the library “ArduiniJson” but the update is put in background tasks and don’t end, at least for the time I was watching it.

I follow the steps to add a library but maybe I am doing something wrong or I can’t use this library on Mbed Studio?
Capture

Thanks for your help

Hi,

I tried to import it via + button and change it to few different versions (via check out version) and it was OK.
Try to delete it from the project and import it again. Maybe something was not imported correctly.

BR, Jan

1 Like

Hi @JohnnyK , which version works for you?

Okay, I’m sorry … I can confirm, it’s acting the same way

before

after

BR, Jan

1 Like

@JohnnyK thanks for that. I want to use this library because It was used in other project for LPC1768 with mbed libraries in linux, but in windows with Mbed Studio I don’t know whats happens.

Do you have a .lib file in your project pointing to the commit of the library you want to use?

@tomrod If I understand correctly, you are able to import the library and you are able to switch the library between versions using the ‘Check out to version’ action. It is when you attempt to update all libraries to latest that it hangs. I have tried this out and I have not been able to reproduce the problem. However I note that this library is using ‘6.x’ as the name of the master branch, there being no ‘master’, or ‘main’, or ‘development’ branch. This will disable ‘update to latest’ for this library, but it still should not cause the hang you are seeing.

Also there is work in progress to change Mbed Studio so that it does not assume there is a master branch. This library will be a good test case as it does not have ‘main’ or ‘development’ either.

You should be able to work-around the problem by avoiding ‘update all libraries’, or just cancelling out when it hangs. Another work around would be to rename 6.x to master in your fork.

1 Like

I don’t have a .lib file, I create an empty project and I only tried to add this library.

Hi @NigelW, the problem starts immediately after I created an empty program and tried to add this library. Immediately after adding this library Mbed Studio shows me errors like the attached image and is here when I tried to update this library to solve these problems. Also, when I update all the libraries it takes long time and don’t ends, I must close Mbed Studio to finish this background task. I am using Mbed Studio 1.3.1, and I must say I am not very used to this environment.

Hi @tomrod ,

if I understand correctly what is happening, there is not an error with the library you are trying to use. That library is correctly imported into your project and should be available to be used, if that’s not the case we can try to understand why.

The error that you see when trying to update the library is due to a different issue. For some reason Mbed Studio finds a library that can be updated when actually there isn’t one. When you click the Update All button Mbed Studio gets stuck trying to update libraries that cannot be updated. More in details in your case mbed-os cannot be update because it’s already at the latest release and arduinojson cannot be updated because there is not a master branch.

Please ignore the badge mentioning the possibility of updating one library.

Hope this helps.

Federico - Mbed Studio team

1 Like