mbed-cli is broken on MacOS Catalina

Created on 3 Nov 2019  Â·  18Comments  Â·  Source: ARMmbed/mbed-cli

When I installed MacOS Catalina the MBEDCLI stopped working.

I made a HACK by changing the path to the Terminal.app in the file:

The file /Applications/MBEDCLI.app/Contents/Resources/script

open Terminal and call run-mbed-cli.sh, use Popen instead of subprocess.call to pass in environment variables

subprocess.Popen(
["/usr/bin/open", "--fresh", "-a", "/System/Applications/Utilities/Terminal.app", "source/run-mbed-cli.sh"]
)

OPEN mirrored bug

Most helpful comment

I found a (hacky) solution to this. The problem is that the installer is unable to find the terminal app, as it has moved from /Applications/Utilities/Terminal.app to /System/Applications/Utilities/Terminal.app. So, we simply need to update the path.

  1. Navigate to the resources directory in MBEDCLI.app: cd /Applications/MBEDCLI.app/Contents/Resources.
  2. Replace /Applications/Utilities/Terminal.app with /System/Applications/Utilities/Terminal.app in the ./script and ./run-mbed-cli.py files. Both instances can be found on line 32 of the files.

After the above, the MBEDCLI.app app can be run as expected.

All 18 comments

I don't understand.. What exactly stopped working.

I'm using Mac OS X Catalina, and I have not modified mbed-cli. Works like it should. I'm using both Python2 and Python3. Both seems to work.

Internal Jira reference: https://jira.arm.com/browse/IOTBTOOL-456

Take a mac on an old os
install mbed-cli (the installer)
Update to macos catalina
run the "Mbed CLI" app
See it fail

Just one of the many reasons I wish there was an official docker container for Mbed Tooling.

@SeppoTakalo - did you install mbed cli with the macOS installer? Could this be an installer issue? It looks like the installer is very old. I recently put in a ticket about the Windows installer being very old.

is this resolved if yes kindly let me know the solution?

@SeppoTakalo kindly answer above query?

@arshadpc Are you having the same issue? Did you use installer? If you install it via pip, does it fail the same way?

@arshadpc Are you having the same issue? Did you use installer? If you install it via pip, does it fail the same way?
@0xc0170 Yes ,i have not tried with pip i used installer and seeing issue.

No, I have not used the installer.

For mbed-cli and related tools, I have always installed those with clean Python virtual environment.

So is the conclusion then that installer is broken, and with pip install it works.

When I installed MacOS Catalina the MBEDCLI stopped working.

The path to Terminal.app is not correct, the error displayed is:

​Printing from run-mbed-cli.py
MBED_CLI_APP_DIR=/Applications/MBEDCLI.app/Contents/Resources
$HOME= /Users/
FSPathMakeRef(/Applications/Utilities/Terminal.app) failed with error -43.

I made a HACK by changing the path to the Terminal.app in the file:

The file /Applications/MBEDCLI.app/Contents/Resources/script

open Terminal and call run-mbed-cli.sh, use Popen instead of subprocess.call to pass in environment variables

subprocess.Popen(
["/usr/bin/open", "--fresh", "-a", "/System/Applications/Utilities/Terminal.app", "source/run-mbed-cli.sh"]
)

After adding "/System" folder in front of "/Applications" as described the script works as expected.

When you run the mac installer it doesn’t work correctly… you have to fix it like I said

It works find when you setup thing in a venv

Except you might want to put in instruction about how to get the mac to run the compiler things with the security setting problem

Alan

On Dec 13, 2019, at 10:16 AM, Mac Lobdell notifications@github.com wrote:

@SeppoTakalo https://github.com/SeppoTakalo - did you install mbed cli with the Mac installer? Could this be an installer issue?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/ARMmbed/mbed-cli/issues/930?email_source=notifications&email_token=AEG4FLBX3Y3FA3HY36XS4P3QYORMLA5CNFSM4JILKMM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG2IHNQ#issuecomment-565478326, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEG4FLARJRQ4U4ZHPS6JKD3QYORMLANCNFSM4JILKMMQ.

I can confirm that fix as suggested by Alan works. I think this is more a PATH issue as an issue of installer. Looks like AppIe has relocated some system apps with recent OS upgrade. I am running 10.15.2.

I have installed everything with mac installer without any problems, then applied fix as suggested, but had to install mbed-cli afterwards with pip manually.

To summarize, the mac installer works (with fix), but the installation is not complete and requires some additional manual steps.

When you run the mac installer it doesn’t work correctly… you have to fix it like I said It works find when you setup thing in a venv Except you might want to put in instruction about how to get the mac to run the compiler things with the security setting problem Alan
…
On Dec 13, 2019, at 10:16 AM, Mac Lobdell @.*> wrote: @SeppoTakalo https://github.com/SeppoTakalo - did you install mbed cli with the Mac installer? Could this be an installer issue? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#930?email_source=notifications&email_token=AEG4FLBX3Y3FA3HY36XS4P3QYORMLA5CNFSM4JILKMM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG2IHNQ#issuecomment-565478326>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEG4FLARJRQ4U4ZHPS6JKD3QYORMLANCNFSM4JILKMMQ.

Correct

On Jan 11, 2020, at 5:56 AM, emha69 notifications@github.com wrote:

I can confirm that fix as suggested by Alan works. I think this is more a PATH issue as an issue of installer. Looks like AppIe has relocated some system apps with recent OS upgrade. I am running 10.15.2.

I have installed everything with mac installer without any problems, then applied fix as suggested, but had to install mbed-cli afterwards with pip manually.

To summarize, the mac installer works, but the installation is not complete and requires some additional
manual steps.

When you run the mac installer it doesn’t work correctly… you have to fix it like I said It works find when you setup thing in a venv Except you might want to put in instruction about how to get the mac to run the compiler things with the security setting problem Alan
… On Dec 13, 2019, at 10:16 AM, Mac Lobdell @.*> wrote: @SeppoTakalo https://github.com/SeppoTakalo https://github.com/SeppoTakalo https://github.com/SeppoTakalo - did you install mbed cli with the Mac installer? Could this be an installer issue? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#930 https://github.com/ARMmbed/mbed-cli/issues/930?email_source=notifications&email_token=AEG4FLBX3Y3FA3HY36XS4P3QYORMLA5CNFSM4JILKMM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG2IHNQ#issuecomment-565478326>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEG4FLARJRQ4U4ZHPS6JKD3QYORMLANCNFSM4JILKMMQ https://github.com/notifications/unsubscribe-auth/AEG4FLARJRQ4U4ZHPS6JKD3QYORMLANCNFSM4JILKMMQ.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/ARMmbed/mbed-cli/issues/930?email_source=notifications&email_token=AEG4FLH6DIRQQXEDTAKCNFLQ5GQWRA5CNFSM4JILKMM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIV7JCA#issuecomment-573305992, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEG4FLA37OCOJTF7ABRNQ4DQ5GQWRANCNFSM4JILKMMQ.

I am a noob at this had the CLI tools and arm compiler working on my Mac before, I have tried the OP suggestion but doesn’t work for me. Any other suggestion to get this working?

I am a noob at this had the CLI tools and arm compiler working on my Mac before, I have tried the OP suggestion but doesn’t work for me. Any other suggestion to get this working?

I had Python3.8 and GNU ARM v9.2.1 already installed on the system, before running mbed-cli installer, so I don't know what happens, if these two are not installed. Maybe you should try with installing the Python3.8 and add it to the PATH.

Alternatively, try to uninstall old mbed-cli, then upgrade the macos and install mbed-cli again.

I found a (hacky) solution to this. The problem is that the installer is unable to find the terminal app, as it has moved from /Applications/Utilities/Terminal.app to /System/Applications/Utilities/Terminal.app. So, we simply need to update the path.

  1. Navigate to the resources directory in MBEDCLI.app: cd /Applications/MBEDCLI.app/Contents/Resources.
  2. Replace /Applications/Utilities/Terminal.app with /System/Applications/Utilities/Terminal.app in the ./script and ./run-mbed-cli.py files. Both instances can be found on line 32 of the files.

After the above, the MBEDCLI.app app can be run as expected.

Was this page helpful?
0 / 5 - 0 ratings