Open GeylanKalafMohe opened 1 year ago
same problem
Hello @GeylanKalafMohe. Thank you for filing this issue. Can you please provide the following information?
main.dart
file that can be run directly.flutter doctor -v
flutter run -v
Please provide the information in the form of text. See how to make collapsible sections with Markdown here.
@exaby73 The Flutter doctor logs are already attached.
You can create any new flutter project and try to run it in a onedrive folder and you'll see the complete logs and error.
Can you please provide the entire logs (any sensitive information you can redact) from your machine? Also, is OneDrive streaming files to your machine or is all the files being downloaded to a local copy?
These are the logs. I activated the option "Always Keep on this Device". But the issue happens for both streaming and local copy inside onedrive folder.
lib.zip This is the standard lib folder
Last question: Does this only happen with OneDrive or with other cloud storages as well like Google Drive?
@exaby73 I did not try with any other service other than onedrive.
I can reproduce this issue with Master (3.9.0-20.0.pre.54)
. I can also confirm that this does indeed work when running from Xcode. Tested with the default counter application.
Full error is resource fork, Finder information, or similar detritus not allowed
error: [ +29 ms] Target debug_unpack_ios failed: Exception: Failed to codesign
/Users/testUser/Library/CloudStorage/OneDrive-testUser/Desktop/test_app/build/ios/Debug-ipho
neos/Flutter.framework/Flutter with identity 84C555D4B269BED48D972A57594A968827A8919C.
/Users/testUser/Library/CloudStorage/OneDrive-testUser/Desktop/test_app/build/ios
/Debug-iphoneos/Flutter.framework/Flutter: replacing existing signature
/Users/testUser/Library/CloudStorage/OneDrive-testUser/Desktop/test_app/build/ios
/Debug-iphoneos/Flutter.framework/Flutter: resource fork, Finder information, or similar detritus not
allowed
OneDrive is adding some file extended attributes to everything in its directory, including the frameworks in the build directory, which isn't allowed: https://developer.apple.com/library/archive/qa/qa1940/_index.html
We have seen this before with Flutter apps put in other cloud-synced directories https://github.com/flutter/flutter/issues/18505 https://github.com/flutter/flutter/issues/80978. Looks like the extended attribute is being re-added after Flutter deleted it https://github.com/flutter/flutter/pull/81342. We could move that removal closer to the codesigning command.
@jmagman Moving that removal closer to the codesigning command may fix this issue but the question which I have is the following:
When you say that OneDrive is "adding some file extended attributes to everything in its directory" will it not be dangerous to commit git changes when the Flutter project is inside a OneDrive folder? As it changes things (adding attributes or other..) which originally on a normal Desktop folder would not happen?
I believe though don't quote me extended attributes are maintained locally to your machine somewhere, it's not actually metadata living in the file itself. Updating them doesn't change anything in your working copy.
Frankly I would never put a Flutter app or any development project in a cloud sync directory since the build directory has lots of intermediate files that get updated all the time, there's very large binaries in there, and you definitely don't want another machine syncing on top of it. But people do it, we can't stop them, and we try to make it work as best we can.
https://github.com/flutter/flutter/pull/123896 was an attempt to fix, but it might not work.
@GeylanKalafMohe https://github.com/flutter/flutter/pull/123896 merged to the master channel, would you mind seeing if that works for you? At least one person on our team confirmed it didn't work for them though.
@jmagman @exaby73 Tested on the latest stable flutter version but the issue still happens.
Flutter 3.7.12 • channel stable • https://github.com/flutter/flutter.git Framework • revision 4d9e56e694 (8 days ago) • 2023-04-17 21:47:46 -0400 Engine • revision 1a65d409c7 Tools • Dart 2.19.6 • DevTools 2.20.1
@jmagman @exaby73 Tested on the latest stable flutter version but the issue still happens.
Flutter 3.7.12 • channel stable • https://github.com/flutter/flutter.git Framework • revision 4d9e56e694 (8 days ago) • 2023-04-17 21:47:46 -0400 Engine • revision 1a65d409c7 Tools • Dart 2.19.6 • DevTools 2.20.1
It was merged to the master channel, and not stable. To verify the fix, you would need to verify on master.
Available on 3.10.0-5.0.pre and higher.
@jmagman @exaby73 Tested on the latest stable flutter version but the issue still happens.
Flutter 3.7.12 • channel stable • https://github.com/flutter/flutter.git Framework • revision 4d9e56e694 (8 days ago) • 2023-04-17 21:47:46 -0400 Engine • revision 1a65d409c7 Tools • Dart 2.19.6 • DevTools 2.20.1
It was merged to the master channel, and not stable. To verify the fix, you would need to verify on master.
@jmagman @exaby73 Tested on the latest MASTER flutter version but the issue still happens.
Flutter 3.10.0-15.0.pre.22 • channel master • https://github.com/flutter/flutter.git Framework • revision fdd6b87636 (59 minutes ago) • 2023-04-27 00:29:23 -0400 Engine • revision d9f91aadff Tools • Dart 3.1.0 (build 3.1.0-48.0.dev) • DevTools 2.23.1
Running Xcode build... Xcode build done. 28.5s Failed to build iOS app Could not build the precompiled application for the device. Error (Xcode): Target debug_unpack_ios failed: Exception: Failed to codesign
Thanks for testing this out. It's not too surprising the fix didn't work, I didn't have that PR close this issue because we also saw it didn't resolve the problem in our testing https://github.com/flutter/flutter/pull/123896#pullrequestreview-1371154959, but it was speculative.
In the meantime I'd say don't put your Flutter app in a cloud-synced directory. Use source control.
Frankly I would never put a Flutter app or any development project in a cloud sync directory since the build directory has lots of intermediate files that get updated all the time, there's very large binaries in there, and you definitely don't want another machine syncing on top of it. But people do it, we can't stop them, and we try to make it work as best we can.
This is still an issue when running Flutter from a ExFAT removable drive on MacOS on 3.14.0-14.0.pre.65
Steps to Reproduce
flutter run
or via VSCodeThis issue does not happen when you directly run the same project via Xcode directly
Expected results: The project should run normally
Actual results:
Error (Xcode): Target debug_unpack_ios failed: Exception:
[ +21 ms] Failed to build iOS app
[ +2 ms] Could not build the precompiled application for the device.
Logs
``` flutter doctor -v [✓] Flutter (Channel stable, 3.7.8, on macOS 13.2.1 22D68 darwin-x64, locale en-SA) • Flutter version 3.7.8 on channel stable at /Users/geylankalafmohe/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 90c64ed42b (7 days ago), 2023-03-21 11:27:08 -0500 • Engine revision 9aa7816315 • Dart version 2.19.5 • DevTools version 2.20.1 [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1) • Android SDK at /Users/geylankalafmohe/Library/Android/sdk • Platform android-33, build-tools 33.0.1 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 14.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 14C18 • CocoaPods version 1.11.3 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2021.3) • 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.13+0-b1751.21-8125866) [✓] VS Code (version 1.76.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.60.0 [✓] Connected device (3 available) • Dev iPad (mobile) • 00008101-000E40C80183001E • ios • iOS 16.3.1 20D67 • macOS (desktop) • macos • darwin-x64 • macOS 13.2.1 22D68 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 111.0.5563.146 [✓] HTTP Host Availability • All required HTTP hosts are available • No issues found! ```