Closed ziz19 closed 3 years ago
@ziz19 your flutter version is dated can you please run
flutter channel stable
flutter upgrade -f
your updated flutter doctor -v
, your flutter run -v
and a minimal reproducible code sample
@iapicca Below is my updated doctor diagnosis
[✓] Flutter (Channel stable, 2.0.4, on macOS 11.2.3 20D91 darwin-x64, locale en-US)
• Flutter version 2.0.4 at /Users/zinan/opt/flutter
• Framework revision b1395592de (2 days ago), 2021-04-01 14:25:01 -0700
• Engine revision 2dce47073a
• Dart version 2.12.2
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[!] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage
on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] 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).
[✓] IntelliJ IDEA Ultimate Edition (version 2020.3)
• IntelliJ at /Users/zinan/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
• 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
[✓] VS Code (version 1.55.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.21.0
[✓] Connected device (2 available)
• iPhone 12 Pro Max (mobile) • 2FACB414-2E2A-43FC-9F5B-ACCE70B14E8B • ios •
com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.114
The minimal code is below: open the terminal and type the following commands
open -a Simulator.app
flutter create myapp
cd myapp
flutter run
This will successfully run the initialized flutter app. Then in the terminal press ctrl-c to terminate the running app.
And run the app again using flutter run
The error occurs.
@ziz19 Do you see this problem if you run twice from Xcode?
@ziz19 Do you see this problem if you run twice from Xcode?
It's strange that I could not run the app from Xcode. I followed the documentation https://flutter.dev/docs/get-started/install/macos to open the workspace in Xcode using open ios/Runner.xcworkspace,
select the simulator and hit build&run on the top. This gives me the building error.
Hi @ziz19 Following the steps from https://github.com/flutter/flutter/issues/79689#issuecomment-812915604 on the same, doesn't have any issue when running the app second time from the command line.
Can you please provide logs using the same steps you provided, instead of using flutter_complete_guide
app
open -a Simulator.app
flutter create myapp
cd myapp
flutter run -v
Please provide run logs from above steps
However, the app fails to run from ios/Runner.xcworkspace
, run into the same issue as you.
To reproduce the Xcode issue, run the app once from the terminal and open ios/Runner.xcworkspace
and run the app on the same simulator, this only happens on the stable
channel.
Hello @TahaTesser I performed a steps of
open -a Simulator.app
flutter create myapp
cd myapp
flutter run -v
ctrl-c to stop the process, and
flutter run
again.
The log contains the first and second outputs fromflutter run -v
flutter_log_1.txt
flutter_log_2.txt
Hi @ziz19 Following the steps from #79689 (comment) on the same, doesn't have any issue when running the app second time from the command line.
Can you please provide logs using the same steps you provided, instead of using
flutter_complete_guide
appopen -a Simulator.app flutter create myapp cd myapp flutter run -v
Please provide run logs from above steps
However, the app fails to run from
ios/Runner.xcworkspace
, run into the same issue as you right. To reproduce the Xcode issue, run the app once from terminal and openios/Runner.xcworkspace
and run the app on the same simulator, this only happens on thestable
channel.logs flutter doctor -v
I'm running into the same issue whenever I click the build&run within XCode workspace. I didn't seem to find the place to run my app using already opened simulator. Could you point me to the right direction please? Thanks
The Runner.app/Info.plist does not exist
is https://github.com/flutter/flutter/issues/70422 and the fix is available in the master channel. In the meantime, you can work around this by
Thin Binary
. Comment out the script:
# /bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" embed_and_thin
/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" embed_and_thin
Note, if you don't restore the script then Flutter won't be embedded in your app.
I didn't seem to find the place to run my app using already opened simulator.
You should just need to build, not run. So ⌘B with a simulator selected
Let's keep the focus on resource fork, Finder information, or similar detritus not allowed
problem in this issue. Once you work around with the above steps, do you see that error running a second time in Xcode?
@jmagman
Thank you for the detailed instructions. I'm able to build it with your steps.
In particular,
I build the app with thin binary commented in XCode. Then I uncomment the script, and use flutter run
in the terminal. The error still occurs
flutter_log.txt
However, one strange thing is that this error does not always occur. I created multiple myapp using flutter create myapp
at 5 locations, then run flutter run
multiple times within each of these apps. Not all the apps displays the resource form
error, and 3 of them are working fine
I also seem to find a new error output
Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running Xcode build...
└─Compiling, linking and signing... 2,011ms
Xcode build done. 5.8s
Failed to build iOS app
Error output from Xcode build:
↳
2021-04-06 15:19:42.659 xcodebuild[35647:10128076] DVTAssertions: Warning in
/Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-17705/DTDeviceKitBase/DTDKRemoteDeviceData.m
:371
Details: (null) deviceType from 00008027-000510941178402E was NULL when -platform called.
Object: <DTDKMobileDeviceToken: 0x7f8959f85de0>
Method: -platform
Thread: <NSThread: 0x7f8952cf1c10>{number = 7, name = (null)}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you
can provide.
** BUILD FAILED **
Xcode's output:
↳
/Users/zinan/Desktop/myapp/build/ios/Debug-iphonesimulator/Runner.app: resource fork, Finder information, or similar
detritus not allowed
Command CodeSign failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a
placeholder team ID. To resolve this, select a development team in the Runner editor. (in target 'Runner' from
project 'Runner')
@ziz19 so you don't see resource fork, Finder information, or similar detritus not allowed
from Xcode?
This is such a weird problem since Flutter doesn't make the Debug-iphonesimulator/Runner.app
directory--Xcode tooling does.
@ziz19 so you don't see
resource fork, Finder information, or similar detritus not allowed
from Xcode?This is such a weird problem since Flutter doesn't make the
Debug-iphonesimulator/Runner.app
directory--Xcode tooling does.
No, I don't. The build was successful. It is weird since it occurs randomly.
I tried with a clean state by removing the myapp in the Simulator.
open -a Simulator
, and deleting the existing app on the simulator
flutter run
this gives me the error in the log
error: Runner.app/Info.plist does not exist. The Flutter "Thin Binary" build phase must run after "Copy Bundle Resources".
Then I used flutter clean
, and flutter run
, this successfully build the app and gives the
Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h Repeat this help message.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
An Observatory debugger and profiler on iPhone 12 Pro Max is available at: http://127.0.0.1:51519/AOob0goqh5g=/
Finally, I ctrl-c to terminate the app from the terminal, and gives me the fork error
.
The thin binary
error didn't occur before. I'm wondering could this be cache related?
short_flutter_output.log
@ziz19 is there any way you can try this on the master channel? https://flutter.dev/docs/development/tools/sdk/upgrading#switching-flutter-channels
@jmagman I've upgraded my flutter version to master channel. Could you see if you could reproduce the error using the below altered instructions?
open -a Simulator
, and make sure no myapp existed
flutter create myapp
and cd myapp
flutter run
this should run successful
ctrl-c to terminate the app, and press home button to return to the home menu on the simulator
flutter run
again once the simulator is at home page
Hi @ziz19
Following the steps from the above comment https://github.com/flutter/flutter/issues/79689#issuecomment-814475518, the app launches fine also on master
@jmagman Any ideas?
Any ideas?
Not really... It's not a widely reported issue and it's from some xattr that Flutter doesn't add on a file Flutter doesn't create...
@ziz19 Unfortunately, this doesn't look like an issue from the Flutter side and the issue doesn't reproduce on any of the Flutter channels following the steps you provided. If you can reproduce the issue on a different macOS machine, let us know and provide those reproducible steps.
Closing, as this isn't an issue isn't an actionable issue. If you disagree, please write in the comments and I will reopen it. Thank you
Not really... It's not a widely reported issue and it's from some xattr that Flutter doesn't add on a file Flutter doesn't create...
Turns out this may be because of extended attributes present elsewhere in the project. https://github.com/flutter/flutter/pull/81435 Is likely to fix this.
@Baw-Appie @jmagman Thank you so much for mentioning this. The latest fix on master fix my issues too. There are no fork issues anymore! XD
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.
This is an the same security problem in #49290 This happens on flutter 1.22 version. Every time I make a flutter run, I have to use flutter clean.
Steps to Reproduce
open the terminal open the simulator using
open -a Simulator.app
runflutter clean
in my application folder runflutter run
in my application folder, this will launch my app in the simulator successfully press cmd-c to terminate the running app. runflutter run
again, the error occursExpected results:
The app should launch in the simulator. Both times should build successfully. The successful output is below:
Actual results:
The second run has error saying build fail.
Logs
``` ``` ``` ``` The flutter doctor diagnosis is below ``` [✓] Flutter (Channel stable, 1.22.5, on macOS 11.2.3 20D91 darwin-x64, locale en-US) • Flutter version 1.22.5 at /Users/zinan/opt/flutter • Framework revision 7891006299 (4 months ago), 2020-12-10 11:54:40 -0800 • Engine revision ae90085a84 • Dart version 2.10.4 [✗] Android toolchain - develop for Android devices ✗ Unable to locate Android SDK. Install Android Studio from: https://developer.android.com/studio/index.html On first launch it will assist you in installing the Android SDK components. (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions). If the Android SDK has been installed to a custom location, set ANDROID_SDK_ROOT to that location. You may also want to add it to your PATH environment variable. [!] Xcode - develop for iOS and macOS (Xcode 12.4) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.4, Build version 12D4e ✗ CocoaPods not installed. CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side. Without CocoaPods, plugins will not work on iOS or macOS. For more info, see https://flutter.dev/platform-plugins To install: sudo gem install cocoapods [!] 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). [!] IntelliJ IDEA Ultimate Edition (version 2020.3) • IntelliJ at /Users/zinan/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app ✗ Flutter plugin not installed; this adds Flutter specific functionality. ✗ Dart plugin not installed; this adds Dart specific functionality. • For information about installing plugins, see https://flutter.dev/intellij-setup/#installing-the-plugins [✓] VS Code (version 1.54.3) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.20.0 [✓] Connected device (1 available) • iPhone 12 Pro Max (mobile) • 2FACB414-2E2A-43FC-9F5B-ACCE70B14E8B • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator) ```