-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Comments
Hi @adil192 Regarding the error message above, can you try this solution to see if it works? |
This is on a GitHub Actions runner which uses the
I tried running 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 |
@adil192 Did you run it on the project root directory? Can you try @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 |
As a workaround I had to downgrade to 3.10.6 :( |
Same problem here - suggested workaround in |
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. |
@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 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 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 flutter build macos
echo "Setting read permissions (for all users) on build directory"
chmod -R a+r build |
@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
Files permission➜ codemagic_cli_distribution.app git:(main) ✗ pwd
/Users/huynq/Desktop/codemagic_cli_distribution/build/macos/Build/Products/Release/codemagic_cli_distribution.app
➜ codemagic_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
Files permission➜ codemagic_cli_distribution.app git:(main) ✗ pwd
/Users/huynq/Desktop/codemagic_cli_distribution/build/macos/Build/Products/Release/codemagic_cli_distribution.app
➜ codemagic_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 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. |
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 |
To add to this, I've made a code sample project on the I deleted everything except for the Edit: |
@godofredoc, all file permissions look correct to me in |
We are also having this issue with using code magic, any solution? |
@iampopal This is the current workaround: #132725 (comment), example: SharezoneApp/sharezone-app#866 |
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
Thank you for this fix,
But we still didn't know how to implement this into codemagic. We really
need a fix for this.
…On Thu, 14 Sep 2023 at 2:04 PM Nils Reichardt ***@***.***> wrote:
@iampopal <https://github.com/iampopal> This is the current workaround: #132725
(comment)
<#132725 (comment)>,
example: SharezoneApp/sharezone-app#866
<SharezoneApp/sharezone-app#866>
—
Reply to this email directly, view it on GitHub
<#132725 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIUFLXDCZSEF2VXQSBGJ7UTX2LFR5ANCNFSM6AAAAAA3TMHQFY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@godofredoc Fixed flutter/engine#45598 this issue? |
@nilsreichardt, yes but it still needs to roll to the framework. @iampopal which channel of the flutter are you using? master, beta, stable? |
@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? |
I am using stable version of flutter, which version shall i use to get this
fix?
…On Thu, 14 Sep 2023 at 8:33 PM Nils Reichardt ***@***.***> wrote:
@godofredoc <https://github.com/godofredoc> When the fix is inside the
framework, I can use the commit that inlcuded flutter/engine#45598
<flutter/engine#45598> into the framework for a cherry-pick
request
<https://github.com/flutter/flutter/wiki/Flutter-Cherrypick-Process>,
right?
—
Reply to this email directly, view it on GitHub
<#132725 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIUFLXDQRZMTQRSFUWE73VTX2MTDRANCNFSM6AAAAAA3TMHQFY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
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. |
Thank,
Please share update here when this fix is included in upcoming stable
release.
…On Thu, 14 Sep 2023 at 8:54 PM godofredoc ***@***.***> wrote:
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.
—
Reply to this email directly, view it on GitHub
<#132725 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIUFLXCJHWCLJCNLQKLKTVTX2MVVVANCNFSM6AAAAAA3TMHQFY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks @nilsreichardt once post-submit testing has completed I'll close this issue and share the cherry-pick requests to stable and beta. |
Cool, thanks for creating a cherry-pick request, @godofredoc 🙏 |
@Jasguerrero Thanks for releasing a new hotfix (v3.13.5):
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 |
Since flutter/flutter#132725 is now included in the new Flutter hotfix update v3.13.5, we can remove this workaround. Requires #1047
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 |
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
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
Flutter Doctor output
Doctor output
Note that this was run on the GitHub Actions runner:
Edit: This is also happening with Saber (another one of my apps).
The text was updated successfully, but these errors were encountered: