Skip to content

[macOS] Incorrect *.frag shader file permissions cause package upload issues #108737

@tgucio

Description

@tgucio

These incorrect permissions cause failures on uploading packages to Apple App Store (e.g. using xcrun altool --upload-app --type osx).

A simple workaround is to change the permissions after build, before running productbuild:

chmod 0644 build/macos/Build/Products/Release/AppName.app/Contents/Frameworks/App.framework/Versions/A/Resources/flutter_assets/shaders/ink_sparkle.frag

Steps to Reproduce

  1. Execute flutter create package_test
  2. Execute flutter build macos in package_test directory
  3. Check *.frag file permissions with % find . -name "*.frag" -exec ls -l {} \;

Expected results: Files to be included in the bundle have read permissions for all users

Actual results: 0400 permissions on files:

% find . -name "*.frag" -exec ls -l {} \;
-rw-------  1 tgucio  staff  7024  1 Aug 16:15 ./build/macos/Build/Products/Release/App.framework/Versions/A/Resources/flutter_assets/shaders/ink_sparkle.frag
-rw-------  1 tgucio  staff  7024  1 Aug 16:15 ./build/macos/Build/Products/Release/macos_package_test.app/Contents/Frameworks/App.framework/Versions/A/Resources/flutter_assets/shaders/ink_sparkle.frag
Logs
% find . -name "*.frag" -exec ls -l {} \;
-rw-------  1 tgucio  staff  7024  1 Aug 16:15 ./build/macos/Build/Products/Release/App.framework/Versions/A/Resources/flutter_assets/shaders/ink_sparkle.frag
-rw-------  1 tgucio  staff  7024  1 Aug 16:15 ./build/macos/Build/Products/Release/macos_package_test.app/Contents/Frameworks/App.framework/Versions/A/Resources/flutter_assets/shaders/ink_sparkle.frag
% flutter doctor -v
[✓] Flutter (Channel master, 3.1.0-0.0.pre.2009, on macOS 12.4 21F79 darwin-x64, locale en-GB)
    • Flutter version 3.1.0-0.0.pre.2009 on channel master at /Library/Frameworks/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9d96c7b8be (10 hours ago), 2022-08-01 00:39:06 -0400
    • Engine revision cf0db3e546
    • Dart version 2.19.0 (build 2.19.0-49.0.dev)
    • DevTools version 2.16.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/tgucio/Library/Android/sdk
    • Platform android-31, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 13F100
    • CocoaPods version 1.11.2

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

[✓] Android Studio (version 2021.1)
    • 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 11.0.11+0-b60-7590822)

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

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 12.4 21F79 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 103.0.5060.134

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: buildBuilding flutter applications with the toola: desktopRunning on desktopfound in release: 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-macBuilding on or for macOS specificallytoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions