Skip to content

Renaming Runner to a name containing a . causes shorebird release ios to fail #2206

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

Closed
bryanoltman opened this issue Jun 8, 2024 · 11 comments
Assignees
Labels
bug Something isn't working upstream-issue

Comments

@bryanoltman
Copy link
Contributor

To reproduce:

  1. Follow the instructions at Rename Runner Xcode project and workspace  flutter/flutter#9767 (comment) to rename "Runner" to something containing a . (ex: My.Runner)
  2. Run shorebird release ios
  3. See the following error:
IO  : Writing 34332 characters to text file /Users/bryanoltman/.pub-cache/log/pub_log.txt.
[   +3 ms] Archive succeeded but the expected xcarchive at /Users/bryanoltman/Documents/sandbox/new_app/build/ios/archive/My.xcarchive not found
[   +1 ms] [shorebird] failed to generate shorebird configuration.
           Exception: Cannot find shorebird.yaml in /Users/bryanoltman/Documents/sandbox/new_app/build/ios/archive/My.xcarchive/Products/Applications/My.Runner.app/Frameworks/App.framework/flutter_assets/shorebird.yaml.
           Please file an issue at: https://github.com/shorebirdtech/shorebird/issues/new
@bryanoltman
Copy link
Contributor Author

This appears to be an issue with upstream Flutter. Renaming Runner to a name containing a dot and running flutter build ipa --release results in the following:

⑆ flutter build ipa --release

Archiving dev.shorebird.ios-test...
Automatically signing iOS for device deployment using specified development team in Xcode project: 6V53YACS2W
Running Xcode build...
 └─Compiling, linking and signing...                      1,874ms
Xcode archive done.                                         12.2s
Archive succeeded but the expected xcarchive at /Users/bryanoltman/Documents/sandbox/new_app/build/ios/archive/My.xcarchive not found

Oops; flutter has exited unexpectedly: "PathNotFoundException: Directory listing failed, path = '/Users/bryanoltman/Documents/sandbox/new_app/build/ios/archive/My.xcarchive/' (OS Error: No such file or directory, errno = 2)".
A crash report has been written to /Users/bryanoltman/Documents/sandbox/new_app/flutter_02.log
This crash may already be reported. Check GitHub for similar crashes.
https://github.com/flutter/flutter/issues?q=is%3Aissue+PathNotFoundException%3A+Directory+listing+failed%2C+path+%3D+%27%2FUsers%2Fbryanoltman%2FDocuments%2Fsandbox%2Fnew_app%2Fbuild%2Fios%2Farchive%2FMy.xcarchive%2F%27+%28OS+Error%3A+No+such+file+or+directory%2C+errno+%3D+2%29

To report your crash to the Flutter team, first read the guide to filing a bug.
https://flutter.dev/docs/resources/bug-reports

Create a new GitHub issue by pasting this link into your browser and completing the issue template. Thank you!
https://github.com/flutter/flutter/issues/new?title=%5Btool_crash%5D+FileSystemException%3A+Directory+listing+failed%2C+OS+Error%3A+No+such+file+or+directory%2C+errno+%3D+2&body=%23%23+Command%0A%60%60%60%0Aflutter+build+ipa+--release%0A%60%60%60%0A%0A%23%23+Steps+to+Reproduce%0A1.+...%0A2.+...%0A3.+...%0A%0A%23%23+Logs%0AFileSystemException%3A+Directory+listing+failed%2C+OS+Error%3A+No+such+file+or+directory%2C+errno+%3D+2%0A%60%60%60%0A%230++++++_Directory._fillWithDirectoryListing+%28dart%3Aio-patch%2Fdirectory_patch.dart%3A42%3A24%29%0A%231++++++_Directory.listSync+%28dart%3Aio%2Fdirectory_impl.dart%3A228%3A5%29%0A%232++++++ForwardingDirectory.listSync+%28package%3Afile%2Fsrc%2Fforwarding%2Fforwarding_directory.dart%3A43%3A12%29%0A%233++++++ForwardingDirectory.listSync+%28package%3Afile%2Fsrc%2Fforwarding%2Fforwarding_directory.dart%3A43%3A12%29%0A%234++++++OperatingSystemUtils.getDirectorySize+%28package%3Aflutter_tools%2Fsrc%2Fbase%2Fos.dart%3A111%3A53%29%0A%235++++++_BuildIOSSubCommand.runCommand+%28package%3Aflutter_tools%2Fsrc%2Fcommands%2Fbuild_ios.dart%3A752%3A45%29%0A%3Casynchronous+suspension%3E%0A%236++++++BuildIOSArchiveCommand.runCommand+%28package%3Aflutter_tools%2Fsrc%2Fcommands%2Fbuild_ios.dart%3A426%3A50%29%0A%3Casynchronous+suspension%3E%0A%237++++++FlutterCommand.run.%3Canonymous+closure%3E+%28package%3Aflutter_tools%2Fsrc%2Frunner%2Fflutter_command.dart%3A1394%3A27%29%0A%3Casynchronous+suspension%3E%0A%238++++++AppContext.run.%3Canonymous+closure%3E+%28package%3Aflutter_tools%2Fsrc%2Fbase%2Fcontext.dart%3A153%3A19%29%0A%3Casynchronous+suspension%3E%0A%239++++++CommandRunner.runCommand+%28package%3Aargs%2Fcommand_runner.dart%3A212%3A13%29%0A%3Casynchronous+suspension%3E%0A%2310+++++FlutterCommandRunner.runCommand.%3Canonymous+closure%3E+%28package%3Aflutter_tools%2Fsrc%2Frunner%2Fflutter_command_runner.dart%3A372%3A9%29%0A%3Casynchronous+suspension%3E%0A%2311+++++AppContext.run.%3Canonymous+closure%3E+%28package%3Aflutter_tools%2Fsrc%2Fbase%2Fcontext.dart%3A153%3A19%29%0A%3Casynchronous+suspension%3E%0A%2312+++++FlutterCommandRunner.runCommand+%28package%3Aflutter_tools%2Fsrc%2Frunner%2Fflutter_command_runner.dart%3A308%3A5%29%0A%3Casynchronous+suspension%3E%0A%2313+++++run.%3Canonymous+closure%3E.%3Canonymous+closure%3E+%28package%3Aflutter_tools%2Frunner.dart%3A130%3A9%29%0A%3Casynchronous+suspension%3E%0A%2314+++++AppContext.run.%3Canonymous+closure%3E+%28package%3Aflutter_tools%2Fsrc%2Fbase%2Fcontext.dart%3A153%3A19%29%0A%3Casynchronous+suspension%3E%0A%60%60%60%0A%60%60%60%0A%1B%5B32m%5B%E2%9C%93%5D%1B%5B39m+Flutter+%28Channel+stable%2C+3.22.1%2C+on+macOS+14.5+23F79+darwin-arm64%2C+locale+en-US%29%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Flutter+version+3.22.1+on+channel+stable+at+%2FUsers%2Fbryanoltman%2FDocuments%2Fflutter%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Upstream+repository+https%3A%2F%2Fgithub.com%2Fflutter%2Fflutter.git%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Framework+revision+a14f74ff3a+%282+weeks+ago%29%2C+2024-05-22+11%3A08%3A21+-0500%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Engine+revision+55eae6864b%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Dart+version+3.4.1%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+DevTools+version+2.34.3%0A%0A%1B%5B33m%5B%21%5D%1B%5B39m+Android+toolchain+-+develop+for+Android+devices+%28Android+SDK+version+34.0.0%29%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Android+SDK+at+%2FUsers%2Fbryanoltman%2FLibrary%2FAndroid%2Fsdk%0A++++%1B%5B31m%E2%9C%97%1B%5B39m+cmdline-tools+component+is+missing%0A++++++Run+%60path%2Fto%2Fsdkmanager+--install+%22cmdline-tools%3Blatest%22%60%0A++++++See+https%3A%2F%2Fdeveloper.android.com%2Fstudio%2Fcommand-line+for+more+details.%0A++++%1B%5B31m%E2%9C%97%1B%5B39m+Android+license+status+unknown.%0A++++++Run+%60flutter+doctor+--android-licenses%60+to+accept+the+SDK+licenses.%0A++++++See+https%3A%2F%2Fflutter.dev%2Fdocs%2Fget-started%2Finstall%2Fmacos%23android-setup+for+more+details.%0A%0A%1B%5B32m%5B%E2%9C%93%5D%1B%5B39m+Xcode+-+develop+for+iOS+and+macOS+%28Xcode+15.3%29%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Xcode+at+%2FApplications%2FXcode.app%2FContents%2FDeveloper%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Build+15E204a%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+CocoaPods+version+1.15.2%0A%0A%1B%5B32m%5B%E2%9C%93%5D%1B%5B39m+Chrome+-+develop+for+the+web%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Chrome+at+%2FApplications%2FGoogle+Chrome.app%2FContents%2FMacOS%2FGoogle+Chrome%0A%0A%1B%5B32m%5B%E2%9C%93%5D%1B%5B39m+Android+Studio+%28version+2023.3%29%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Android+Studio+at+%2FApplications%2FAndroid+Studio.app%2FContents%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Flutter+plugin+can+be+installed+from%3A%0A++++++%F0%9F%94%A8+https%3A%2F%2Fplugins.jetbrains.com%2Fplugin%2F9212-flutter%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Dart+plugin+can+be+installed+from%3A%0A++++++%F0%9F%94%A8+https%3A%2F%2Fplugins.jetbrains.com%2Fplugin%2F6351-dart%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Java+version+OpenJDK+Runtime+Environment+%28build+17.0.10%2B0-17.0.10b1087.21-11572160%29%0A%0A%1B%5B32m%5B%E2%9C%93%5D%1B%5B39m+VS+Code+%28version+1.90.0%29%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+VS+Code+at+%2FApplications%2FVisual+Studio+Code.app%2FContents%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Flutter+extension+version+3.90.0%0A%0A%1B%5B32m%5B%E2%9C%93%5D%1B%5B39m+Connected+device+%284+available%29%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Bryan+Oltman%E2%80%99s+iPhone+%28mobile%29++%E2%80%A2+00008110-000265A10E92801E+%E2%80%A2+ios++++++++++++%E2%80%A2+iOS+17.5.1+21F90%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+macOS+%28desktop%29+++++++++++++++++%E2%80%A2+macos+++++++++++++++++++++%E2%80%A2+darwin-arm64+++%E2%80%A2+macOS+14.5+23F79+darwin-arm64%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Mac+Designed+for+iPad+%28desktop%29+%E2%80%A2+mac-designed-for-ipad+++++%E2%80%A2+darwin+++++++++%E2%80%A2+macOS+14.5+23F79+darwin-arm64%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Chrome+%28web%29++++++++++++++++++++%E2%80%A2+chrome++++++++++++++++++++%E2%80%A2+web-javascript+%E2%80%A2+Google+Chrome+125.0.6422.142%0A++++%1B%5B33m%21%1B%5B39m+Error%3A+Browsing+on+the+local+area+network+for+iPad.+Ensure+the+device+is+unlocked+and+attached+with+a+cable+or+associated+with+the+same+local+area+network+as+this+Mac.%0A++++++The+device+must+be+opted+into+Developer+Mode+to+connect+wirelessly.+%28code+-27%29%0A%0A%1B%5B32m%5B%E2%9C%93%5D%1B%5B39m+Network+resources%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+All+expected+network+resources+are+available.%0A%0A%1B%5B33m%21%1B%5B39m+Doctor+found+issues+in+1+category.%0A%0A%60%60%60%0A%0A%23%23+Flutter+Application+Metadata%0A%2A%2AType%2A%2A%3A+app%0A%2A%2AVersion%2A%2A%3A+1.0.0%2B16%0A%2A%2AMaterial%2A%2A%3A+true%0A%2A%2AAndroid+X%2A%2A%3A+false%0A%2A%2AModule%2A%2A%3A+false%0A%2A%2APlugin%2A%2A%3A+false%0A%2A%2AAndroid+package%2A%2A%3A+null%0A%2A%2AiOS+bundle+identifier%2A%2A%3A+null%0A%2A%2ACreation+channel%2A%2A%3A+stable%0A%2A%2ACreation+framework+version%2A%2A%3A+682aa387cfe4fbd71ccd5418b2c2a075729a1c66%0A%0A&labels=tool%2Csevere%3A+crash

@eseidel
Copy link
Contributor

eseidel commented Jun 8, 2024

I suspect this is the bug: https://github.com/flutter/flutter/blob/f634098b3ed553e6fe35cca4ef0de282e6176b1e/packages/flutter_tools/lib/src/ios/application_package.dart#L144

Which appears to be calling:
https://pub.dev/documentation/path/latest/path/withoutExtension.html

Hmm, but that shouldn't be the problem:

import 'package:path/path.dart' as p;
void main() {

   final foo = 'foo.dart';
  print(p.withoutExtension(foo));
   final bar = 'bar.in.dart';
    print(p.withoutExtension(bar));
}
foo
bar.in

@eseidel
Copy link
Contributor

eseidel commented Jun 8, 2024

Archive succeeded but the expected xcarchive at /Users/bryanoltman/Documents/sandbox/new_app/build/ios/archive/My.xcarchive not found

Makes me think that the rename might not have been complete?

@erickzanardo
Copy link
Contributor

Like Bryan mentioned, this seems to be broken upstream, when trying to build an iOS project that have names with dots, the flutter tool crashes.

There is an issue open upstream: flutter/flutter#140212

@eseidel
Copy link
Contributor

eseidel commented Jun 12, 2024

This will just fix itself when the upstream issue is fixed, so I think we can close this.

@eseidel eseidel closed this as completed Jun 12, 2024
@hussenIbrahim
Copy link

Hello
any workaround ?

@erickzanardo
Copy link
Contributor

Hello

any workaround ?

Since this issue comes from upstream, i don't think there is much workarounds that we could do unfortunately

@jmagman
Copy link

jmagman commented Jul 23, 2024

@bryanoltman I merged an upstream fix flutter/flutter#140242, want to give it a try again on the Flutter master branch?

@quanglm23
Copy link

@bryanoltman I merged an upstream fix flutter/flutter#140242, want to give it a try again on the Flutter master branch?

@bryanoltman when we can try it with shorebird?

@eseidel
Copy link
Contributor

eseidel commented Jul 26, 2024

We could potentially try cherry-picking flutter/flutter@f33ffc0 into shorebirdtech/flutter

@eseidel
Copy link
Contributor

eseidel commented Jul 26, 2024

It cherry-picks cleanly. We just need to get the flutter_tools tests passing cleanly before we do so: #2392

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream-issue
Projects
None yet
Development

No branches or pull requests

6 participants