Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The installer package includes files that are only readable by the root user (3.13.0) #132725

Closed
2 tasks done
adil192 opened this issue Aug 17, 2023 · 48 comments
Closed
2 tasks done
Assignees
Labels
a: build Building flutter applications with the tool a: desktop Running on desktop c: regression It was better in the past than it is now P2 Important issues not at the top of the work list platform-mac Building on or for macOS specifically r: fixed Issue is closed as already fixed in a newer version team-engine Owned by Engine team workaround available There is a workaround available to overcome the issue

Comments

@adil192
Copy link

adil192 commented Aug 17, 2023

Is there an existing issue for this?

Steps to reproduce

Follow https://docs.flutter.dev/deployment/macos#create-a-build-archive-with-codemagic-cli-tools up to and including app-store-connect publish --path "$PACKAGE_NAME"

Expected results

Publishing to the App Store works

Actual results

2023-08-17 01:59:37.169  INFO: Show Progress: Waiting for App Store Connect SPI analysis response…
2023-08-17 02:01:23.077  INFO: Show Progress: Upload failed.
Asset validation failed
The installer package includes files that are only readable by the root user. This will prevent verification of the application's code signature when your app is run. Ensure that non-root users can read the files in your app. (ID: 7e9d5e25-9883-4df3-a89f-b2816e3e1723)
2023-08-17 02:01:23.077  INFO: 
=============
UPLOAD FAILED with 1 error.
=============
{"tool-version":"6.043.14043","tool-path":"\/Applications\/Xcode_14.2.app\/Contents\/SharedFrameworks\/ContentDeliveryServices.framework\/Versions\/A\/Frameworks\/AppStoreService.framework","os-version":"12.6.7","product-errors":[{"message":"Asset validation failed","userInfo":{"NSLocalizedFailureReason":"The installer package includes files that are only readable by the root user. This will prevent verification of the application's code signature when your app is run. Ensure that non-root users can read the files in your app. (ID: 7e9d5e25-9883-4df3-a89f-b2816e3e1723)","NSLocalizedDescription":"Asset validation failed","original_server_error":{"status":"409","id":"7e9d5e25-9883-4df3-a89f-b2816e3e1723","code":"STATE_ERROR.VALIDATION_ERROR.90255","title":"Asset validation failed","detail":"The installer package includes files that are only readable by the root user. This will prevent verification of the application's code signature when your app is run. Ensure that non-root users can read the files in your app."}},"code":90255}]}


Failed to upload archive at "build/macos/Build/Products/Release/Ricochlime.pkg"
Failed to publish build/macos/Build/Products/Release/Ricochlime.pkg
Error: Process completed with exit code 1.

Code sample

I haven't been able to reproduce this since to get to the point of publishing to the App Store, you need to set up all of the certificates etc. I'm guessing this occurs in a blank Flutter project though.

I can confirm, however, that reverting to Flutter 3.10.6 doesn't have this issue.

Screenshots or Video

No response

Logs

Logs
Publish "build/macos/Build/Products/Release/Ricochlime.pkg" to App Store Connect
Bundle identifier: com.adilhanney.ricochlime
Install size: 51919KB
Version code: 5000
Version: 0.5.0

Upload "build/macos/Build/Products/Release/Ricochlime.pkg" to App Store Connect
2023-08-17 01:58:52.863  INFO: ContentDelivery version 2.141.101 (141101).
2023-08-17 01:58:52.866  INFO: Show Progress: Contacting Apple Services…
2023-08-17 01:58:53.253  INFO: Received build ID: 2ad9c639-c1cd-428d-8852-fda1f2482567
2023-08-17 01:58:53.254  INFO: Show Progress: Making copy of ‘Ricochlime.pkg’…
2023-08-17 01:58:53.258  INFO: Show Progress: Preparing to upload ‘Ricochlime.pkg’…
2023-08-17 01:58:53.323  INFO: Show Progress: Analyzing package…
2023-08-17 01:59:27.503  INFO: Show Progress: Sending analysis to App Store Connect…
2023-08-17 01:59:27.658  INFO: COMPLETED - PART 1 - asset-description-7A7A7DB4-CA1D-4C43-8C0C-6C16908C3832.xml - eTag: "13390147FC1CACB9B3A15C2BAFE1905F"
2023-08-17 01:59:27.662  INFO: Show Progress: Waiting for App Store Connect analysis response…
2023-08-17 01:59:36.215 *** Error: ERROR: Asset validation failed (90255) The installer package includes files that are only readable by the root user. This will prevent verification of the application's code signature when your app is run. Ensure that non-root users can read the files in your app. (ID: 7e9d5e25-9883-4df3-a89f-b2816e3e1723)
2023-08-17 01:59:36.663  INFO: Show Progress: Sending SPI analysis to App Store Connect…
2023-08-17 01:59:36.994  INFO: COMPLETED - PART 1 - DTAppAnalyzerExtractorOutput-80C2D7FD-2FBA-4C4C-933E-D64EBF5B72D2.zip - eTag: "A3D0EA536B66AEADC014CD3643C3C615"
2023-08-17 01:59:37.077  INFO: COMPLETED - PART 4 - DTAppAnalyzerExtractorOutput-80C2D7FD-2FBA-4C4C-933E-D64EBF5B72D2.zip - eTag: "9E53CF42A803A4BC10D6521FD748E71B"
2023-08-17 01:59:37.092  INFO: COMPLETED - PART 2 - DTAppAnalyzerExtractorOutput-80C2D7FD-2FBA-4C4C-933E-D64EBF5B72D2.zip - eTag: "11355DC834E9AF31B82E04048AA496B1"
2023-08-17 01:59:37.165  INFO: COMPLETED - PART 3 - DTAppAnalyzerExtractorOutput-80C2D7FD-2FBA-4C4C-933E-D64EBF5B72D2.zip - eTag: "F1A76EEED562D78C1171AAC230695A1B"
2023-08-17 01:59:37.169  INFO: Show Progress: Waiting for App Store Connect SPI analysis response…
2023-08-17 02:01:23.077  INFO: Show Progress: Upload failed.
Asset validation failed
The installer package includes files that are only readable by the root user. This will prevent verification of the application's code signature when your app is run. Ensure that non-root users can read the files in your app. (ID: 7e9d5e25-9883-4df3-a89f-b2816e3e1723)
2023-08-17 02:01:23.077  INFO: 
=============
UPLOAD FAILED with 1 error.
=============
{"tool-version":"6.043.14043","tool-path":"\/Applications\/Xcode_14.2.app\/Contents\/SharedFrameworks\/ContentDeliveryServices.framework\/Versions\/A\/Frameworks\/AppStoreService.framework","os-version":"12.6.7","product-errors":[{"message":"Asset validation failed","userInfo":{"NSLocalizedFailureReason":"The installer package includes files that are only readable by the root user. This will prevent verification of the application's code signature when your app is run. Ensure that non-root users can read the files in your app. (ID: 7e9d5e25-9883-4df3-a89f-b2816e3e1723)","NSLocalizedDescription":"Asset validation failed","original_server_error":{"status":"409","id":"7e9d5e25-9883-4df3-a89f-b2816e3e1723","code":"STATE_ERROR.VALIDATION_ERROR.90255","title":"Asset validation failed","detail":"The installer package includes files that are only readable by the root user. This will prevent verification of the application's code signature when your app is run. Ensure that non-root users can read the files in your app."}},"code":90255}]}


Failed to upload archive at "build/macos/Build/Products/Release/Ricochlime.pkg"
Failed to publish build/macos/Build/Products/Release/Ricochlime.pkg
Error: Process completed with exit code 1.

Flutter Doctor output

Doctor output

Note that this was run on the GitHub Actions runner:

  ╔════════════════════════════════════════════════════════════════════════════╗
  ║                 Welcome to Flutter! - https://flutter.dev/                  ║
  ║                                                                            ║
  ║ The Flutter tool uses Google Analytics to anonymously report feature usage ║
  ║ statistics and basic crash reports. This data is used to help improve      ║
  ║ Flutter tools over time.                                                   ║
  ║                                                                            ║
  ║ Flutter tool analytics are not sent on the very first run. To disable      ║
  ║ reporting, type 'flutter config --no-analytics'. To display the current    ║
  ║ setting, type 'flutter config'. If you opt out of analytics, an opt-out    ║
  ║ event will be sent, and then no further information will be sent by the    ║
  ║ Flutter tool.                                                              ║
  ║                                                                            ║
  ║ By downloading the Flutter SDK, you agree to the Google Terms of Service.  ║
  ║ Note: The Google Privacy Policy describes how data is handled in this      ║
  ║ service.                                                                   ║
  ║                                                                            ║
  ║ Moreover, Flutter includes the Dart SDK, which may send usage metrics and  ║
  ║ crash reports to Google.                                                   ║
  ║                                                                            ║
  ║ Read about data we send with crash reports:                                ║
  ║ https://flutter.dev/docs/reference/crash-reporting                         ║
  ║                                                                            ║
  ║ See Google's privacy policy:                                               ║
  ║ https://policies.google.com/privacy                                        ║
  ╚════════════════════════════════════════════════════════════════════════════╝
Could not parse java version from: 
If there is a version please look for an existing bug https://github.com/flutter/flutter/issues/ and if one does not exist file a new issue.
[✓] Flutter (Channel stable, 3.13.0, on macOS 12.6.7 21G651 darwin-x64, locale en)
    • Flutter version 3.13.0 on channel stable at /Users/runner/hostedtoolcache/flutter/stable-3.13.0-x64
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision efbf63d9c6 (25 hours ago), 2023-08-15 21:05:06 -0500
    • Engine revision 1ac611c64e
    • Dart version 3.1.0
    • DevTools version 2.25.0
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/runner/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/runner/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/runner/Library/Android/sdk
    • Java binary at: /Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/8.0.382-5/x64/Contents/Home/bin/java
    ✗ Could not determine java version
    ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode_14.2.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.12.1
[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 12.6.7 21G651 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 115.0.5790.170
[✓] Network resources
    • All expected network resources are available.
! Doctor found issues in 2 categories.
The Flutter CLI developer tool uses Google Analytics to report usage and diagnostic data
along with package dependencies, and crash reporting to send basic crash reports.
This data is used to help improve the Dart platform, Flutter framework, and related tools.
Telemetry is not sent on the very first run.
To disable reporting of telemetry, run this terminal command:
flutter --disable-telemetry.
If you opt out of telemetry, an opt-out event will be sent,
and then no further information will be sent.
This data is collected in accordance with the
Google Privacy Policy (https://policies.google.com/privacy).

Edit: This is also happening with Saber (another one of my apps).

@huycozy huycozy added the in triage Presently being triaged by the triage team label Aug 17, 2023
@huycozy
Copy link
Member

huycozy commented Aug 17, 2023

Hi @adil192
Which type of user did you log in when you build the app? (root or normal user?)

Regarding the error message above, can you try this solution to see if it works?

@huycozy huycozy added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Aug 17, 2023
@adil192
Copy link
Author

adil192 commented Aug 17, 2023

Hi @adil192 Which type of user did you log in when you build the app? (root or normal user?)

This is on a GitHub Actions runner which uses the runner user (which isn't root).

Regarding the error message above, can you try this solution to see if it works?

I tried running xattr -rc * on my local machine and git status doesn't show that anything changed. I also ran ls -l@ to see if anything had extended attributes and it doesn't show anything:

ls -l@
Adils-MacBook-Air:ricochlime adilhanney$ ls -l@ assets/images/
total 120
-rw-r--r--  1 adilhanney  staff    585 17 Aug 03:44 LICENSE.txt
-rw-r--r--  1 adilhanney  staff   5787 17 Aug 03:44 plains.png
-rw-r--r--  1 adilhanney  staff  12465 17 Aug 03:44 player.png
-rw-r--r--  1 adilhanney  staff   4413 17 Aug 03:44 slime.png
-rw-r--r--  1 adilhanney  staff   1397 17 Aug 03:44 water1.png
-rw-r--r--  1 adilhanney  staff   1410 17 Aug 03:44 water2.png
-rw-r--r--  1 adilhanney  staff   1425 17 Aug 03:44 water3.png
-rw-r--r--  1 adilhanney  staff   1427 17 Aug 03:44 water4.png
-rw-r--r--  1 adilhanney  staff   1410 17 Aug 03:44 water5.png
-rw-r--r--  1 adilhanney  staff   1430 17 Aug 03:44 water6.png

Adils-MacBook-Air:ricochlime adilhanney$ ls -l@
total 168
-rw-r--r--   1 adilhanney  staff  34260 17 Aug 03:44 LICENSE.md
-rw-r--r--   1 adilhanney  staff   1391 17 Aug 03:44 README.md
-rw-r--r--   1 adilhanney  staff   2357 17 Aug 03:44 analysis_options.yaml
drwxr-xr-x  14 adilhanney  staff    448 17 Aug 03:44 android
drwxr-xr-x   4 adilhanney  staff    128 17 Aug 03:44 appimage
drwxr-xr-x   4 adilhanney  staff    128 17 Aug 03:44 assets
drwxr-xr-x   8 adilhanney  staff    256 17 Aug 03:44 assets_raw
drwxr-xr-x   5 adilhanney  staff    160 17 Aug 03:44 flatpak
-rw-r--r--   1 adilhanney  staff    842 17 Aug 03:42 flutter_test_macos_build.iml
drwxr-xr-x   3 adilhanney  staff     96 17 Aug 03:44 installers
drwxr-xr-x   9 adilhanney  staff    288 17 Aug 03:44 ios
drwxr-xr-x   8 adilhanney  staff    256 17 Aug 03:44 lib
drwxr-xr-x   8 adilhanney  staff    256 17 Aug 03:44 linux
drwxr-xr-x  10 adilhanney  staff    320 17 Aug 03:44 macos
drwxr-xr-x   3 adilhanney  staff     96 17 Aug 03:44 metadata
drwxr-xr-x   3 adilhanney  staff     96 17 Aug 03:44 patches
-rw-r--r--   1 adilhanney  staff   1514 17 Aug 03:44 privacy_policy.md
-rw-r--r--   1 adilhanney  staff  18653 17 Aug 03:57 pubspec.lock
-rw-r--r--   1 adilhanney  staff   4333 17 Aug 03:44 pubspec.yaml
drwxr-xr-x   3 adilhanney  staff     96 17 Aug 03:44 scripts
-rw-r--r--   1 adilhanney  staff    147 17 Aug 03:44 slang.yaml
drwxr-xr-x   3 adilhanney  staff     96 17 Aug 03:44 snap
drwxr-xr-x   4 adilhanney  staff    128 17 Aug 03:44 test
drwxr-xr-x   7 adilhanney  staff    224 17 Aug 03:44 web
drwxr-xr-x   6 adilhanney  staff    192 17 Aug 03:44 windows

Another thing I tried (unsuccessfully) is running chown on the GitHub Actions workflow on everything right after cloning, after flutter build macos, and after packaging and signing.

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Aug 17, 2023
@AndreiMisiukevich
Copy link

I've run into the same issue today with code magic CI.

Xcode 14.3.1
cocoapods (1.12.1)
flutter_macos_arm64_3.13.0-stable.zip

image

@huycozy
Copy link
Member

huycozy commented Aug 18, 2023

I tried running xattr -rc * on my local machine

@adil192 Did you run it on the project root directory? Can you try xattr on *.app after building Flutter macOS? (right after step 12th on the instruction above)

@AndreiMisiukevich Please try the same.


UPDATE: If it can not make this work, please try the suggested solution here: https://github.com/orgs/codemagic-ci-cd/discussions/1498#discussioncomment-5381028

@huycozy huycozy added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Aug 18, 2023
@JulienDev
Copy link

JulienDev commented Aug 18, 2023

Same problem here:

image

@JulienDev
Copy link

As a workaround I had to downgrade to 3.10.6 :(
flutter downgrade v3.10.6

@jayjah
Copy link

jayjah commented Aug 19, 2023

I tried running xattr -rc * on my local machine

@adil192 Did you run it on the project root directory? Can you try xattr on *.app after building Flutter macOS? (right after step 12th on the instruction above)

@AndreiMisiukevich Please try the same.

UPDATE: If it can not make this work, please try the suggested solution here: https://github.com/orgs/codemagic-ci-cd/discussions/1498#discussioncomment-5381028

Same problem here - suggested workaround in codemagic-ci-cd/discussions does not work for me.

@adil192
Copy link
Author

adil192 commented Aug 21, 2023

I tried running xattr -rc * on my local machine

@adil192 Did you run it on the project root directory? Can you try xattr on *.app after building Flutter macOS? (right after step 12th on the instruction above)

@AndreiMisiukevich Please try the same.

UPDATE: If it can not make this work, please try the suggested solution here: https://github.com/orgs/codemagic-ci-cd/discussions/1498#discussioncomment-5381028

Here are the commands I ran (on the GitHub Actions runner):

  - name: Build for macOS
    run: |
      flutter build macos
      ls -l@ build/macos/Build/Products/Release
      xattr build/macos/Build/Products/Release/*.app
      echo 'Removing extended attributes'
      xattr -rc build/macos/Build/Products/Release/*.app
      echo 'Setting frag shader permissions'
      find build/macos/Build/Products/Release -name "*.frag" -exec chmod 0644 {} \;

and the output:

Updating project for Xcode compatibility.
Upgrading project.pbxproj
Upgrading Runner.xcscheme
Running pod install...                                           1,758ms
Building macOS application...                                   
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Flutter Assemble' from project 'Runner')
total 0
drwxr-xr-x  5 runner  staff  160 Aug 21 15:57 App.framework
drwxr-xr-x  3 runner  staff   96 Aug 21 15:57 App.framework.dSYM
drwxr-xr-x@ 2 runner  staff   64 Aug 21 15:54 FlutterMacOS
	com.apple.xcode.CreatedByBuildSystem	  4 
drwxr-xr-x  7 runner  staff  224 Aug 16 17:15 FlutterMacOS.framework
drwxr-xr-x  7 runner  staff  224 Aug 21 15:54 Pods_Runner.framework
drwxr-xr-x  3 runner  staff   96 Aug 21 15:57 Ricochlime.app
drwxr-xr-x  3 runner  staff   96 Aug 21 15:57 Ricochlime.app.dSYM
drwxr-xr-x  9 runner  staff  288 Aug 21 15:57 Ricochlime.swiftmodule
drwxr-xr-x@ 4 runner  staff  128 Aug 21 15:54 path_provider_foundation
	com.apple.xcode.CreatedByBuildSystem	  4 
drwxr-xr-x@ 4 runner  staff  128 Aug 21 15:54 shared_preferences_foundation
	com.apple.xcode.CreatedByBuildSystem	  4 
Removing extended attributes
Setting frag shader permissions

Publishing to the App Store fails with the same error. I've attached the full logs if they're relevant.
logs_409.zip

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Aug 21, 2023
@huycozy
Copy link
Member

huycozy commented Aug 22, 2023

@adil192 Thanks for the info. I haven't had a fully-configured CLI tool set up to check this now but I just tried publishing distribution via XCode and it works without issue. Can you also try and confirm?

Also, I wonder if this issue only occurs in CI or also in local environment?

UPDATE: A hint to debug this is to unzip ipa/pkg file and check which files have incorrect permissions.

@huycozy huycozy added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Aug 22, 2023
@adil192
Copy link
Author

adil192 commented Aug 23, 2023

@huycozy I wasn't able to publish via Xcode since selecting Product > Archive always yields "Build failed".

However, I extracted the package file (from CI) with pkgutil --expand Ricochlime.pkg Ricochlimepkg:

Adils-MacBook-Air:Downloads adilhanney$ ls -al@ Ricochlimepkg/
total 8
drwxr-xr-x   4 adilhanney  staff   128 23 Aug 14:22 .
drwx------+ 19 adilhanney  staff   608 23 Aug 14:22 ..
-rw-r--r--@  1 adilhanney  staff  1196 23 Aug 14:22 Distribution
	com.apple.lastuseddate#PS	  16 
drwx------   5 adilhanney  staff   160 23 Aug 14:22 com.adilhanney.ricochlime.pkg

Adils-MacBook-Air:com.adilhanney.ricochlime.pkg adilhanney$ ls -al@
total 39560
drwxr-----@ 5 adilhanney  staff       160 23 Aug 14:22 .
	com.apple.lastuseddate#PS	      16 
drwxr-xr-x  5 adilhanney  staff       160 23 Aug 14:27 ..
-rw-r--r--  1 adilhanney  staff     53711 23 Aug 14:13 Bom
-rw-r--r--  1 adilhanney  staff       918 23 Aug 14:22 PackageInfo
-rw-r--r--  1 adilhanney  staff  20191018 23 Aug 14:13 Payload

I've uploaded the pkg here: Ricochlime-macOS-Archive.zip

Running a find command for files not readable by the group yields this:

Adils-MacBook-Air:Ricochlime.app adilhanney$ find . -type f ! -perm -g+r
./Contents/Frameworks/FlutterMacOS.framework/Versions/A/Resources/icudtl.dat
./Contents/Frameworks/FlutterMacOS.framework/Versions/A/Resources/Info.plist
./Contents/Frameworks/FlutterMacOS.framework/Versions/A/FlutterMacOS
Adils-MacBook-Air:Ricochlime.app adilhanney$ ls -al@ ./Contents/Frameworks/FlutterMacOS.framework/Versions/A/Resources/
total 1608
drwx------  4 adilhanney  staff     128 16 Aug 02:09 .
drwx------  5 adilhanney  staff     160 23 Aug 14:13 ..
-rw-------  1 adilhanney  staff     717 16 Aug 02:09 Info.plist
-rw-------  1 adilhanney  staff  817168 16 Aug 02:09 icudtl.dat
Adils-MacBook-Air:Ricochlime.app adilhanney$ ls -al@ ./Contents/Frameworks/FlutterMacOS.framework/Versions/A/
total 52032
drwx------  5 adilhanney  staff       160 23 Aug 14:13 .
drwx------  4 adilhanney  staff       128 16 Aug 02:14 ..
-rwx------  1 adilhanney  staff  26640240 23 Aug 14:13 FlutterMacOS
drwx------  4 adilhanney  staff       128 16 Aug 02:09 Resources
drwx------  3 adilhanney  staff        96 16 Aug 02:16 _CodeSignature

However, running chmod right after flutter build macos doesn't work (same error message):

flutter build macos

echo "Setting read permissions (for all users) on build directory"
chmod -R a+r build

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Aug 23, 2023
@huycozy
Copy link
Member

huycozy commented Aug 24, 2023

@adil192 Thanks for your updated information. Even though I still can publish via Xcode normally, I can see the different permissions on those files you found above inside the built app (FlutterMacOS.framework) between Flutter versions in local environment.

Check on Flutter versions

  • On 3.13.0 / 3.13.1 / master channels: There are sufficient permissions for owner but no permission for group and others.
Files permission
codemagic_cli_distribution.app git:(main) ✗ pwd
/Users/huynq/Desktop/codemagic_cli_distribution/build/macos/Build/Products/Release/codemagic_cli_distribution.appcodemagic_cli_distribution.app git:(main) ✗ ls -al@ ./Contents/Frameworks/FlutterMacOS.framework/Versions/A/
\total 52032
drwx------@ 5 huynq  staff       160 Aug 24 10:43 .
        com.apple.provenance          11 
drwx------@ 4 huynq  staff       128 Aug 23 05:09 ..
        com.apple.provenance          11 
-rwx------@ 1 huynq  staff  26640048 Aug 24 10:43 FlutterMacOS
        com.apple.provenance          11 
drwx------@ 4 huynq  staff       128 Aug 23 05:04 Resources
        com.apple.provenance          11 
drwx------@ 3 huynq  staff        96 Aug 23 05:11 _CodeSignature
        com.apple.provenance          11 codemagic_cli_distribution.app git:(main) ✗ ls -al@ ./Contents/Frameworks/FlutterMacOS.framework/Versions/A/Resources/
total 1608
drwx------@ 4 huynq  staff     128 Aug 24 08:21 .
        com.apple.provenance        11 
drwx------@ 5 huynq  staff     160 Aug 24 10:51 ..
        com.apple.provenance        11 
-rw-------@ 1 huynq  staff     717 Aug 24 08:21 Info.plist
        com.apple.provenance        11 
-rw-------@ 1 huynq  staff  817232 Aug 24 08:21 icudtl.dat
        com.apple.provenance        11 
  • On 3.10.6: Having sufficient permissions for owner, group and others.
Files permission
codemagic_cli_distribution.app git:(main) ✗ pwd
/Users/huynq/Desktop/codemagic_cli_distribution/build/macos/Build/Products/Release/codemagic_cli_distribution.appcodemagic_cli_distribution.app git:(main) ✗ ls -al@ ./Contents/Frameworks/FlutterMacOS.framework/Versions/A/
total 53576
drwxr-xr-x@ 5 huynq  staff       160 Aug 23 22:52 .
        com.apple.provenance          11 
drwxr-xr-x@ 4 huynq  staff       128 Jul 13 02:28 ..
        com.apple.provenance          11 
-rwxr-xr-x@ 1 huynq  staff  27427168 Aug 23 22:52 FlutterMacOS
        com.apple.provenance          11 
drwxr-xr-x@ 4 huynq  staff       128 Jul 13 02:27 Resources
        com.apple.provenance          11 
drwxr-xr-x@ 3 huynq  staff        96 Jul 13 03:57 _CodeSignature
        com.apple.provenance          11 codemagic_cli_distribution.app git:(main) ✗ ls -al@ ./Contents/Frameworks/FlutterMacOS.framework/Versions/A/Resources/
total 1608
drwxr-xr-x@ 4 huynq  staff     128 Jul 13 02:27 .
        com.apple.provenance        11 
drwxr-xr-x@ 5 huynq  staff     160 Aug 23 22:52 ..
        com.apple.provenance        11 
-rw-r--r--@ 1 huynq  staff     717 Jul  8 05:00 Info.plist
        com.apple.provenance        11 
-rw-r--r--@ 1 huynq  staff  817168 Jul 13 02:07 icudtl.dat
        com.apple.provenance        11 

It seems good with files in App.framework as they have sufficient permissions (read, execute).

flutter doctor -v (stable and master)
[✓] Flutter (Channel stable, 3.13.1, on macOS 13.5 22G74 darwin-x64, locale en-VN)
    • Flutter version 3.13.1 on channel stable at /Users/huynq/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision e1e47221e8 (23 hours ago), 2023-08-22 21:43:18 -0700
    • Engine revision b20183e040
    • Dart version 3.1.0
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-34, build-tools 32.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] VS Code (version 1.81.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.70.0

[✓] Connected device (3 available)
    • iPhone (mobile) • d9a94afe2b649fef56ba0bfeb052f0f2a7dae95e • ios            • iOS 15.7.2 19H218
    • macOS (desktop) • macos                                    • darwin-x64     • macOS 13.5 22G74 darwin-x64
    • Chrome (web)    • chrome                                   • web-javascript • Google Chrome 116.0.5845.96

[✓] Network resources
    • All expected network resources are available.

• No issues found!
[!] Flutter (Channel master, 3.14.0-9.0.pre.69, on macOS 13.5 22G74 darwin-x64, locale en-VN)
    • Flutter version 3.14.0-9.0.pre.69 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b32cd68f31 (64 minutes ago), 2023-08-23 22:24:03 -0400
    • Engine revision aa98a9d2e8
    • Dart version 3.2.0 (build 3.2.0-97.0.dev)
    • DevTools version 2.26.2
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-34, build-tools 32.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] VS Code (version 1.81.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.70.0

[✓] Connected device (3 available)
    • iPhone (mobile) • d9a94afe2b649fef56ba0bfeb052f0f2a7dae95e • ios            • iOS 15.7.2 19H218
    • macOS (desktop) • macos                                    • darwin-x64     • macOS 13.5 22G74 darwin-x64
    • Chrome (web)    • chrome                                   • web-javascript • Google Chrome 116.0.5845.96

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

I wonder if this difference is the main cause of the original issue above as I still can publish app to App Store Connect normally. Since JulienDev mentioned this worked on previous release 3.10.6, I will mark this as a regression for more information from others.

@huycozy huycozy added tool Affects the "flutter" command-line tool. See also t: labels. platform-mac Building on or for macOS specifically a: desktop Running on desktop a: build Building flutter applications with the tool team-desktop c: regression It was better in the past than it is now and removed in triage Presently being triaged by the triage team labels Aug 24, 2023
@gspencergoog
Copy link
Contributor

Could this be that your umask is set to something other than 0022? If you had a umask 0077, would cause what you are seeing, I think.

(Desktop Triage)

@gspencergoog gspencergoog added P2 Important issues not at the top of the work list triaged-desktop labels Aug 24, 2023
@adil192
Copy link
Author

adil192 commented Aug 24, 2023

Could this be that your umask is set to something other than 0022? If you had a umask 0077, would cause what you are seeing, I think.

(Desktop Triage)

On my local machine:

Adils-MacBook-Air:~ adilhanney$ umask
0022
Adils-MacBook-Air:~ adilhanney$ umask -S
u=rwx,g=rx,o=rx

And on the GitHub Actions runner, I get the same:

0022
u=rwx,g=rx,o=rx

@adil192
Copy link
Author

adil192 commented Aug 26, 2023

To add to this, I've made a code sample project on the empty-macos branch here: https://github.com/adil192/ricochlime/tree/empty-macos.

I deleted everything except for the .git folder (for obvious reasons) and the .github folder (which holds the macos build workflow). Then I ran flutter create . --platforms=macos, made some minor changes to make the project buildable, and experienced the same "only readable by the root user" error.

Commits on the empty-macos branch

Edit:
That was on the stable channel (Flutter 3.13.1).
I've just tried the master channel too (229b74d) and this issue doesn't occur!

@priitlatt
Copy link
Contributor

@godofredoc, all file permissions look correct to me in gs://flutter_archives_v2/flutter_infra_release/flutter/cc02b6b7a29c30ef60d3d01770e5fa6d0e3eca09/darwin-x64/FlutterMacOS.framework.zip.

@iampopal
Copy link

We are also having this issue with using code magic, any solution?

@nilsreichardt
Copy link
Contributor

@iampopal This is the current workaround: #132725 (comment), example: SharezoneApp/sharezone-app#866

auto-submit bot pushed a commit to flutter/engine that referenced this issue Sep 14, 2023
Makes mac framework readable and executable by all.

Bug: flutter/flutter#132725

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
@iampopal
Copy link

iampopal commented Sep 14, 2023 via email

@nilsreichardt
Copy link
Contributor

@godofredoc Fixed flutter/engine#45598 this issue?

@godofredoc
Copy link
Contributor

@nilsreichardt, yes but it still needs to roll to the framework.

@iampopal which channel of the flutter are you using? master, beta, stable?

@nilsreichardt
Copy link
Contributor

@godofredoc When the fix is inside the framework, I can use the commit that inlcuded flutter/engine#45598 into the framework for a cherry-pick request, right?

@iampopal
Copy link

iampopal commented Sep 14, 2023 via email

@mubin986
Copy link

This is the issue I'm facing in Codemagic

Screenshot 2023-09-14 at 10 06 03 PM

@godofredoc
Copy link
Contributor

Master channel will include the fix soon. I'll report back the flutter/flutter commit that includes the fix.

Stable|Beta channels will get the fix on next week's hotfix releases.

@iampopal
Copy link

iampopal commented Sep 14, 2023 via email

@keyonghan keyonghan added the triaged-infra Triaged by Infrastructure team label Sep 14, 2023
@godofredoc godofredoc added team-engine Owned by Engine team and removed team-infra Owned by Infrastructure team triaged-infra Triaged by Infrastructure team labels Sep 14, 2023
@nilsreichardt
Copy link
Contributor

The fix has been landed in the framework (commit: d2ff241, PR: #134749). I think we can close this issue 👍

@godofredoc
Copy link
Contributor

Thanks @nilsreichardt once post-submit testing has completed I'll close this issue and share the cherry-pick requests to stable and beta.

@nilsreichardt
Copy link
Contributor

Cool, thanks for creating a cherry-pick request, @godofredoc 🙏

@nilsreichardt
Copy link
Contributor

@Jasguerrero Thanks for releasing a new hotfix (v3.13.5):

We are pleased to announce the release of Flutter 3.13.5 to the stable channel; This hotfix release addresses the following issues:

  • flutter/134825 - Fixes an issue where apps built in profile mode would not install or run on physical iOS 17 devices.

In order to get the latest, run ‘flutter upgrade’.

Could it be that you accidentally forgot to add this issue to the changelog? When I'm seeing it correct, have you included in your cherrypicks-flutter-3.13-candidate.0 branch a roll engine commit (f433f56) that includes the cherry-pick for this issue: flutter/engine@bd986c5. Just wanted to make sure if I understand correctly that this issue is fixed with the new hotfix.

@Jasguerrero
Copy link
Contributor

@Jasguerrero Thanks for releasing a new hotfix (v3.13.5):

We are pleased to announce the release of Flutter 3.13.5 to the stable channel; This hotfix release addresses the following issues:

  • flutter/134825 - Fixes an issue where apps built in profile mode would not install or run on physical iOS 17 devices.

In order to get the latest, run ‘flutter upgrade’.

Could it be that you accidentally forgot to add this issue to the changelog? When I'm seeing it correct, have you included in your cherrypicks-flutter-3.13-candidate.0 branch a roll engine commit (f433f56) that includes the cherry-pick for this issue: flutter/engine@bd986c5. Just wanted to make sure if I understand correctly that this issue is fixed with the new hotfix.

You are right thank you for pointing this out! I will update the release notes on the wiki

github-merge-queue bot pushed a commit to SharezoneApp/sharezone-app that referenced this issue Sep 21, 2023
Since flutter/flutter#132725 is now included
in the new Flutter hotfix update v3.13.5, we can remove this workaround.

Requires #1047
@github-actions
Copy link

github-actions bot commented Oct 4, 2023

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: build Building flutter applications with the tool a: desktop Running on desktop c: regression It was better in the past than it is now P2 Important issues not at the top of the work list platform-mac Building on or for macOS specifically r: fixed Issue is closed as already fixed in a newer version team-engine Owned by Engine team workaround available There is a workaround available to overcome the issue
Projects
None yet
Development

No branches or pull requests