Skip to content

js-interop: NoSuchMethodError when compiled to JavaScript #26321

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
rillomas opened this issue Apr 23, 2016 · 4 comments
Closed

js-interop: NoSuchMethodError when compiled to JavaScript #26321

rillomas opened this issue Apr 23, 2016 · 4 comments

Comments

@rillomas
Copy link

rillomas commented Apr 23, 2016

Describe the issue you're seeing
I get the following error when I access a web page built by pub build

NoSuchMethodError: method not found: 'open$0' (J.getInterceptor$x(...).open$0 is not a function)

Does it happen in Dartium or when compiled to JavaScript?
This is happening after the code is compiled to JavaScript.
I checked in Dartium and Chrome and both had the same error.

  • Dart SDK version: Dart VM version: 1.15.0 (Wed Mar 09 10:07:59 2016) on "windows_x64"
  • pkg/js version: 0.6.0

Failing code:
https://github.com/rillomas/js_interop_issue

  1. pub get
  2. pub build
  3. cd build/web
  4. python -m SimpleHTTPServer
  5. access localhost:8000 with a browser and open the console to see error

if you comment out the following line in index.dart, the code will work properly.

_heartbeater = new Timer.periodic(HEARTBEAT_INTERVAL, _pulseHeartbeat);

@DisDis
Copy link

DisDis commented Apr 23, 2016

Please disable 'minify' and show stack trace.

- $dart2js:
    checked: false
    minify: false
    sourceMaps: true

maybe duplicate: #25785

@rillomas
Copy link
Author

rillomas commented Apr 23, 2016

I got the following stacktrace after disabling minify

Uncaught NoSuchMethodError: method not found: 'open$0' (J.getInterceptor$x(...).open$0 is not a function)
dart.wrapException @ js_helper.dart:1699
dart._rootHandleUncaughtError_closure.call$0 @ async_patch.dart:522
dart._microtaskLoop @ schedule_microtask.dart:41
dart._startMicrotaskLoop @ schedule_microtask.dart:50
dart._AsyncRun__initializeScheduleImmediate_internalCallback.call$1 @ async_patch.dart:54
dart.invokeClosure_closure0.call$0 @ js_helper.dart:2375
dart._IsolateContext.eval$1 @ isolate_helper.dart:462
dart._callInIsolate @ isolate_helper.dart:54
dart.invokeClosure @ js_helper.dart:2375
(anonymous function) @ js_helper.dart:2395

@DisDis
Copy link

DisDis commented Apr 23, 2016

Yes it is the same issue.

@mit-mit
Copy link
Member

mit-mit commented Apr 25, 2016

Closing as dupe.

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

No branches or pull requests

3 participants