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

fix: : [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: UnimplementedError #781

Closed
theappideasankit opened this issue Jul 7, 2023 · 16 comments
Labels
bug Something isn't working

Comments

@theappideasankit
Copy link

theappideasankit commented Jul 7, 2023

: [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: UnimplementedError
E/flutter (25139): #0      _DeferringMouseCursor.createSession (package:flutter/src/services/mouse_cursor.dart:254)
E/flutter (25139): #1      _DateFormatPatternField.formatField (package:intl/src/intl/date_format_field.dart:396)

E/flutter (25139): #2      _DateFormatPatternField.format (package:intl/src/intl/date_format_field.dart:254)
E/flutter (25139): #3      DateFormat.format (package:intl/src/intl/date_format.dart:302)
E/flutter (25139): #4      SearchTabController.mergeDateTime (package:dynasty_user_side/screens/car_rental/search_tab/controller/search_tab_controller.dart:215)

package

intl : intl: ^0.18.0

discription:-

when i build using this command (flutter build apk --release) is perfrect working but when i build and run using this command (shorebird run -- -d 192.168.29.121:5555) i found this issue

@theappideasankit theappideasankit added the bug Something isn't working label Jul 7, 2023
@SpajicM
Copy link

SpajicM commented Jul 7, 2023

I think you're using the wrong flutter version. To use Shorebird, you need to use latest stable Flutter.

@eseidel
Copy link
Contributor

eseidel commented Jul 7, 2023

Could you share the output of shorebird doctor? Thanks!

@theappideasankit
Copy link
Author

image

@theappideasankit
Copy link
Author

I think you're using the wrong flutter version. To use Shorebird, you need to use latest stable Flutter.

Flutter 3.10.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 84a1e904f4 (8 weeks ago) • 2023-05-09 07:41:44 -0700
Engine • revision d44b5a94c9
Tools • Dart 3.0.0 • DevTools 2.23.1

@eseidel
Copy link
Contributor

eseidel commented Jul 7, 2023

Is this running on desktop or Android? I'm new to this mouse cursor code.

https://github.com/flutter/flutter/blob/796c8ef792/packages/flutter/lib/src/services/mouse_cursor.dart#L252

@eseidel
Copy link
Contributor

eseidel commented Jul 7, 2023

Actually, nevermind, that last stack frame makes no sense.

@eseidel
Copy link
Contributor

eseidel commented Jul 7, 2023

I'm not sure exactly what version of package:intl this is (your pubspec.lock would tell you), but:
https://github.com/dart-lang/i18n/blob/main/pkgs/intl/lib/src/intl/date_format_field.dart#L355
hasn't changed in 8 years, and does not call UnimplementedError (unless one of the methods it calls does).

I'm still confused why the stack looks like that (I guess it's a release build and we only are seeing some of the stack symbols)?

I'm still not sure how Shorebird could be causing issues here.

You're saying that:
flutter run --release works, but shorebird run does not, correct?

@theappideasankit
Copy link
Author

theappideasankit commented Jul 7, 2023

Is this running on desktop or Android? I'm new to this mouse cursor code.

https://github.com/flutter/flutter/blob/796c8ef792/packages/flutter/lib/src/services/mouse_cursor.dart#L252

android

E/flutter (14934): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: UnimplementedError
E/flutter (14934): #0 _DeferringMouseCursor.createSession (package:flutter/src/services/mouse_cursor.dart:254)

E/flutter (14934): #1 _DateFormatPatternField.formatField (package:intl/src/intl/date_format_field.dart:396)
E/flutter (14934): #2 _DateFormatPatternField.format (package:intl/src/intl/date_format_field.dart:254)

E/flutter (14934): #3 DateFormat.format (package:intl/src/intl/date_format.dart:302)

E/flutter (14934): #4 SearchTabController.mergeDateTime (package:dynasty_user_side/screens/car_rental/search_tab/controller/search_tab_controller.dart:215)

E/flutter (14934): #5 SearchTabController.searchRentalAPICon (package:dynasty_user_side/screens/car_rental/search_tab/controller/search_tab_controller.dart:264)

E/flutter (14934): #6 SearchTabScreen.buildSearchButton. (package:dynasty_user_side/screens/car_rental/search_tab/view/search_tab_screen.dart:382)

E/flutter (14934): #7 _InkResponseState.handleTap (package:flutter/src/material/ink_well.dart:1154)

E/flutter (14934): #8 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:275)

E/flutter (14934): #9 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:654)
E/flutter (14934): #10 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:311)
E/flutter (14934): #11 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:244)
E/flutter (14934): #12 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:630)
E/flutter (14934): #13 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:98)
E/flutter (14934): #14 PointerRouter._dispatchEventToRoutes. (package:flutter/src/gestures/pointer_router.dart:143)
E/flutter (14934): #15 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625)
E/flutter (14934): #16 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:141)
E/flutter (14934): #17 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:127)
E/flutter (14934): #18 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:465)
E/flutter (14934): #19 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:445)
E/flutter (14934): #20 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:331)
E/flutter (14934): #21 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:400)
E/flutter (14934): #22 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:363)
E/flutter (14934): #23 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:320)
E/flutter (14934): #24 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:293)
E/flutter (14934): #25 _invoke1 (dart:ui/hooks.dart:158)
E/flutter (14934): #26 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:382)
E/flutter (14934): #27 _dispatchPointerDataPacket (dart:ui/hooks.dart:91)
E/flutter (14934):

@theappideasankit
Copy link
Author

theappideasankit commented Jul 7, 2023

I'm not sure exactly what version of package:intl this is (your pubspec.lock would tell you), but: https://github.com/dart-lang/i18n/blob/main/pkgs/intl/lib/src/intl/date_format_field.dart#L355 hasn't changed in 8 years, and does not call UnimplementedError (unless one of the methods it calls does).

I'm still confused why the stack looks like that (I guess it's a release build and we only are seeing some of the stack symbols)?

I'm still not sure how Shorebird could be causing issues here.

You're saying that: flutter run --release works, but shorebird run does not, correct? ==========>>>>yes right

yes right and shorebird run, shorebird release android, shorebird build apk not work

@eseidel
Copy link
Contributor

eseidel commented Jul 7, 2023

OK, yes, I think @SpajicM is right, I suspect this is that shorebird is building your app with Flutter 3.10.5 and flutter is building the app with Flutter 3.10.0 and that's causing the issue.

My guess is if you run flutter upgrade you'll find things fixed? But that's still a guess on my part.

@theappideasankit
Copy link
Author

same issue after flutter update 3.10.5

@eseidel eseidel moved this to Customers in iOS Alpha Jul 10, 2023
@eseidel
Copy link
Contributor

eseidel commented Jul 10, 2023

Thanks for the report. I'm still very confused how the behavior could differ between flutter at 3.10.5 and shorebird (which uses Flutter 3.10.5).

Can you confirm what version of package:intl your pubspec.lock reports?

Line 396 in date_format_field.dart (from package intl 0.18.1) does not actually point to a line:
https://github.com/dart-lang/i18n/blob/intl-v0.18.1/pkgs/intl/lib/src/intl/date_format_field.dart#L396

@eseidel
Copy link
Contributor

eseidel commented Jul 10, 2023

In 0.18.0 it is:
return formatTimeZoneRFC(date);

@eseidel
Copy link
Contributor

eseidel commented Jul 10, 2023

Which does in fact throw:

  String formatTimeZoneRFC(DateTime date) {
    throw UnimplementedError();
  }

I believe that's the error you're actually hitting.

@eseidel
Copy link
Contributor

eseidel commented Jul 10, 2023

Yeah, looks like that's just a bug in 0.18.0, which was fixed in 0.18.1. I would recommend upgrading to package:intl 0.18.1. I'm still not sure why this is occurring for you in Shorebird but no in Flutter?

@eseidel
Copy link
Contributor

eseidel commented Jul 26, 2023

I believe this was a package:intl bug (see above), speculatively closing. Let me know if you're still having issues!

@eseidel eseidel closed this as completed Jul 26, 2023
@github-project-automation github-project-automation bot moved this from Customers to Done in Adoption Blockers Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Done
Status: Customers
Development

No branches or pull requests

3 participants