Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to no-op for web? #95

Open
duraz0rz opened this issue Jun 10, 2024 · 3 comments
Open

Possible to no-op for web? #95

duraz0rz opened this issue Jun 10, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@duraz0rz
Copy link

Hi, we have a Flutter app for Android, iOS, and web. We've implemented the browser agent following the directions on this page, but the actual plugin keeps throwing the following exception in the debug console running locally:

══╡ EXCEPTION CAUGHT BY FLUTTER FRAMEWORK ╞═════════════════════════════════════════════════════════
The following MissingPluginException was thrown:
MissingPluginException(No implementation found for method recordBreadcrumb on channel
newrelic_mobile)

When the exception was thrown, this was the stack:
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 297:3  throw_
packages/flutter/src/services/platform_channel.dart 332:7                    _invokeMethod
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50           <fn>
dart-sdk/lib/async/zone.dart 1407:47                                         _rootRunUnary
dart-sdk/lib/async/zone.dart 1308:19                                         runUnary
dart-sdk/lib/async/future_impl.dart 162:18                                   handleValue
dart-sdk/lib/async/future_impl.dart 838:44                                   handleValueCallback
dart-sdk/lib/async/future_impl.dart 867:13                                   _propagateToListeners
dart-sdk/lib/async/future_impl.dart 643:5                                    [_completeWithValue]
dart-sdk/lib/async/future_impl.dart 713:7                                    <fn>
dart-sdk/lib/async/zone.dart 1399:13                                         _rootRun
dart-sdk/lib/async/zone.dart 1301:19                                         run
dart-sdk/lib/async/zone.dart 1209:7                                          runGuarded
dart-sdk/lib/async/zone.dart 1249:23                                         callback
dart-sdk/lib/async/schedule_microtask.dart 40:11                             _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5                              _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 181:7           <fn>
newrelic-config-dev.js 5:18269                                               nrWrapper
════════════════════════════════════════════════════════════════════════════════════════════════════

Is it possible to no-op or not load the package when it's on web?

Thanks!

@ndesai-newrelic
Copy link
Contributor

@duraz0rz we will fix this in our next quarter.

@ndesai-newrelic ndesai-newrelic added the enhancement New feature or request label Jun 10, 2024
@vilorel
Copy link

vilorel commented Oct 2, 2024

Any updates on this?

@Gullity
Copy link

Gullity commented Nov 17, 2024

Hey did you try to modify your navigatorObservers?

I had the same issue and solved doing:

import 'package:flutter/foundation.dart';
...
      navigatorObservers: [
        if (!kIsWeb) NewRelicNavigationObserver(),
      ],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants