cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Flutter Plugin failed to initialize - unable to establish connection

Lextech
Dynatrace Advocate
Dynatrace Advocate

Hi all,

I am testing Dynatrace Flutter Plugin with VS Code, I followed step by

  1. Create Flutter Project
  2. Run "flutter pub add dynatrace_flutter_plugin"
  3. download the configuration dynatrace.config.yaml. Store it in the root folder
  4. Include "import 'package:dynatrace_flutter_plugin/dynatrace_flutter_plugin.dart'; void main() => Dynatrace().start(MyApp());" in to main.dart code
  5. Run dart run dynatrace_flutter_plugin in the root of your Flutter project
  6. Call flutter run and the application starts including Dynatrace OneAgent

Then I found error below

------------------------------------------------

A Dart VM Service on Chrome is available at: http://127.0.0.1:57149/NFDnX6zcZuo=

[2024-12-02 12:48:38][ERROR][DYNATRACE]: Dynatrace Flutter Plugin failed to initialize. Error: PlatformException(channel-error, Unable to establish connection on

channel., null, null)

-----------------------------------------------

What I have missed step that need to run the plugin? Thank you.

5 REPLIES 5

AndriiKh
Dynatrace Promoter
Dynatrace Promoter

Hi, Could you please share what version of Dynatrace Flutter Plugin are you using?

Lextech
Dynatrace Advocate
Dynatrace Advocate

Hi, AndriiKh

I am using version 3.303.1

AndriiKh
Dynatrace Promoter
Dynatrace Promoter

Okay, as a quick fix I would suggest to try to downgrade to version 3.299.1. We will investigate the issue on 3.303.1. What is platform causing the problem (Android/iOS/both)? And can you maybe share content of your dynatrace.config.yaml?

Lextech
Dynatrace Advocate
Dynatrace Advocate

I am trying for Andriod. Here is my dynatrace.config.yaml

Lextech_0-1733130584640.png

 

AndriiKh
Dynatrace Promoter
Dynatrace Promoter

HI, @Lextech. Are you able to reproduce the issue with other version of dynatrace flutter plugin? And other question do you have any custom logic within your MainActivity, or GeneratedPluginRegistrant? 

Featured Posts