Skip to content

flutter: The following NoSuchMethodError was thrown building IconTheme #38

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

Closed
pchampio opened this issue Nov 30, 2018 · 8 comments
Closed
Assignees

Comments

@pchampio
Copy link
Member

https://medium.com/flutter-community/flutter-from-mobile-to-desktop-93635e8de64e

But have following issue

flutter: Observatory listening on http://127.0.0.1:50300/
flutter: тХРтХРтХб EXCEPTION CAUGHT BY WIDGETS LIBRARY тХЮтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХР
flutter: The following NoSuchMethodError was thrown building IconTheme(IconThemeData#2abdc(color:
flutter: Color(0xdd000000))):
flutter: Class 'Window' has no instance getter 'locales'.
flutter: Receiver: Instance of 'Window'
flutter: Tried calling: locales
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0      Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5)
flutter: #1      _WidgetsAppState.initState (package:flutter/src/widgets/app.dart:716:41)
flutter: #2      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3830:58)
flutter: #3      ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
flutter: #4      Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
flutter: #5      Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
flutter: #6      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #7      Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #8      ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
flutter: #9      ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
flutter: #10     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
flutter: #11     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
flutter: #12     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #13     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #14     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
flutter: #15     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
flutter: #16     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
flutter: #17     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
flutter: #18     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #19     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #20     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
flutter: #21     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
flutter: #22     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
flutter: #23     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
flutter: #24     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #25     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #26     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
flutter: #27     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3848:11)
flutter: #28     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
flutter: #29     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
flutter: #30     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
flutter: #31     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #32     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #33     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
flutter: #34     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
flutter: #35     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
flutter: #36     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
flutter: #37     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #38     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #39     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
flutter: #40     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3848:11)
flutter: #41     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
flutter: #42     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
flutter: #43     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
flutter: #44     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #45     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
flutter: #46     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
flutter: #47     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3848:11)
flutter: #48     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
flutter: #49     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
flutter: #50     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
flutter: #51     RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:909:16)
flutter: #52     RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:880:5)
flutter: #53     RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure> (package:flutter/src/widgets/binding.dart:826:17)
flutter: #54     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2266:19)
flutter: #55     RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:825:13)
flutter: #56     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:712:7)
flutter: #57     runApp (package:flutter/src/widgets/binding.dart:756:7)
flutter: #58     main (package:flutter_gallery/main.dart:26:3)
flutter: #59     _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:289:19)
flutter: #60     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
flutter: тХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХР

Originally posted by @KanybekMomukeyev in #36 (comment)

@pchampio
Copy link
Member Author

Using Flutter 0.11.13 • channel beta the simpleDemo does work.

Are you compiling your own flutter app ?
If so some tweaking might be needed!

@pchampio pchampio self-assigned this Nov 30, 2018
@KanybekMomukeyev
Copy link

@Drakirus now i will retry everything one more time.

@KanybekMomukeyev
Copy link

@Drakirus ok, everything is ok, even keyboard is working.

@KanybekMomukeyev
Copy link

@Drakirus i have one more question:
How to build windows release app?

I created folder, added there 3 files: main.exe, icudtl.dat, flutter_engine.dll
But when i try to excecute app in another machine, there are some errors:

2018/11/30 15:36:38 open C:/src/flutter_projects/go-flutter-desktop-embedder/example/simpleDemo/assets/icon.png: The system cannot find the path specified.


C:\Users\rtentiev>"C:\Users\rtentiev\Downloads\Telegram Desktop\android_app\android_app\main.exe"
[FATAL:e:\b\build\slave\windows_engine\build\src\flutter\fml\icu_util.cc(92)] Check failed: context->IsValid(). Must be able to initialize the ICU context. Tried: C:/src/flutter_projects/go-flutter-desktop-embedder/example/simpleDemo/icudtl.dat

@pchampio
Copy link
Member Author

pchampio commented Nov 30, 2018

You need to add flutter_project (if the content is only demo/build/flutter_assets it's ok).
Also, assets is needed if you want to have a custom icon.

@sfraize
Copy link

sfraize commented Dec 23, 2018

I'm seeing this same problem with my app -- what is the workaround for this? (I'm running via ./flutter-desktop-template with config.json -- my app logging starts but can't build it's widget tree).

screenshot 2018-12-22 19 17 52

flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞════════════
flutter: The following NoSuchMethodError was thrown building IconTheme(IconThemeData#2abdc(color:
flutter: Color(0xdd000000))):
flutter: Class 'Window' has no instance getter 'locales'.
flutter: Receiver: Instance of 'Window'
flutter: Tried calling: locales
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0 Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5)
flutter: #1 _WidgetsAppState.initState (package:flutter/src/widgets/app.dart:715:41)
flutter: #2 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3830:58)
flutter: #3 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
flutter: #4 Element.inflateWidget (package:flutter/src/widgets/framework.dart:295ter: #5 Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
flutter: #6 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
flutter: #7 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
... [elided] ...
flutter: #56 runApp (package:flutter/src/widgets/binding.dart:756:7)
flutter: #57 main (package:memo/main.dart:198:5)
flutter: #58 _startIsolate. (dart:isolate/runtime/libisolate_patch.dart:289:19)
flutter: #59 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
═══════════════════════════════════════════

@pchampio
Copy link
Member Author

Desktop platforms are not supported Flutter targets. Existing applications are likely to require modifications in order to run.

@ZzZombo
Copy link

ZzZombo commented Jan 27, 2019

Please be more specific. I have the same problem, and have absolutely no idea what do I have to do in order to fix this error. And I did create a brand new application.

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

No branches or pull requests

4 participants