Why is source info missing in flutter error - dart

I got the following error in the console while running my app:
flutter: type '() => Null' is not a subtype of type '(dynamic) => FutureOr<dynamic>' of 'f'
Unfortunately it doesn't tell me which code actually caused this error? Why is flutter missing some more information in the output?
Visual Studio Code 1.28.2
Flutter 0.9.4
Dart VM version: 2.0.0

Since you didn't put any code, so as far as I can tell, you are using () which is returning Null, and you were supposed to use (dynamic value) returning Future in your method declaration somewhere in your code.

Related

Nestjs TypeError: applicationConfig.getVersioning is not a function

I have reinstalled #nestjs/swagger and swagger-ui-express. All my dependencies are up to date. But I get this error:
applicationConfig.getVersioning is not a function at SwaggerExplorer.exploreRoutePathAndMethod
I have updated metadata tags in tsconfig.ts file as well. After debugging, I can find that the main issue is at line where createDocument function is called from Swagger Module class. Every code line before that works fine.
On console logging, I even could extract the values of config-correctly. However, once the createDocument method is called, the API comes to a crashing halt with the above stated error.
/home/prasanna/my_project/TapisProject/API/API/node_modules/#nestjs/swagger/dist/swagger-explorer.js:125
const controllerVersion = this.getVersionMetadata(metatype, applicationConfig.getVersioning());
^
TypeError: applicationConfig.getVersioning is not a function
at SwaggerExplorer.exploreRoutePathAndMethod (/home/prasanna/my_project/TapisProject/API/API/node_modules/#nestjs/swagger/dist/swagger-explorer.js:125:87)
at /home/prasanna/my_project/TapisProject/API/API/node_modules/#nestjs/swagger/dist/swagger-explorer.js:72:45
at Array.reduce ()
at /home/prasanna/my_project/TapisProject/API/API/node_modules/#nestjs/swagger/dist/swagger-explorer.js:71:99
at /home/prasanna/my_project/TapisProject/API/API/node_modules/lodash/lodash.js:13469:38
at /home/prasanna/my_project/TapisProject/API/API/node_modules/lodash/lodash.js:4967:15
at baseForOwn (/home/prasanna/my_project/TapisProject/API/API/node_modules/lodash/lodash.js:3032:24)
at Function.mapValues (/home/prasanna/my_project/TapisProject/API/API/node_modules/lodash/lodash.js:13468:7)
at MapIterator.iteratee (/home/prasanna/my_project/TapisProject/API/API/node_modules/#nestjs/swagger/dist/swagger-explorer.js:71:45)
at MapIterator.next (/home/prasanna/my_project/TapisProject/API/API/node_modules/iterare/src/map.ts:9:39)
need to upgrade #nestjs/core as well –

Uncaught lua exception error in zerobrane, any solution?

Zerobrane version v1.90
This error is caused after I put the following code into user preference:
styles.indicator.fncall = {fg = {-110,0,0}} --I got this in documentation page of zerobrane
I tried to reinstall zerobrane(both portable version and .exe verison) but the problem is still here.
Screenshot of the error message:
{-110,0,0}
You're passing a negative value as the red value; there's no way that could work (What would it even do?)

Dart Polymer : Type X is not a subtype of type Y

I develop my application with Dart and Polymer on PyCharm. I currently have an error :
Exception: type 'ObservableList<DrugFilterItem>' is not a subtype of type 'ObservableList<DrugCompareItem>' of '__$orderFilterList#51385934'
ObservableList is from package:observe/src/observable_list.dart
DrugFilterItem is from package:synmed/drug_elements/views/drug_filter_menu.dart
ObservableList is from package:observe/src/observable_list.dart
DrugCompareItem is from package:synmed/drug_elements/views/drug_search_toolbar.dart
DrugFilterItem and DrugCompareItem are both custom classes, DrugCompareItem extends DrugFilterItem, and the line designed by the error is :
ObservableList<DrugCompareItem> orderFilterList = new ObservableList<DrugFilterItem>();
The problem suddenly happened today : I installed Pycharm 2016.3 and tried to code, but I had an error with the package shadow, which I solved. Since, I have this error which I supposed came from a problem with the packages as the code didn't change from before to after.
What I have found for now is nothing in fact, I read a lot of post on this kind of error, one of the recurrent subject was the imports but I didn't find any problem with this. I am using Dart 1.20.1 and
polymer: "<=0.16.4+1"
core_elements: "<=0.7.1+3"
paper_elements: "<=0.7.1"
Do anyone has any clue for me? Thanks!
Sounds like https://github.com/dart-lang/sdk/issues/14972#issuecomment-108402835
I believe this is working as intended. A List is not assignable to a List, even if it only contains Apples.
There are several ways to work around this:
iterable.map((x) => x) (removing the generic type),
new List<MethodMirror>.from(iterable)
new MyIterableWrapper<MethodMirror>(iterable) (where the iterable-wrapper that would need to be written).

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.

Which way to go with these bugs

Compiling Dart app to js these two errors arise:
Nº1:
InvalidStateError: Failed to call 'register' on 'Document' for type 'polymer-element': a type with that name is already registered.
Nº2:
Breaking on exception: TypeError: Object #<qE> has no method 'vL'
The object qE is created by dart2js.
How to find the solution?
There are appropriate tools to find the solution?
Thanks for advance !
I heard N1 occurs when Angular and Polymer is used in the same app. This is a known bug.
related open issues:
- duplicate polymer-element registration should not break the app
- Get error "Uncaught InvalidStateError: Failed to call 'register' on 'Document' for type 'polymer-element'
For the N2 use pub build --mode=debug so you get unmangled names and then use one of the available strategies to fix the problem (use of MirrorsUsed, #observable, #reflectable)

Resources