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

bug: Canary: Uncaught (in promise) TypeError #5175

Closed
lordgreg opened this issue Jan 24, 2016 · 19 comments

Comments

Projects
None yet
@lordgreg
Copy link

commented Jan 24, 2016

Type: bug

Ionic Version: 2.x

Platform: desktop browser

Canary on Windows 10. At start, in console.log, I get this error:

Uncaught (in promise) TypeError: object is not a constructor
    at then (native)

line: undefined:1

This happens only in Canary on Windows 10 x64.

@Ionitron Ionitron added the v2 label Jan 24, 2016

@mhartington

This comment has been minimized.

Copy link
Member

commented Jan 25, 2016

How would I go about recreating this. Can this be isolated in a small example?

@lordgreg

This comment has been minimized.

Copy link
Author

commented Jan 25, 2016

@mhartington

  1. create new ionic project --v2 (tabs)
  2. start ionic serve
  3. open it in canary and check console.log (Canary being Google Canary downloaded from here: https://www.google.com/chrome/browser/canary.html)

capture

@Ionitron Ionitron removed the needs: reply label Jan 25, 2016

@RafaelAdao

This comment has been minimized.

Copy link

commented Jan 26, 2016

I have the same problem on using the 'blank', 'tabs' and 'tutorial' templates, in anyone browser.

Besides that, i get the message error of Ionic is not defined :/

Uncaught ReferenceError: ionic is not defined

on http://localhost:8100/?ionicplatform=android line 53

<script>
ionic && ionic.Platform && ionic.Platform.setPlatform("android");
</script>
@AkosLukacs

This comment has been minimized.

Copy link

commented Jan 27, 2016

Got here after I got the same error, but without ionic. For me removing es6-shim.js solved the problem. (Canary 50, and messing with an angular app)
Maybe that helps...

@5amfung

This comment has been minimized.

Copy link

commented Feb 5, 2016

Uncaught (in promise) TypeError: object is not a constructor
    at then (native)

Happened to me in:

Google Chrome Version 49.0.2623.39 beta (64-bit)

@mhartington

This comment has been minimized.

Copy link
Member

commented Feb 17, 2016

Is this still an issue?

@lordgreg

This comment has been minimized.

Copy link
Author

commented Feb 17, 2016

This is still an issue.

image

Canary version 50.0.2653.1 canary SyzyASan

@mhartington

This comment has been minimized.

Copy link
Member

commented Feb 17, 2016

Odd, it's not even pointing to a compiled file. This is most likely an bug with angular and any of their polyfills. @brandyscarney, any ideas?

@Ionitron Ionitron removed the needs: reply label Feb 17, 2016

@mhartington mhartington removed their assignment Feb 17, 2016

@brandyscarney

This comment has been minimized.

Copy link
Member

commented Feb 17, 2016

I was able to reproduce it in the conference app in Canary but I don't see it affecting the app at all. Not sure about this, but I did find a few related issues that may help to find a solution.

blacksonic/angular2-babel-esnext-starter#1
AntJanus/angular2-ts-starter-kit#3
https://code.google.com/p/chromium/issues/detail?id=575314

Going to give this one to Tim to look into.

@Pacoup

This comment has been minimized.

Copy link

commented Feb 18, 2016

This seems to be an issue in es6-shim, fixed in 0.34: paulmillr/es6-shim#403

@tlancina

This comment has been minimized.

Copy link
Member

commented Feb 19, 2016

Can't upgrade es6-shim at the moment because angular2 expects es6-shim@^0.33.3 as a peer dependency, so it will fail for npm2 users. I'll leave this open until they update or optionalPeerDependencies become a thing.

Also even with the shim, BrowserDomAdapter.prototype.setAttribute fails for me on *template attributes like *ngFor, so I'm not sure if Canary is supported at all.

@sspilleman

This comment has been minimized.

Copy link

commented Feb 24, 2016

I upgraded to es6-shim v0.34.4... No issues, so you can

@lordgreg

This comment has been minimized.

Copy link
Author

commented Feb 24, 2016

@sspilleman what do you mean no issues? When upgrading to 0.34.4 you break the core dependency of current angular2 version that is currently being used in ionic2 project?

@samvloeberghs

This comment has been minimized.

Copy link

commented Mar 4, 2016

this seems to be fixed in Canary 51

@lordgreg

This comment has been minimized.

Copy link
Author

commented Mar 4, 2016

Its not related to canary but with es6-shim latest version. I'm closing this ticket since the fix has been implemented. 👍

@lordgreg lordgreg closed this Mar 4, 2016

@samvloeberghs

This comment has been minimized.

Copy link

commented Mar 4, 2016

@lordgreg nice to hear
It's funny cause I have this problem in my angular2 setup.
When I run it in chrome 49 it gives me that error, in Canary 51 it doesn't.

@blacksonic

This comment has been minimized.

Copy link

commented Mar 15, 2016

If you dont want to wait for angular2 to upgrade its dependency you can switch to core-js for shimming, itt will solve the problem till then. Also helped for me blacksonic/angular2-babel-esnext-starter#1

@ChrisCoffey

This comment has been minimized.

Copy link

commented Mar 18, 2016

angular2 just landed the es6-shim change.

@iBasit

This comment has been minimized.

Copy link

commented Apr 16, 2016

I'm trying to fix same for our ionic2 angular2 project, but I cant manage to fix.

Can someone guide please..? If I add polyfill.js script, it gives some other errors.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 7, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.