Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

Flutter throws MissingPluginException for a plugin method

ErrorMissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences)

Short answer

MissingPluginException means Dart called a plugin whose native half is not in the running app. The usual causes are a plugin added while the app was running, so only a full stop and run installs its native code, or a call from a background isolate that was not set up for plugins. Fix the one that matches.

  • Applies to Flutter 3.x, shared_preferences 2.x
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Fully stop the app and run it again. Hot reload and hot restart only update Dart code, so this settles the most common cause in one step.

    flutter pub get
    flutter run
  2. 2Match what you see, then jump to its fix

    1. 1The error appears right after adding a package, and goes away after a full runThe plugin was added while the app was runningFix
    2. 2The error only appears inside Isolate.spawn code or a compute-style workerThe call comes from a background isolateFix

What does the error look like?

  • MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences)

Cause 1 of 2

The plugin was added while the app was running

1Check

A plugin with Kotlin, Java, Swift or Objective-C code must be built into the app. Check that it is listed in pubspec.yaml and fetched.

grep -n shared_preferences pubspec.yaml pubspec.lock

2Fix

Run flutter pub get, stop the app, and start it again. Do not use hot restart for this.

flutter pub get
flutter run

3Verify

Call the plugin method again and confirm there is no exception.

flutter run

Confirmed by docs.flutter.dev

Did this fix it?

Cause 2 of 2

The call comes from a background isolate

1Check

Plugins and channels work in the root isolate, or in an isolate registered as a background isolate. Look for plugin calls inside spawned code.

grep -rn "Isolate.spawn" lib/

2Fix

Pass the root isolate token into the new isolate and initialise the background messenger before using any plugin there.

import 'package:flutter/services.dart';

void _isolateMain(RootIsolateToken token) async {
  BackgroundIsolateBinaryMessenger.ensureInitialized(token);
  // plugins can be used here
}

void main() {
  final token = RootIsolateToken.instance!;
  Isolate.spawn(_isolateMain, token);
}

3Verify

Run the isolate and confirm the plugin call returns.

flutter run

Confirmed by docs.flutter.dev

Did this fix it?

How do I stop it coming back?

  • After adding or removing a plugin, run flutter pub get and do a full stop and run.
  • Keep plugin calls in the root isolate unless the plugin documents background use.
  • Run flutter pub upgrade for plugins on a schedule, not only when something breaks.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Mobile apps

Google Play says the app does not support 16 KB memory pages

check_elf_alignment.sh reports UNALIGNED for a library under lib/arm64-v8a

Google Play requires apps that target Android 15 or higher and ship native .so libraries to run on devices with 16 KB memory pages; from 1 February 2027 it will block updates that do not.

5 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.