Flutter: Failed to find assets path for "flutter_assets" error

Viewed 3171

I am trying to embed a Flutter module into iOS app. But when i tap the button that will show the FlutterViewController, a blank screen shows up and this is printed on the console:

Failed to find assets path for "flutter_assets"
[VERBOSE-2:engine.cc(111)] Engine run configuration was invalid.
[VERBOSE-2:FlutterViewController.mm(462)] Could not launch engine with configuration.
flutter: Observatory listening on http://127.0.0.1:54632/
2 Answers

I solved it by changing to master channel and it solved.

  • To change channel use the cli flutter channel master
  • After that I deleted the ".ios" folder inside the flutter project and run a flutter build --ios to force Flutter to re-generate the .ios folder.
  • Then I did a pod install in my native iOS app.

There are several ways this could happen that I've seen:

  1. You're missing your flutter_assets folder completely
  2. You're trying to use AOT compiled Flutter app (e.g. profile or release mode) with a debug engine build.
  3. You're trying to use JIT compiled Flutter app (debug) with a profile/release engine.

It sounds like you're missing your flutter_assets. Please follow the steps on the Add2App wiki.

I'm actively working on making this process easier - unfortunately, there are a lot of manual steps right now that are easy to get wrong.

Related