Closed btrautmann closed 2 years ago
Hey @btrautmann I think this is something related to the way add-to-app is registering plugins. I'm personally unfamiliar with this.
I thought this may be related to the Flutter 1.12 migration for Android packages, but after creating a fresh package using Flutter's hello world, the calls to register the plugin with Flutter's service are all the same API.
Hey @btrautmann I think this is something related to the way add-to-app is registering plugins. I'm personally unfamiliar with this.
I think you may be right. I ran the same code in a standalone (i.e not add to app) flavor of our app and the SDK was able to initialize. I can dig into this more and hopefully figure out what's up.
We are, however, running into E[/Datadog]() (17917): Unable to send batch [444 bytes] (LogsOkHttpUploader) because of a network error; we will retry later.
I actually saw this occur with the example app as well, so I suspect it's something on my end (corporate proxy or similar), but if you have any idea off the top of your head please let me know :)
Ok, this one was on me. We run a monorepo setup and while I ran pub get
for the package importing this plugin, I failed to do so for the entire repo (which would include the embedded app package), and after doing so and re-deploying, everything began working as expected, so closing this.
Great to hear
Hi there,
We're investigating adding
datadog_flutter
to our add-to-app Flutter application, and running into the following issue when invokinginitialize
:I've cloned the repository and pointed our
pubspec.yaml
to my local copy via apath
ref, and placed logs in bothonAttachedToEngine
andregisterWith
but neither seem to be invoked which would explain theMissingPluginException
.This is seen running on a Pixel 3 running API 30 (emulator).
flutter doctor output
``` [✓] Flutter (Channel stable, 2.8.1, on macOS 11.6.4 20G417 darwin-x64, locale en-US) • Flutter version 2.8.1 at /Users/brandontrautmann/fvm/versions/2.8.1 • Upstream repository https://github.com/flutter/flutter.git • Framework revision 77d935af4d (3 months ago), 2021-12-16 08:37:33 -0800 • Engine revision 890a5fca2e • Dart version 2.15.1 [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /Users/brandontrautmann/Library/Android/sdk • Platform android-31, build-tools 30.0.3 • ANDROID_SDK_ROOT = /Users/brandontrautmann/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.11.2 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 4.2) • Android Studio at /Applications/Android Studio Archives/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264) [✓] Android Studio (version 2020.3) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165) [✓] VS Code (version 1.64.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.34.0 [✓] Connected device (4 available) • sdk gphone x86 64 (mobile) • emulator-5554 • android-x64 • Android 11 (API 30) (emulator) • iPhone 13 (mobile) • 8ADFB0F5-C636-4F54-AB0E-325A9E60878A • ios • com.apple.CoreSimulator.SimRuntime.iOS-15-2 (simulator) • macOS (desktop) • macos • darwin-x64 • macOS 11.6.4 20G417 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 98.0.4758.109 • No issues found! ```