You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using the logging package for months but suddenly I'm running in to issues with it when building with dart2js:
js_helper.dart:1772 Uncaught Error: NoSuchMethodError: method not found: 'call$0' (message.call$0 is not a function)
at Logger.log$5 (logging.dart:170)
at Logger.log$4 (main.dart.js:172577)
at logging.dart:218
at _wrapJsFunctionForAsync_closure.$protected (async_patch.dart:213)
at _wrapJsFunctionForAsync_closure.call$2 (async_patch.dart:237)
at _awaitOnObject_closure.call$1 (async_patch.dart:187)
at _RootZone.runUnary$2 (zone.dart:1371)
at _Future__propagateToListeners_handleValueCallback.call$0 (future_impl.dart:129)
at Object._Future__propagateToListeners (future_impl.dart:665)
at _Future__addListener_closure.call$0 (future_impl.dart:343)
This is logging package code that the exception is pointing to:
voidlog(Level logLevel, message,
[Object error, StackTrace stackTrace, Zone zone]) {
Object object;
if (isLoggable(logLevel)) {
if (message isFunction) message =message();
I added some debug:
voidlog(Level logLevel, message,
[Object error, StackTrace stackTrace, Zone zone]) {
Object object;
print ('level: $logLevel message: ${message.toString()} is function: ${(messageisFunction).toString()}');
print (message);
if (isLoggable(logLevel)) {
if (message isFunction) message =message();
It seems that this is failing on the first time it's called. It prints the following to the console before it fails:
13:48:51.772 level: INFO message: endpoint:api.mydomain.com/v3.1/ hash:no is function: true
13:48:51.802 endpoint:api.mydomain.com/v3.1/ hash:no
It's very strange that is thinks this String is a Function - In Dartium there is no issue and it prints false when checking if the message is a function.
This is the code I use to make that first log call (this has worked for months up until last week):
I've been using the logging package for months but suddenly I'm running in to issues with it when building with dart2js:
This is
logging
package code that the exception is pointing to:I added some debug:
It seems that this is failing on the first time it's called. It prints the following to the console before it fails:
It's very strange that is thinks this
String
is aFunction
- In Dartium there is no issue and it printsfalse
when checking if the message is a function.This is the code I use to make that first log call (this has worked for months up until last week):
The text was updated successfully, but these errors were encountered: