Search code examples
macosfluttercontinuous-integrationflutter-dependenciesazure-pipelines-tasks

Issue with Flutter commands from CI/CD pipelines


Hello recently I upgraded my Mac mini from Mojave to Catalina (10.15.4) for new Xcode. Before updating my CI/CD pipeline used to work fine. My CI/CD pipeline is based on Azure. (I use my Machine as a build machine).

After updating to latest OS version and updating even the XCode. While running the pipeline it fails at "Flutter packages get" step showing this message ##[error]bash: "/Users/soap/documents/flutter/bin/flutter: Operation not permitted"

But when i run locally in machine (Navigating to my build agents folder and run these commands) it just work fine.

Note:

  • I have give the Full Disk permission to Terminal.
  • Gave R-W-X permissions to all folders.

Please help me out.


Solution

  • You need to grant Java with Full Disk Access privileges.

    1. Open System Preferences
    2. Choose “Security & Privacy”
    3. Select the “Privacy” tab, and from the left-side menu select “Full Disk Access”
    4. Click the lock icon in the lower left corner and authenticate with an admin level login
    5. Click the + button to add an application
    6. Navigate to /usr/bin/java. If you don't see the /usr/ folder, type cmd+shift+.

    Thanks to that, the “Operation not permitted” error was fix on our side.