flutter_launcher_icons icon indicating copy to clipboard operation
flutter_launcher_icons copied to clipboard

Failure for iOS: FileSystemException: Cannot open file

Open andcea opened this issue 4 years ago • 15 comments

I've tried running the tool for the first time for iOS and I get

flutter pub run flutter_launcher_icons:main
Android minSdkVersion = 16
Creating default icons Android
Overwriting the default Android launcher icon with a new icon
Overwriting default iOS launcher icon with new icon
FileSystemException: Cannot open file, path = 'ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]' (OS Error: No such file or directory, errno = 2)
pub finished with exit code 2
[✓] Flutter (Channel beta, v1.17.0, on Mac OS X 10.15.4 19E287, locale en-GB)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
[✓] Android Studio (version 3.6)
[✓] VS Code (version 1.44.0)
[✓] Connected device (4 available)

• No issues found!

flutter_launcher_icons: ^0.7.4

It seems I'm not the only one: https://github.com/fluttercommunity/flutter_launcher_icons/issues/10#issuecomment-614685889

Previously I've used another tool to generate iOS icons and that used a different path: ios/Runner/Assets.xcassets/iOS/AppIcon.appiconset (note the extra iOS directory)

I've fixed the problem by deleting it and reverting to the original flutter generated one but I think this tool should probably be resilient to this situation, or document that it expects the structure that flutter originally generates (maybe it already does).

andcea avatar Apr 18 '20 17:04 andcea

I have the exact same issue !

Android minSdkVersion = 18
Creating default icons Android
Adding a new Android launcher icon
Overwriting default iOS launcher icon with new icon
FileSystemException: Cannot open file, path = 'ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]' (OS Error: Permission denied, errno = 13)
pub finished with exit code 2 

ghost avatar May 09 '20 16:05 ghost

Me too

Overwriting default iOS launcher icon with new icon
FileSystemException: Cannot open file, path = 'ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]' (OS Error: No such file or directory, errno = 2)

eliabieri avatar May 12 '20 05:05 eliabieri

In the meanwhile, I went with this solution: https://stackoverflow.com/a/55054303/4865751 manually updating the icons...

bagus-repository avatar May 12 '20 10:05 bagus-repository

Me too

Android minSdkVersion = 16 Creating default icons Android Overwriting the default Android launcher icon with a new icon Overwriting default iOS launcher icon with new icon FileSystemException: Cannot open file, path = 'ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]' (OS Error: Permission denied, errno = 13)

zacwillis avatar May 13 '20 22:05 zacwillis

Try to check the file path you provided. I have the same issue and I was providing wrong file path. I was using icon instead of icons in my path list. Like:

I was using before and able to see the error: assets/icon/icon_result.png

my files original path: assets/icons/icon_result.png

Also, try to run the command after shutting down flutter app if running.

RahmatAliMalik5 avatar Jul 29 '20 23:07 RahmatAliMalik5

Me too

Android minSdkVersion = 16 Creating default icons Android Overwriting the default Android launcher icon with a new icon Overwriting default iOS launcher icon with new icon FileSystemException: Cannot open file, path = 'ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]' (OS Error: Permission denied, errno = 13)

I'm having the same problem as you - note the error is slightly different. Bizarrely I can get it working with a simple screenshot on my mac, but the actual image I want to use causes problems. Having resized the image I did get some images to generate but still couldn't get the full set to work. Perhaps you might have more luck!

paulblyth avatar Aug 14 '20 00:08 paulblyth

Same initial error, Android Studio 4 on windows 10

Android minSdkVersion = 16 Creating default icons Android FileSystemException: Cannot open file, path = 'assets/images/app_icon.png' (OS Error: The system cannot find the path specified. , errno = 3)

But resolved. Be sure to define icon paths relative to the puspec.yaml eg (lib/assets/ etc) if you have a lib dir.

craigjwallace avatar Aug 18 '20 13:08 craigjwallace

Gah this is so annoying. works fine with Android but iOS doesn't

DustinJSilk avatar Dec 03 '20 13:12 DustinJSilk

on ios the path (to the icons) might be relative to a different place -- eg the project root folder?

craigjwallace avatar Dec 05 '20 18:12 craigjwallace

I came across this issue because I deleted my AppIcon before generating the new one. Then when I saw this issue, I added a new "image set" and called it AppIcon, however that is also wrong. You have to add a new "iOS app icon" which is a special type of asset in the bundle. Screen Shot 2020-12-15 at 2 52 14 PM

tamoyal avatar Dec 15 '20 20:12 tamoyal

I did the same @tamoyal . I deleted the default flutter AppIcon set and created my own blank one, then re-ran the command: flutter pub run flutter_launcher_icons:main and it seemed to work.

However, when i re-opened the flutter app in xcode, it looks like all the generated icons are "unassigned":

image

And of course the icon doesn't work in the simulator: image

Does anyone else see this issue?

My workaround is to manually drag them in to the correct sizes (which was a fun puzzle lol), but it seems we're still missing 3 icons:

image

- 58x58px @ 2x
- 80x80px @ 2x
- 40x40px @ 2x

jonchui avatar Feb 02 '21 18:02 jonchui

Simple Solution: Run : flutter create . in Project Directory and you are done. Now you can use launcher icon package freely.

afzl-wtu avatar Jun 04 '21 17:06 afzl-wtu

You may need to add lib to the path name. This was what worked for me.

flutter_icons:
  android: "launcher_icon"
  ios: true
  image_path: "lib/assets/logo.png"
  adaptive_icon_background: "#C77DFF"

benjaminudoh10 avatar Jun 29 '21 15:06 benjaminudoh10

it worked for me

arballogerardo avatar Feb 25 '22 03:02 arballogerardo

FileSystemException: Cannot open file, path = 'ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]' (OS Error: Permission denied, errno = 13)

Had a similar error to this when trying to use a png image exported from figma. For some reason re-exporting the same image and trying again somehow solved it. I think the error might be misleading but not really sure what the cause was.

Heech avatar Dec 02 '22 10:12 Heech