No implementation found for method getAll on channel dev.fluttercommunity.plus/package_info

167

Solution 1

I managed to solve the problem.

To solve the problem I had to add the package_info_plus_windows plugin

flutter pub add package_info_plus_windows

Then in the Parse method I added this

import 'package:package_info_plus_platform_interface/package_info_data.dart';

Future<void> initializeParse() async {
  const appId = 'xxxx';
  const clientKey = 'xxxxx';
  const serverURL = 'xxxx';
  const liveQueryUrl = 'xxxx';
  PackageInfoData packageInfoWindows = await PackageInfoWindows().getAll();

  await Parse().initialize(
    appId,
    serverURL,
    clientKey: clientKey,
    liveQueryUrl: liveQueryUrl,
    autoSendSessionId: true,
    debug: true,
    appName: packageInfoWindows.appName,
    appVersion: packageInfoWindows.version,
    appPackageName: packageInfoWindows.packageName,
  );
}

Solution 2

In my case PackageInfoData was not accessible so my solution was:

 var packageInfoWindows = await PackageInfoWindows().getAll();

  await Parse().initialize(
      keyApplicationId,
      keyParseServerUrl,
      clientKey: keyClientKey,
      autoSendSessionId: true,
    debug: true,
    appName: packageInfoWindows.appName,
    appVersion: packageInfoWindows.version,
    appPackageName: packageInfoWindows.packageName

  );
Share:
167
Guilherme de Souza
Author by

Guilherme de Souza

Updated on January 04, 2023

Comments

  • Guilherme de Souza
    Guilherme de Souza over 1 year

    I'm trying to debug a project for windows, and I'm having this problem: It runs and stops at Parse().initialize giving the error

    [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method getAll on channel dev.fluttercommunity.plus/package_info)
    #0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:175:7)
    <asynchronous suspension>
    #1      MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:377:43)
    <asynchronous suspension>
    #2      MethodChannelPackageInfo.getAll (package:package_info_plus_platform_interface/method_channel_package_info.dart:13:17)
    <asynchronous suspension>
    #3      PackageInfo.fromPlatform (package:package_info_plus/package_info_plus.dart:36:26)
    <asynchronous suspension>
    #4      Parse.initialize (package:parse_server_sdk_flutter/parse_server_sdk.dart:67:39)
    <asynchronous suspension>
    #5      initializeParse (package:spa/main.dart:73:3)
    <asynchronous suspension>
    #6      main`enter code here` (package:spa/main.dart:27:3)
    <asynchronous suspension>
    

    I've tried everything, clean and pub get. When it runs for the web it works normally, it just gives an error when I go to run for windows

    • mkobuolys
      mkobuolys about 2 years
      Could you provide the code that is not working for you? Here is how to create a minimal, complete, verifiable example.
    • pblead26
      pblead26 about 2 years
      Adding a new package usually doesn't work with hot-reload, have you made sure that you are doing a complete re-run of the app?
    • Guilherme de Souza
      Guilherme de Souza about 2 years
      It runs and stops at Parse().initialize giving the error [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method getAll on channel dev.fluttercommunity.plus/package_info) I've tried everything, clean and pub get. When it runs for the web it works normally, it just gives an error when I go to run for windows
    • beansbeans
      beansbeans about 2 years
      I'm getting this same error after making a new Parse app. Parse app that I've been working on for months connecting to the same Parse server with the same version does NOT have an issue. Both apps are using the same version of Flutter and boilerplate code.
  • beansbeans
    beansbeans about 2 years
    Good stuff. Worked for me. Replace "windows" with "linux" if you are building a Linux Desktop version.