Polymer app won't load in Safari (pre-1.0) - dart

A load of errors, and my app won't load. True on desktop (OSX El Capitan) and mobile (iOS9).
http://d.pr/i/1lvBa
Errors like:
TypeError: Attempting to change configurable attribute of unconfigurable property.
ReferenceError: Can't find variable: HTMLImports
(anonymous function)
atEndOfMicrotask
TypeError: document.registerElement is not a function. (In 'document.registerElement('polymer-element', {prototype: prototype})', 'document.registerElement' is undefined)
And more...
My Polymer (Dart) version is 0.16.3+3.

I assume you run into this issue https://github.com/dart-lang/polymer-dart/issues/538
It appears that problem is in outdated web_components, i got it all
working on iOS 9 and OSX 10.11 by overriding web_components in my yams
file by adding:
dependency_overrides: web_components: "^0.12.0+3"

Related

Error with HTTP library via the BrowserClient class

I try to use HTTP library, "Using on the Browser" but get Error in browser console (Dartium) even for example.
Error:
package:async/src/byte_collector.dart:1 'package:async/src/byte_collector.dart': error: line 42 pos 16: generic functions not supported
T _collectBytes<T>(
^: package:async/src/byte_collector.dart
Downgrade to "0.11.3+2" from "0.11.3+9" helped but I need 0.11.3+9 because of dependence. How to solve the problem with this error?
I think you are using an older Dartium version and need to update to the most recent version.

Highcharts more and highcharts guage issue

My high charts more is giving the following erro:
highcharts-more.js:29 Uncaught TypeError: I is not a function
I am calling the highcharts-more on the page with the folllowing:
https://code.highcharts.com/highcharts-more.js
I see that the highcharts-more file has been updated today. If I use the older version which is:
https://code.highcharts.com/4.2.2/highcharts-more.js
Then I start getting error in the solid-guage.js which is as follows:
solid-gauge.js:12 Uncaught TypeError: t is not a function
Plus the gayge fill color is not functioning properly as well.
Updating my local file highcharts.js to latest version solved the issue as, highcharts-more and solid-guage being called from website were updated to new versions along with highcharts.js.

Uncaught ReferenceError: Foundation is not defined

I am running into an several errors saying, "Uncaught ReferenceError: Foundation is not defined". They happen into the following:
- foundation.abide
- foundation.accordion
- foundation.clearing
- foundation.dropdown
- foundation.equalizer
- foundation.interchange
- foundation.joyride
In console, I typed Foundation, and got: Object {name: "Foundation", version: "5.5.1", media_queries: Object, stylesheet: CSSStyleSheet, global: Object…}global: Objectinherit: function (scope, methods) {init: function (scope, libraries, method, options, response) {init_lib: function (lib, args) {libs: Objectmedia_queries: Objectname: "Foundation"patch: function (lib) {rtl: falsescope: documentset_namespace: function () {stylesheet: CSSStyleSheetutils: Objectversion: "5.5.1"__proto__: Object.
I also verified that jQuery is working by using the console: $(document) resulting in [>#document].
I am running a Rails (4.2.1) stack on Ruby (2.0.0), and have been following the basic tutorial/walkthrough on zurb/foundation-rails.
rails g foundation:install
I have also tried RailsApps/rails_layout gem but am getting the same error.
rails generate layout:install foundation5 --force
The only thing I can think of is that I am defining Foundation after all the functions that needed it (abide, accordion, etc) but that shouldn't happen because the skeleton code is from the template generators. I'm not experienced in RoR or in the structure of Foundation to know if that's the case, so I was wondering where I can go about finding the error to this.
Or if this was just a client issue with my Mac.
This is caused by a bug in the 5.5.1.1 release of the foundation-rails gem. The plugins you listed above are loaded before the foundation code itself.
5.5.1.2 is on the way to fix this, but in the meantime you can resolve the issue by going back to the previous version:
gem 'foundation-rails', '= 5.5.1.0'

Code from dart2js is throwing NoSuchMethodErrors for get$functions

My Polymer.dart web app, that works fine in Dartium, is giving the following error (it repeats seven times) when compiled with dart2js using pub build --mode=debug and loaded in Chrome.
Resource interpreted as Script but transferred with MIME type text/plain: "http://confab.dev/index.html_bootstrap.dart". confab.dev/:10
warning: file:///home/dan/projects/confabulous/webatara/web/index.html.0.dart library not found index.html_bootstrap.dart.js:17188
Uncaught Error: NoSuchMethodError: Cannot call "get$functions" on "#<JsLibraryMirror>" (Object #<JsLibraryMirror> has no method 'get$functions') index.html_bootstrap.dart.js:17188
Stack Trace:
TypeError: Object #<JsLibraryMirror> has no method 'get$functions'
at dart._loadLibrary (http://confab.dev/index.html_bootstrap.dart.js:20000:19)
at dart._loadLibraries (http://confab.dev/index.html_bootstrap.dart.js:19917:11)
at dart._initPolymerOptimized (http://confab.dev/index.html_bootstrap.dart.js:19908:7)
at dart.initPolymer (http://confab.dev/index.html_bootstrap.dart.js:19902:7)
at main (http://confab.dev/index.html_bootstrap.dart.js:4112:7)
at _IsolateContext.eval$1 (http://confab.dev/index.html_bootstrap.dart.js:1369:23)
at dart.startRootIsolate (http://confab.dev/index.html_bootstrap.dart.js:1145:21)
at http://confab.dev/index.html_bootstrap.dart.js:26514:7
at init.currentScript (http://confab.dev/index.html_bootstrap.dart.js:26494:5)
at http://confab.dev/index.html_bootstrap.dart.js:26508:3
index.html_bootstrap.dart.js:17188
Uncaught NoSuchMethodError: Cannot call "get$functions" on "#<JsLibraryMirror>" (Object #<JsLibraryMirror> has no method 'get$functions') index.html_bootstrap.dart.js:2369
Because source maps don't appear to work (they're turned on in Chrome, and I have .map files), I don't even know which part of my code is causing this.
I've tried with interop.js included both before dart.js, as the docs say, and after, as this issue says.
Looks like a bug in dart2js. Please file an issue, ideally with a reproducible test-case.
pub upgrade fixed it. It turns out that something had replaced the polymer 0.9.5 that I'd been using with 0.8.10+4. Quite odd. The solution to this is to set the polymer version as '>= 0.9.5' instead of 'any', which I will do eventually, but for now I'm interested to see if it happens again.

Not able to run angular dart app in firefox

Recipebook Angular dart app not working in firefox 28.0 (Mac OSx),App is running fine on chrome and safari.
Stack trace (debug mode) :
"listen ignoreClick=false" main.dart.js:36580
"NoSuchMethodError : method not found: 'Symbol("onHashChange")'
Receiver: Instance of 'UnknownJavaScriptObject'
Arguments: []
STACKTRACE:
.wrapException<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:2687
.Interceptor.noSuchMethod$1<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:380
.Object.get$onHashChange#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:28458
.Router.listen$2$appRoot$ignoreClick<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:39777
.Router.listen$2$appRoot$ignoreClick<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:39788
.NgRoutingHelper.NgRoutingHelper$4<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:15478
.NgRoutingHelper.static.NgRoutingHelper$<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:15485
.JsMethodMirror._invoke$2<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:18740
.JsClassMirror._getInvokedInstance$3<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:18384
.JsClassMirror.newInstance$3<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:18387
.JsClassMirror.newInstance$3<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:18389
.DynamicInjector.newInstanceOf$4<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:36897
._TypeProvider.get$4<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:36863
.Injector__getInstanceByType_closure.call$0<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:36759
._defaultCreationStrategy<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:36604
.Injector._getInstanceByType$2<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:36687
.Injector._getInstanceByType$2<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:36682
.Injector.get$1<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:36710
.NgViewDirective.static.NgViewDirective$<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:15252
.JsMethodMirror._invoke$2<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:18740
.JsClassMirror._getInvokedInstance$3<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:18384
.JsClassMirror.newInstance$3<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:18387
.JsClassMirror.newInstance$3<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:18389
.DynamicInjector.newInstanceOf$4<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:36897
._TypeProvider.get$4<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:36863
.Injector__getInstanceByType_closure.call$0<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:36759
._defaultCreationStrategy<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:36604
.Injector._getInstanceByType$2<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:36687
.Injector.get$1<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:36710
.BlockFactory__instantiateDirectives_closure3.call$1<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:7219
.IterableMixinWorkaround_forEach<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:15864
.JSArray.forEach$1<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:542
J.forEach$1$ax#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:40778
.BlockFactory._instantiateDirectives$5<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:7038
.BlockFactory._link$4<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:6973
.BlockFactory._link$4<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:6975
.BlockFactory._link$4<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:6975
.BlockFactory.call$2<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:6941
.BlockFactory.call$2<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:6946
.BoundBlockFactory.blockFactory$1#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:6913
.BoundBlockFactory.call$1<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:6922
._Case.blockFactory$1#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:14424
.NgSwitchDirective_value_closure0.call$1<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:14406
.IterableMixinWorkaround_forEach<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:15864
.JSArray.forEach$1<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:542
J.forEach$1$ax#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:40778
.NgSwitchDirective.set$value<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:14367
.CachedInvocation.invokeOn$2<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:3759
.JsInstanceMirror._invoke$4<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:17934
.JsInstanceMirror.setField$2<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:17938
.AccessReflective._eval_access$_assign$3<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:10506
.AccessScope.assign$2<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:10332
J.assign$2$x#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:40721
.DynamicExpression.assign$2<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:9665
J.assign$2$x#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:40721
.Compiler_createMappings___closure2.call$1<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:7764
.relaxFnArgs3_closure0.call$3<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:15680
._Watch.fn$3#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:6432
.Scope._digestHandleDirty$5<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:5838
.Scope._digestComputeLastDirty$0<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:5801
.Scope._digestWhileDirtyLoop$0<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:5738
.Scope.$$digest$0<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:5724
.Scope._autoDigestOnTurnDone$0<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:5569
anonymous/<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:2935
._rootRun<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:19282
._ZoneDelegate.run$2<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:21603
.NgZone._finishTurn$2<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:6572
.NgZone._onRunBase$4<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:6544
.NgZone._onRunUnary$5<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:6551
anonymous/<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:2947
._ZoneDelegate.runUnary$3<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:21610
._CustomizedZone.runUnary$2<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:21792
._BaseZone.runUnaryGuarded$2<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:21692
._BaseZone_bindUnaryCallback_closure.call$1<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:21749
.invokeClosure_closure0.call$0<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:3995
._IsolateContext.eval$1<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:1705
._callInIsolate<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:1486
.invokeClosure<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:2828
.convertDartClosureToJS</$function</<#http://localhost:63342/RecipeBookAngularDart/build/main.dart.js:2845
"
Edit :
App is working fine if I include debug version of shadow DOM instead of min version
<script src="packages/shadow_dom/shadow_dom.debug.js"></script>

Resources