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

Expandos are not allowed on strings, numbers, booleans or null): #681

Closed
4 of 11 tasks
neelansh-creatorstack opened this issue Dec 24, 2021 · 2 comments
Closed
4 of 11 tasks

Comments

@neelansh-creatorstack
Copy link

Platform:

  • Dart
  • Flutter Android or iOS
  • Flutter Web

IDE:

  • VSCode
  • IntelliJ/AS
  • XCode
  • Other, which one?

split-debug-info and obfuscate (Flutter Android or iOS) or CanvasKit (Flutter Web):

  • Enabled
  • Disabled

Platform installed with:

  • pub.dev
  • GitHub

Output of the command flutter doctor -v below:

The output goes here...

The version of the SDK (See pubspec.lock):
6.1.2


I have the following issue:

Invalid argument (Expandos are not allowed on strings, numbers, booleans or null): "My custom error message: error message"
#0 Expando._checkType (dart:core-patch/expando_patch.dart:144:7)
#1 Expando.[] (dart:core-patch/expando_patch.dart:20:5)
#2 _WeakMap.get (package:sentry/src/hub.dart:518:20)
#3 Hub._assignTraceContext (package:sentry/src/hub.dart:475:37)
#4 Hub.captureException (package:sentry/src/hub.dart:138:19)
#5 Sentry.captureException (package:sentry/src/sentry.dart:159:12)
#6 captureSentryException (package:utils/helper_functions.dart:119:10)
#7 logError (package:utils/helper_functions.dart:109:5)
#8 ProdFeedRepo.getFeedPosts.. (package:data/prod_feed_repo.dart:158:11)
#9 _rootRunUnary (dart:async/zone.dart:1362:47)
#10 _CustomZone.runUnary (dart:async/zone.dart:1265:19)
#11 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
#12 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#13 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#14 _SyncBroadcastStreamController._sendData (dart:async/broadcast_stream_controller.dart:378:25)
#15 _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:244:5)
#16 _StartWithStreamSink.add (package:rxdart/src/transformers/start_with.dart:15:10)
#17 forwardStream... (package:rxdart/src/utils/forwarding_stream.dart:31:49)
#18 forwardStream.runCatching (package:rxdart/src/utils/forwarding_stream.dart:21:12)
#19 forwardStream.. (package:rxdart/src/utils/forwarding_stream.dart:31:28)
#20 _rootRunUnary (dart:async/zone.dart:1362:47)
#21 _CustomZone.runUnary (dart:async/zone.dart:1265:19)
#22 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
#23 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#24 _DelayedData.perform (dart:async/stream_impl.dart:591:14)
#25 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:706:11)
#26 _PendingEvents.schedule. (dart:async/stream_impl.dart:663:7)
#27 _rootRun (dart:async/zone.dart:1346:47)
#28 _CustomZone.run (dart:async/zone.dart:1258:19)
#29 _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
#30 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1202:23)
#31 _rootRun (dart:async/zone.dart:1354:13)
#32 _CustomZone.run (dart:async/zone.dart:1258:19)
#33 _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
#34 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1202:23)
#35 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#36 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)

Steps to reproduce:

  • Call Sentry.captureException() with the error message passed into required params.

Actual result:

  • Actual

Expected result:

  • Result
@yehorh
Copy link

yehorh commented Dec 31, 2021

steps to reproduce:

throw a string

initial app from https://pub.dev/packages/sentry_flutter

import 'dart:async';

import 'package:flutter/widgets.dart';
import 'package:sentry_flutter/sentry_flutter.dart';

Future<void> main() async {
  runZonedGuarded(() async {
    await SentryFlutter.init(
      (options) {
        options.dsn = 'https://[email protected]/add-your-dsn-here';
      },
    );

    runApp(MyApp());
  }, (exception, stackTrace) async {
    await Sentry.captureException(exception, stackTrace: stackTrace);
  });
}

@marandaneto
Copy link
Contributor

dup of #680 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants