Skip to content

Dart error: Object.noSuchMethod (dart:core-patch/object_patch.dart:51) #261

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
thebf opened this issue Sep 13, 2019 · 7 comments
Closed
Labels
needs info More information is required from the reporter question User questions

Comments

@thebf
Copy link

thebf commented Sep 13, 2019

Output:

hover: Using engine from cache
hover: Cleaning the build directory
hover: ⚠ The go-flutter project tries to stay compatible with the beta channel of Flutter.
hover: ⚠     It's advised to use the beta channel. ($ flutter channel beta)
hover: Bundling flutter app
hover: Upgrade 'go-flutter' to the latest release
go: finding github.com/go-gl/gl latest
go: finding github.com/go-gl/glfw latest
hover: 'go-flutter' is on version: v0.29.3-0.20190907120750-38ae8aa36334
hover: Compiling 'go-flutter' and plugins
hover: build finished, starting app...
hover: Running Bamboo in debug mode
go-flutter: calculated pixelRatio limited to a minimum of 1.0. metrics: {"dpi":94.14671814671813,"monitorWidthMm":518,"monitorWidthSc":1920,"mscpi":94.14671814671813,"pixelRatio":0.5884169884169883,"ppsc":1,"windowWidthPx":1280,"windowWidthSc":1280}
flutter: Observatory listening on http://127.0.0.1:50300/XX3zks5b0NA=/
go-flutter: no handler found for channel flutter/isolate
[ERROR:c:\b\s\w\ir\k\src\flutter\lib\ui\ui_dart_state.cc(148)] Unhandled Exception: NoSuchMethodError: The method 'subscribe' was called on null.
Receiver: null
Tried calling: subscribe(Instance of 'RootPageController')
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1      new RootPageController (package:Bamboo/presentation/root_page.dart:98:54)
#2      new App (package:Bamboo/main.dart:110:46)
#3      main (package:Bamboo/main_desktop.dart:9:10)
#4      _runMainZoned.<anonymous closure>.<anonymous closure> (dart:ui/hooks.dart:229:25)
#5      _rootRun (dart:async/zone.dart:1124:13)
#6      _CustomZone.run (dart:async/zone.dart:1021:19)
#7      _runZoned (dart:async/zone.dart:1516:10)
#8      runZoned (dart:async/zone.dart:1500:12)
#9      _runMainZoned.<anonymous closure> (dart:ui/hooks.dart:221:5)
#10     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:305:19)
#11     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

Syncing files to device Flutter test device...
 9 635ms (!)

🔥  To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R".
An Observatory debugger and profiler on Flutter test device is available at: http://127.0.0.1:50300/XX3zks5b0NA=/
For a more detailed help message, press "h". To detach, press "d"; to quit, press "q".

go version go1.13 windows/amd64

The same project builds and runs fine on IOS, Android Web and Desktop Embedding though with some things not yet implemented that are listed as working in Hover.
Any tips on getting beyond this issue?
I've tried using the 3.3 branch without success.

@pchampio
Copy link
Member

Can you share the Dart code of your application?

Desktop Embedding though with some things not yet implemented that are listed as working in Hover.

Out of curiosity, what is listed as working in Hover and doesn't work on Flutter Desktop?

@thebf
Copy link
Author

thebf commented Sep 13, 2019

Unfortunately I can't directly share the Dart code. it's part of a proprietary application.
Though with a bit of coordination I can do a supervised screen sharing session using parsec or something similar.

Potential advantages leading me to try out Hover:
The path provider plugin looks to be implemented for windows here while it is not yet implemented for FDE.
Bootstrapping FDE to run our application is quite cumbersome at the moment (about half an hour, some head scratching and lots of fan noise).
Adding Hover to our project looks like it would be low on the factors: collision and effort, if it works as intended.

Oh and characters like ÆØÅ break input fields in FDE for now. Which is not ideal when your user base is in a country which heavily uses these characters.

@pchampio pchampio added the question User questions label Sep 13, 2019
@pchampio
Copy link
Member

pchampio commented Sep 13, 2019

Though with a bit of coordination I can do a supervised screen sharing session using parsec or something similar.

I just need a very simple main_desktop.dart file that reproduce the same error.
Can you craft that for me?

Thanks for sharing why you gave go-flutter a try! 👍

@pchampio pchampio added the needs info More information is required from the reporter label Sep 13, 2019
@thebf
Copy link
Author

thebf commented Sep 15, 2019

Sorry for the delay. The documentation was a bit light on creating the main_desktop.dart file so I tried to simply point it the the main dart file which got me to this point.

import 'package:flutter/foundation.dart' show debugDefaultTargetPlatformOverride;
import 'package:flutter/material.dart';

import 'package:Bamboo/main.dart';

void main() {
  debugDefaultTargetPlatformOverride = TargetPlatform.fuchsia;
  runApp(App());
}

@pchampio
Copy link
Member

pchampio commented Sep 15, 2019

Wellll, if I can't see what's behind import 'package:Bamboo/main.dart'; there isn't much I can do.

Your error comes from (package:Bamboo/presentation/root_page.dart:98:54), what happens if you comment this line?

@pchampio
Copy link
Member

pchampio commented Sep 15, 2019

After a quick Google search:
https://www.google.com/search?hl=en&q=Object.noSuchMethod%20(dart%3Acore-patch%2Fobject_patch.dart%3A51%3A5)

https://www.google.com/search?hl=en&q=Unhandled%20Exception%3A%20NoSuchMethodError%3A%20The%20method%20%27subscribe%27%20was%20called%20on%20null.

I can tell that your issue is not about go-flutter.
Even though your app works fine on others platforms, for desktops shells, some modifications to your codebase is to be expected. (The debugDefaultTargetPlatformOverride = TargetPlatform.fuchsia; line isn't enough).

I'm willing to try to look at this specific problem (even though I should really not^^), but please provide the source code that makes the app throw the #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5) #1 new RootPageController (package:Bamboo/presentation/root_page.dart:98:54) exception.

@pchampio
Copy link
Member

With the absence of a reproducible example, we cannot help you find a work-around/fix.

As the information required is simply not available, closing this issue for now.
(can always be re-opened)

@pchampio pchampio changed the title Running hover on an existing project produces the following error and the application window is stuck with the name loading... Dart error: Object.noSuchMethod (dart:core-patch/object_patch.dart:51) Sep 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info More information is required from the reporter question User questions
Development

No branches or pull requests

2 participants