question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

router 3.0.0.rc2, ES5: Error: Uncaught (in promise): TypeError: Cannot read property 'call' of undefined

See original GitHub issue

I’m submitting a … (check one with “x”)

[X ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

The app throws the followng exception:

core.umd.min.js:21 EXCEPTION: Uncaught (in promise): TypeError: Cannot read property 'call' of undefinedErrorHandler.handleError @ core.umd.min.js:21next @ core.umd.min.js:28generatorOrNext.object.schedulerFn @ core.umd.min.js:28SafeSubscriber.__tryOrUnsub @ Rx.umd.js:1433SafeSubscriber.next @ Rx.umd.js:1382Subscriber._next @ Rx.umd.js:1335Subscriber.next @ Rx.umd.js:1299Subject.next @ Rx.umd.js:1063EventEmitter.emit @ core.umd.min.js:28onError @ core.umd.min.js:28onHandleError @ core.umd.min.js:28ZoneDelegate.handleError @ zone.js:336Zone.runGuarded @ zone.js:242_loop_1 @ zone.js:508drainMicroTaskQueue @ zone.js:515ZoneTask.invoke @ zone.js:437
core.umd.min.js:21 ORIGINAL STACKTRACE:ErrorHandler.handleError @ core.umd.min.js:21next @ core.umd.min.js:28generatorOrNext.object.schedulerFn @ core.umd.min.js:28SafeSubscriber.__tryOrUnsub @ Rx.umd.js:1433SafeSubscriber.next @ Rx.umd.js:1382Subscriber._next @ Rx.umd.js:1335Subscriber.next @ Rx.umd.js:1299Subject.next @ Rx.umd.js:1063EventEmitter.emit @ core.umd.min.js:28onError @ core.umd.min.js:28onHandleError @ core.umd.min.js:28ZoneDelegate.handleError @ zone.js:336Zone.runGuarded @ zone.js:242_loop_1 @ zone.js:508drainMicroTaskQueue @ zone.js:515ZoneTask.invoke @ zone.js:437
core.umd.min.js:21 Error: Uncaught (in promise): TypeError: Cannot read property 'call' of undefined
    at resolvePromise (zone.js:558)
    at resolvePromise (zone.js:543)
    at zone.js:591
    at ZoneDelegate.invokeTask (zone.js:365)
    at Object.onInvokeTask (core.umd.min.js:28)
    at ZoneDelegate.invokeTask (zone.js:364)
    at Zone.runTask (zone.js:265)
    at drainMicroTaskQueue (zone.js:497)
    at HTMLDocument.ZoneTask.invoke (zone.js:437)ErrorHandler.handleError @ core.umd.min.js:21next @ core.umd.min.js:28generatorOrNext.object.schedulerFn @ core.umd.min.js:28SafeSubscriber.__tryOrUnsub @ Rx.umd.js:1433SafeSubscriber.next @ Rx.umd.js:1382Subscriber._next @ Rx.umd.js:1335Subscriber.next @ Rx.umd.js:1299Subject.next @ Rx.umd.js:1063EventEmitter.emit @ core.umd.min.js:28onError @ core.umd.min.js:28onHandleError @ core.umd.min.js:28ZoneDelegate.handleError @ zone.js:336Zone.runGuarded @ zone.js:242_loop_1 @ zone.js:508drainMicroTaskQueue @ zone.js:515ZoneTask.invoke @ zone.js:437
zone.js:484 Unhandled Promise rejection: Cannot read property 'call' of undefined ; Zone: angular ; Task: Promise.then ; Value: TypeError: Cannot read property 'call' of undefined(…) TypeError: Cannot read property 'call' of undefined
    at ApplyRedirects.expandSegment (https://unpkg.com/@angular/router@3.0.0-rc.2/bundles/router.umd.min.js:20:10071)
    at ApplyRedirects.expandSegmentGroup (https://unpkg.com/@angular/router@3.0.0-rc.2/bundles/router.umd.min.js:20:9078)
    at ApplyRedirects.apply (https://unpkg.com/@angular/router@3.0.0-rc.2/bundles/router.umd.min.js:20:7499)
    at applyRedirects (https://unpkg.com/@angular/router@3.0.0-rc.2/bundles/router.umd.min.js:6:7976)
    at https://unpkg.com/@angular/router@3.0.0-rc.2/bundles/router.umd.min.js:20:29638
    at new ZoneAwarePromise (https://unpkg.com/zone.js@0.6.17/dist/zone.js:607:30)
    at Router.runNavigate (https://unpkg.com/@angular/router@3.0.0-rc.2/bundles/router.umd.min.js:20:29443)
    at https://unpkg.com/@angular/router@3.0.0-rc.2/bundles/router.umd.min.js:20:28999
    at ZoneDelegate.invoke (https://unpkg.com/zone.js@0.6.17/dist/zone.js:332:29)
    at Object.onInvoke (https://unpkg.com/@angular/core@2.0.0-rc.6/bundles/core.umd.min.js:28:16568)consoleError @ zone.js:484_loop_1 @ zone.js:511drainMicroTaskQueue @ zone.js:515ZoneTask.invoke @ zone.js:437
zone.js:486 Error: Uncaught (in promise): TypeError: Cannot read property 'call' of undefined(…)

Expected/desired behavior

View1 should be rendered displaying View View1 loaded with the router

Reproduction of the problem

With angular2 2.0.0-rc.6, router 3.0.0-rc.2, rxjs 5.0.0-beta.11, it doesn’t work: http://plnkr.co/edit/3fCbGewE6ZHwRIZfhZVe?p=preview

With angular2 2.0.0-rc.5, router 3.0.0-rc.1, rxjs 5.0.0-beta.6, it works correctly: http://plnkr.co/edit/WXRv9zwnU9f3lKseJxKP?p=preview

What is the expected behavior?

No exceptions

What is the motivation / use case for changing the behavior?

Upgrade from angular 2.0.0-rc.5 (router 3.0.0-rc.1, rxjs 5.0.0-beta.6) to angular 2.0.0-rc.6 (router 3.0.0-rc.2, rxjs 5.0.0-beta.11)

Please tell us about your environment:

  • Angular version: 2.0.0-rc.6
  • Browser: [all]
  • Language: [ES5]

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
adamfoleycommented, Sep 8, 2016

@sonicblis Here’s a temporary fix that works for me:

(function () {
    var g;
    if (typeof (window) != null) g = window;
    else if (typeof (global) != null) g = global;
        // couldn't locate global
    else return;

    var obsProto = g.Rx.Observable.prototype;

    obsProto._catch = obsProto.catch;
})();
0reactions
angular-automatic-lock-bot[bot]commented, Sep 9, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[webpack-cli] typeerror: cannot read properties of undefined ...
That is, the primary problem being: TypeError: Cannot read property 'properties' of undefined. The best solution I've found to the problem is to...
Read more >
angular/angular - Gitter
EXCEPTION: Error: Uncaught (in promise): TypeError: Cannot read property ... route to a default route with the new 3.0.0 router when there is...
Read more >
Newest Questions - Stack Overflow
i am trying to use reverse & sort on the data coming from RTK query but its showing me error 'data is not...
Read more >
Open Source Used In Firepower 7.0.0 - Cisco
1.270 ansi-regex 3.0.0. 1.270.1 Available under license. 1.271 react-onclickoutside 6.9.0. 1.271.1 Available under license.
Read more >
Release notes and release history for Mobiscroll
We fixed an issue with drag & drop on touch devices, where tapping on the event after dropping it on an invalid range...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found