frezyx / talker Goto Github PK
View Code? Open in Web Editor NEW☎️ Advanced error handler and logger for dart and flutter apps
Home Page: https://pub.dev/packages/talker
License: MIT License
☎️ Advanced error handler and logger for dart and flutter apps
Home Page: https://pub.dev/packages/talker
License: MIT License
Is your feature request related to a problem? Please describe.
There are at least two scenarios where you might need a pipe. In both case the pipe should act upon the error details before before it's passed down to observers or even cancel any further handling
Scenario 1:
Before you even handle any errors you want to check additional conditions. For example you might want to ask the user if they want to submit this report in the first place.
Scenario 2:
Before the error details reach the observers you want to add additional information, like an internal app version. This is specifically for those kind of information that you would need for every log and would otherwise need to add in every single observer. There is also the option to remove certain information.
This feature goes along well with my other feature request (#74), so they could both use a context property.
Describe the solution you'd like
When initializing talker you can provide a new property "pipes", which is an array of TalkerPipes. The order of the pipes should dictate the execution order. A TalkerPipe can either cancel any further execution or attach additional information.
The overall flow would look like this:
In the end observers have an enriched TalkerException.
Describe alternatives you've considered
You would have to add the wanted logic to all observers, which is a lot of redundant code. So no real alternative as far as I know.
Additional context
The idea of having a way to add information to all error details is based on Serilog Enrichers.
It is really a useful library
I want to add crashlytics integration but I wonder what will happen if I receive a crash in Talker and Crashlytics catches it too
By default Crashlytics catches errors so is this a duplicate catch if I add a CrashlyticsTalkerObserver
void onError(err) {
FirebaseCrashlytics.instance.recordError(
err.error,
err.stackTrace,
reason: err.message,
);
}
Describe the bug
When developing on physical iOS device, TalkerFlutter.init() is not printing logs onto the console.
Smartphone:
Additional context
When i shifted to just Talker(), it worked but prints special characters before and after the message - <....>
Describe the bug
in Windows files names cant have :
but the logs file is talker_logs_2023-02-24 00:13:22.710122.txt which is forbiden
To Reproduce
Steps to reproduce the behavior:
Talker screen
share logs file
Expected behavior
it should save the file with diffrent naming.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Describe the bug
In most logging libraries (like Logger or every Java logging libs) the info
has higher priority than debug
or verbose
(or other libraries use trace
at this level).
I think the good
level should be higher than debug
or verbose
, but I'm not sure in that (this log level doesn't exist in other logger libs).
Expected behavior
The LogLevel.info doesn't show the debug and verbose log messages.
Is your feature request related to a problem? Please describe.
As of right now, its only possible to get the entire combined message of a TalkerDataInterface
.
I have seen that internally, this message is used and then picked apart again with a Regex in the flutter_talker
implementation,
so that certain texts can be displayed in the UI.
Describe the solution you'd like
I feel like it would be nicer if separate parts of the message could be gotten without knowing the exact type of the TalkerDataInterface
at hand.
Additional context
Locally, I have already written extensions to provide such a mechanic, though it would be really cool to have something similar inbuilt.
Here is what it looks like in my code;
extension Messages on TalkerDataInterface {
String get logShort {
switch (runtimeType) {
case TalkerException:
return displayException;
case TalkerError:
return displayError;
case TalkerLog:
return '${message?.substring(0, 30)}...'; // arbitrarily picked 30.
default:
return '';
}
}
String get logLong {
switch (runtimeType) {
case TalkerException:
return '$displayException\n\n$displayStackTrace';
case TalkerError:
return '$displayError\n\n$displayStackTrace';
case TalkerLog:
return message ?? '';
default:
return '';
}
}
String get logTitle {
return '$displayTitle | ${(DateFormat.jms(Platform.localeName)).format(time)}.${time.millisecond}';
}
String get logMessage {
return '$logTitle\n\n$logLong';
}
}
in this code we have:
The package has functions to get the title with and without timestamp as well as the entire message,
but there are no methods to get the body alone or parts of the body.
(relying on less runtimeType would also be good)
Xcode build done. 7.8s
Connecting to VM Service at ws://127.0.0.1:52154/Aby-yF-KYa4=/ws
flutter: \^[[38;5;255m┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────<…>
flutter: \^[[38;5;255m│ [DEBUG] | 3:25:56 664ms | Provider is: NotifierProviderImpl<CounterNotifier, int> <…>
flutter: \^[[38;5;255m│ previous value: 0<…>
flutter: \^[[38;5;255m│ new value: 1<…>
flutter: \^[[38;5;255m└──────────────────────────────────────────────────────────────────────────────────────────────────────────────<…>
flutter: Hello
flutter: \^[[38;5;255m┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────<…>
flutter: \^[[38;5;255m│ [DEBUG] | 3:25:57 1ms | Provider is: NotifierProviderImpl<CounterNotifier, int> <…>
flutter: \^[[38;5;255m│ previous value: 1<…>
flutter: \^[[38;5;255m│ new value: 2<…>
flutter: \^[[38;5;255m└──────────────────────────────────────────────────────────────────────────────────────────────────────────────<…>
flutter: Hello
After updating the pubspec dependencies, i think the package probably broke after the #131
I'm using flutter version 3.7.12 and this method inside the MediaQuery is probably something on the newer versions.
This is probably a breaking change
Perhaps I'm missing something, but there does not appear to be an easy way to customize the date/time format of the log entries or the metadata header. For example, instead of
[WARNING] | 20:38:08 851ms | this is my log message
the developer might prefer
[WARN 2023-12-13 20:38:08.851] this is my log message
From what I can tell, to make this change one would have to override or add new methods to TalkerDateTimeFormatter
then either override TalkerDataInterface.displayTitleWithTime
or create a custom TalkerDataInterface
, and then somewhere, replace the default versions with your custom/overridden versions of these classes.
Describe the solution you'd like
to be able to define the metadata header format as easily as creating and using a custom LoggerFormatter
Describe alternatives you've considered
I'm aware you can create an entirely custom log type, however this prevents you from using the default talker.info
, talker.debug
, etc and you're stuck with talker.logTyped(YourCustomLog('Something like your own service message'));
Additional context
There is a lot to like about talker and the ecosystem you've built but given all the possible customization options, it feels strange to not be able to re-define the metadata header format.
Is your feature request related to a problem? Please describe.
When there are too many requests and responses, the sequence of operations gets disrupted. In such cases, it becomes difficult to determine which response corresponds to which request.
Describe the solution you'd like
It's necessary to somehow indicate which request the response is associated with when it arrives.
I just started using logging packages and I'm new to dart. This looks like a very nice package.
At the beginning of each output, there is a prefix of flutter:
, is there a way to remove that?
Описание ошибки
Я использую пакет talker_bloc_logger-2.3.1 с пакетом talker_flutter-3.5.5, на стадии сборки проекта вызывается две ошибки
/C:/Users/%USER%/AppData/Local/Pub/Cache/hosted/pub.dev/talker_bloc_logger-2.3.1/lib/bloc_logs.dart:120:39: Error: Member not found: 'blocCreate'.
String get title => WellKnownTitles.blocCreate.title;
/C:/Users/%USER%/AppData/Local/Pub/Cache/hosted/pub.dev/talker_bloc_logger-2.3.1/lib/bloc_logs.dart:147:39: Error: Member not found: 'blocClose'.
String get title => WellKnownTitles.blocClose.title;
Воспроизведение ошибки
Шаги по воспроизведению поведения:
Ожидаемое поведение
A clear and concise description of what you expected to happen.
Конфигурация:
Смартфон:
Попытки решения
Удаление обоих плагинов из pubspec.yaml, удаление всего кеша пакетов по пути C:\Users%USER%\AppData\Local\Pub\Cache\hosted, после чего flutter clean в окне проекта, переустановка всех пакетов.
Describe the bug
Flutter GraphQL and Talker conflict in dependencies. Talker is using an outdated version of path_provider. You get this error:
Because talker_flutter >=2.0.0 depends on path_provider ^2.0.11 and every version of flutter_graphql depends on path_provider ^0.4.1, talker_flutter >=2.0.0 is incompatible with flutter_graphql.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
There should be no conflicts. Let's upgrade talker to use Flutter's latest path_provider libraries.
Describe the bug
talker_dio_logger interceptor crashes when app is hot reloaded.
To Reproduce
talker: ^2.4.0
talker_flutter: ^2.4.1
talker_dio_logger: ^1.3.0
import 'package:talker_flutter/talker_flutter.dart';
class Logger {
Logger._();
static final instance = TalkerFlutter.init();
}
dio.interceptors.add(
TalkerDioLogger(
talker: Logger.instance,
settings: const TalkerDioLoggerSettings(
printRequestHeaders: true,
printResponseHeaders: true,
printResponseMessage: false,
),
),
);
======== Exception caught by widgets library =======================================================
The following _Exception was thrown building Builder(dirty, dependencies: [_LocalizationsScope-[GlobalKey#05c0e]]):
Exception: Addon currently exist
The relevant error-causing widget was:
MaterialApp MaterialApp:file:///Users/oleg/Projects/app/lib/main.dart:85:34
When the exception was thrown, this was the stack:
#0 Talker.registerAddon (package:talker/src/talker.dart:306:7)
#1 new TalkerDioLogger (package:talker_dio_logger/talker_dio_logger_interceptor.dart:18:13)
#2 new Api (package:app/services/api.dart:26:7)
#3 new TokenApi (package:app/services/token_api.dart:10:35)
#4 AppRouter.router.<anonymous closure> (package:app/navigation/app_router.dart:58:34)
#5 RouteBuilder._buildPageForRoute (package:go_router/src/builder.dart:297:27)
#6 RouteBuilder._buildRecursive (package:go_router/src/builder.dart:184:34)
#7 RouteBuilder.buildPages (package:go_router/src/builder.dart:143:7)
Expected behavior
Hot reload would happen without any issues.
Smartphone:
Same issue happens in latest Chrome on Mac OS.
[✓] Flutter (Channel stable, 3.7.3, on macOS 12.6.3 21G419 darwin-arm64, locale en-NO)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[!] Android Studio (version 2022.1)
✗ Unable to find bundled Java version.
[✓] Android Studio (version 2021.3)
[✓] IntelliJ IDEA Ultimate Edition (version 2022.3.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2022.3.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2022.3.1)
[✓] VS Code (version 1.75.1)
[✓] Connected device (2 available)
[✓] HTTP Host Availability
Describe the bug
When I've included the TalkerScreen
into my page screen I've gotten the RenderFlex overflow
error.
To Reproduce
Here is my source code
Steps to reproduce the behavior:
TalkerScreen
widget on any pagemain.dart
:FlutterError.onError = (details) => GetIt.I<Talker>().handle(details.exception, details.stack);
Expected behavior
No RenderFlex overflow
errors while using the TalkerScreen
.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Is your feature request related to a problem? Please describe.
I need to build my application through the web and display it in the internal browser of the third party platform, this application needs to be debugged in release mode, because the third party platform mobile web does not support opening the console review element, I cannot see the log. So I want to support the web
Describe the solution you'd like
When I build web Mobile publishing to run on a third-party platform, I want to be able to view the logs on my phone screen in the publishing environment
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
How can i use navigationObserver with auto_route package?
MaterialApp.router has no parameter named navigationObserver. What can I do?
Describe the bug
"print" cut off my logs.
It's related to a bug of flutter flutter/flutter#110236
To Reproduce
Steps to reproduce the behavior:
Execute flutter run
on the code sample
import 'package:talker/talker.dart';
void main() {
Talker().info("""
┌────1──────────────────────────────────────────────────────────────────────────────────────────────────────────
┌─────2─────────────────────────────────────────────────────────────────────────────────────────────────────────
┌───────3───────────────────────────────────────────────────────────────────────────────────────────────────────
[LOG] | 0:14:30 55ms | 123123123131232131231231231231231231231231231231123123123131232131231231231231231231231
""");
}
Expected results:
The console prints my complete logs.
Actual results:
The console only prints a portion of my logs.
Desktop (please complete the following information):
Refer to flutter flutter/flutter#110236
Smartphone (please complete the following information):
Refer to flutter flutter/flutter#110236
Additional context
The solution is use "debugPrint" instead of "print" in "talker_logger.dart line 11". But this needs talk_logger to be dependent on flutter SDK. I don't know what's the best solution. so post the issue here instead of sending the pull request.
Please update the Dio package into 5.0.0. Thanks
Is it possible to reverse the order of the logs? It's earliest first, a bit hard to scroll to the bottom to see the newest logs.
Describe the bug
TalkerScreenTheme textColor is not used consistently throughout the TalkerScreen page
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Text to be readable when background is not dark
Is your feature request related to a problem? Please describe.
I really like this package. It even provides UI to show the logs in which is great.
However, the TalkerScreen
has a bit too many features for my taste,
and doesnt fit with the design of my app too well.
Describe the solution you'd like
It would be nice if the TalkerDataCard
was exported, so we can build our own screen.
Describe alternatives you've considered
I have considered building the entire screen myself as well as the card.
However, with that have to create the colors and the frame, etc. myself.
Additional context
(it would also be nice if the icon button inside the cards could be configured via a "trailing" parameter)
Describe the bug
If i try to copy the logs with "Copy all logs", i get this error if the text is too large. I'm getting the error on Android emulator.
_PlatformException(error, android.os.TransactionTooLargeException: data parcel size 3366808 bytes, null, java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 3366808 bytes
at android.content.ClipboardManager.setPrimaryClip(ClipboardManager.java:107)
at io.flutter.plugin.platform.b.t(Unknown Source:16)
at io.flutter.plugin.platform.b.c(Unknown Source:0)
at io.flutter.plugin.platform.b$a.j(Unknown Source:2)
at y3.i$a.onMethodCall(Unknown Source:237)
at z3.k$a.a(Unknown Source:17)
at n3.c.l(Unknown Source:18)
at n3.c.m(Unknown Source:20)
at n3.c.i(Unknown Source:0)
at n3.b.run(Unknown Source:12)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: android.os.TransactionTooLargeException: data parcel size 3366808 bytes
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(BinderProxy.java:540)
at android.content.IClipboard$Stub$Proxy.setPrimaryClip(IClipboard.java:288)
at android.content.ClipboardManager.setPrimaryClip(ClipboardManager.java:105)
... 16 more)
#0 JSONMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:181)
#1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:296)
#2 Clipboard.setData (package:flutter/src/services/clipboard.dart:38) /
Expected behavior
Maybe the snackBar that pop up, should say the log is too big for copying, try share logs as a file.
Describe the bug
Opening the log shows the log items being overlapped by their title.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The item text should be below the title.
Smartphone:
Package:
Describe the bug
TalkerScreen
does not respect configured LogLevel
while console logs do respect it.
I initialize a global Talker
instance like this:
late final Talker logger;
void main() {
logger = TalkerFlutter.init(
logger: TalkerLogger(
settings: TalkerLoggerSettings(level: LogLevel.warning),
),
);
runApp(const App());
}
And create a TalkerScreen
like this:
showDialog(
context: context,
builder: (_) => SimpleDialog(
children: [
SizedBox(
width: 1000,
height: 600,
child: TalkerScreen(
appBarTitle: 'Logs',
talker: logger, // same global instance
),
),
],
),
);
When running, I can see that console logs are outputted correctly – only warnings and more severe, but TalkerScreen
still shows all logs, even those that should be filtered out.
Expected behavior
Both console and TalkerScreen
correctly filter out logs based on configured LogLevel
.
Additional context
Flutter Web
talker_flutter: 3.5.6
С установленным talker_flutter не собирается сборка. Ошибка:
`Launching lib\main.dart on SM M315F in debug mode...
�訡�� � �ଠ� ��ࠬ��� -
FAILURE: Build failed with an exception.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk8-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10)
Duplicate class kotlin.internal.jdk7.JDK7PlatformImplementations found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk7-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10)
Duplicate class kotlin.internal.jdk7.JDK7PlatformImplementations$ReflectSdkVersion found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk7-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10)
Duplicate class kotlin.internal.jdk8.JDK8PlatformImplementations found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk8-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10)
Duplicate class kotlin.internal.jdk8.JDK8PlatformImplementations$ReflectSdkVersion found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk8-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10)
Duplicate class kotlin.io.path.ExperimentalPathApi found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk7-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10)
Duplicate class kotlin.io.path.PathRelativizer found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk7-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10)
Duplicate class kotlin.io.path.PathsKt found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk7-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10)
Duplicate class kotlin.io.path.PathsKt__PathReadWriteKt found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk7-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10)
Duplicate class kotlin.io.path.PathsKt__PathUtilsKt found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk7-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10)
Duplicate class kotlin.jdk7.AutoCloseableKt found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk7-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10)
Duplicate class kotlin.jvm.jdk8.JvmRepeatableKt found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk8-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10)
Duplicate class kotlin.jvm.optionals.OptionalsKt found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk8-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10)
Duplicate class kotlin.random.jdk8.PlatformThreadLocalRandom found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk8-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10)
Duplicate class kotlin.streams.jdk8.StreamsKt found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk8-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$1 found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk8-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$2 found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk8-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$3 found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk8-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$4 found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk8-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10)
Duplicate class kotlin.text.jdk8.RegexExtensionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk8-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10)
Duplicate class kotlin.time.jdk8.DurationConversionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk8-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10)
Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
BUILD FAILED in 40s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
build.gradle android/
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
build.gradle app/gradle
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
android {
namespace "com.example.hackaton2"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.hackaton2"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {}
`
Describe the bug
Stack trace not printed when throwing String (or any type except Error/Exception).
To Reproduce
Call talker.log('message', exception: 'Exception message', stackTrace: stack);
in try-catch
Expected behavior
Prints stack trace
Solution?
String
exceptions are mapped to TalkerLog
(in error_handler.dart:8
) and this interface not includes stackTrace
in itsgenerateTextMessage()
function.
Hi, Thank you for great package.
Can logs be saved automatically on the phone? Regardless of whether the app crashes or the user closes it, I want to keep all old logs. Is there any way to prevent old bugs from being cleared from history when the app crashes or closes?
Describe the bug
Issue while adding any filter in the TalkerScreen
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The filters should be added without errors
Additional context
Unsupported operation: Cannot add to an unmodifiable list
When the exception was thrown, this was the stack:
#0 UnmodifiableListMixin.add (dart:_internal/list.dart:114:5)
#1 TalkerScreenController.addFilterTitle (package:talker_flutter/src/controller/talker_screen_controller.dart:57:56)
#2 TalkerScreenFilter._onToggleTitle (package:talker_flutter/src/ui/widgets/filter/talker_screen_filter.dart:167:18)
#3 TalkerScreenFilter.build.<anonymous closure> (package:talker_flutter/src/ui/widgets/filter/talker_screen_filter.dart:115:23)
#4 _GroupButtonBodyState._generateButtonsList.<anonymous closure> (package:group_button/src/group_button_body.dart:170:38)
#5 _InkResponseState.handleTap (package:flutter/src/material/ink_well.dart:1072:21)
#6 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:253:24)
#7 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:627:11)
#8 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:306:5)
#9 BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:276:7)
#10 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:163:27)
#11 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:464:20)
#12 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:440:22)
#13 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:337:11)
#14 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:395:7)
#15 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:357:5)
#16 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:314:7)
#17 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:295:7)
#18 _invoke1 (dart:ui/hooks.dart:167:13)
#19 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:341:7)
#20 _dispatchPointerDataPacket (dart:ui/hooks.dart:94:31)
Handler: "onTap"
Recognizer: TapGestureRecognizer#13c3e
debugOwner: GestureDetector
state: ready
won arena
finalPosition: Offset(44.3, 280.0)
finalLocalPosition: Offset(34.3, 21.0)
button: 1
sent tap down
====================================================================================================
I got this issue while running the app.
Launching lib\main.dart on SM M115F in debug mode...
Running Gradle task 'assembleDebug'...
../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/talker_flutter-0.5.3/lib/src/widgets/filter/talker_screen_filter.dart:100:38: Error: Member not found: 'GroupButton.checkbox'.
child: GroupButton.checkbox(
^^^^^
../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/talker_flutter-0.5.3/lib/src/widgets/filter/talker_screen_filter.dart:122:38: Error: Member not found: 'GroupButton.checkbox'.
child: GroupButton.radio(
^^^^^
any idea how to make the logs readable after build obfuscated application ?
Hi,
I was playing with Talker and the talker_http_logger package.
My app uses a piece of code very similar to the example:
import 'package:http_interceptor/http_interceptor.dart';
import 'package:talker_http_logger/talker_http_logger.dart';
void main() async {
final client = InterceptedClient.build(interceptors: [
TalkerHttpLogger(),
]);
await client.get("https://google.com".toUri());
}
Looking at the http logger:
class TalkerHttpLogger extends InterceptorContract {
TalkerHttpLogger({Talker? talker}) {
_talker = talker ?? Talker();
}
late Talker _talker;
@override
Future<BaseRequest> interceptRequest({
required BaseRequest request,
}) async {
final message = '${request.url}';
_talker.logTyped(HttpRequestLog(message, request: request));
return request;
}
@override
Future<BaseResponse> interceptResponse({
required BaseResponse response,
}) async {
final message = '${response.request?.url}';
_talker.logTyped(HttpResponseLog(message, response: response));
return response;
}
}
The logger simply writes the request to the logs, including the headers, without obfuscating anything. This is a problem when the headers contain stuff like Bearer 1234...
. These sensitive values are written in clear to the logs.
I would suggest obfuscating these specific fields by default, with maybe a flag to disable the obfuscation.
Cheers
Describe the bug
Eventing message is Blocname recvie event
To Reproduce
Steps to reproduce the behavior:
Bloc.observer = TalkerBlocObserver( talker: talker, settings: const TalkerBlocLoggerSettings( printEventFullData: false, printStateFullData: false, ), );
Expected behavior
Message is Blocname recieve event
, not recvie
Desktop (please complete the following information):
First: congratulations for this excellent work!
This error occurs in the talker_flutter version: 2.0.0+1.
Describe the bug
When an exception occurs, the message in the Snackbar is null.
Example:
void _handleException() {
try {
throw Exception('Test Exception');
} catch (e, st) {
talker.handle(e, st);
}
}
I believe this error is being caused by the 'SnackbarContent on file: talker_flutter/lib/src/ui/talker_wrapper/talker_wrapper.dart method.
I think the correct one would be: message: data.exception.toString(),
SnackbarContent(
message: data.exception.toString(),
title: options.errorTitle,
),
After changing to message: data.exception.toString(),
it works.
Is your feature request related to a problem? Please describe.
Just getting Error Details (exception, reason, stack) limits the ability to provide more context information. You can run into situations where just having these isn't enough to identify the cause and you want to send additional information like local variables or the arguments that were passed in to the crashing function. In my case I want to attach custom properties to a Crashlytics report.
Describe the solution you'd like
You should be able to set an optional dynamic object to the handle method, that then can be accessed in a talker observer.
Example of calling .handle:
final item = getItemById(id);
try {
// Something might throw when using the amount
}
catch(e,st){
final context = {"itemAmount": item.amount};
talker.handle(e,st, "Couldn't modify item amount", context);
}
Example of a TalkerObserver using the context
Function(TalkerException e) get onException => (e) {
final report = FirebaseCrashlytics.instance;
e.context.ForEach((key,value) => {
report.setCustomKey(key,value);
});
report.recordError(e.exception, stack: e.stackTrace, reason: e.message);
};
Describe alternatives you've considered
Alternatively you could write your own error handler, but you would lose all the benefits of this package.
Additional context
The idea with additional context information is based on structured logging in the .net world.
Describe the bug
Talker monitor not showing the correct response.
To Reproduce
Expected behavior
response should be in list with respected request.
Screenshots
second requests response replaced with first request response
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
Because talker_flutter 2.4.3 depends on share_plus ^6.3.1 and no versions of talker_flutter match >2.4.3 <3.0.0, talker_flutter ^2.4.3 requires share_plus ^6.3.1.
Hello,
It would be great if you added support for these events, especially since without them no cubit logs.
https://pub.dev/documentation/bloc/latest/bloc/BlocObserver-class.html
If I create a class as specified here https://pub.dev/packages/talker_flutter#talkerobserver
But I only import import 'package:talker_flutter/talker_flutter.dart';
.
Then the construction:
final crashlyticsTalkerObserver = CrashlyticsTalkerObserver();
final talker = TalkerFlutter.init(observer: crashlyticsTalkerObserver);
doesn't work for Crashlytics doesn't work for sending error reports
It's also not a good idea to wrap everything in runZonedGuarded() as it gets lost
Stack trace
In the TalkerDataCard
as of right now, matrix transformations are used to align the title.
This seems a bit more complex than needed.
I propose a different solution, which would be to simply specify a negative value for the position of the Positioned
in the Stack
.
Like this:
Positioned(
left: 15,
top: -8,
child: Container(
color: options.backgroudColor,
padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 10),
child: Text(
title,
style: TextStyle(
color: _color,
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
),
),
it is also possible to make elements placed outside of the bounds of the Stack
visible:
Stack(
clipBehavior: Clip.none,
by disabling its clipping. I dont think we need that here though.
При отладке приложения с целевой платформой macos, перестали выводиться логи в консоль отладки. Т.е. всё что вывожу принтом выводится а всё что вывожу Talker'ом нет. Появился этот баг пару дней назад.
Macos sanoma 14.1.1
Flutter 3.16.2
Dart 3.2.2
talker_flutter 3.5.6
Describe the bug
I'm afraid that request headers are not being displayed
Please add the response (request, response) color customization option in talker_dio_logger.
I'm not sure how to migrate from Talker.good(). There's no mention of its removal that I can find in the changelog, and I also can't find a migration guide posted anywhere. Also, WellKnownTitles
has been removed, and I assume has been replaced with TalkerLogType
, but there's no title
property on that either.
Describe the bug
When I used the Retrofit and Dio upload a file, I got a fatal exception.
If I hidden the logger, the upload will succeed.
To Reproduce
@MultiPart()
@POST(Api.uploadFile)
Future<Result<ImageFile>> uploadFile(
@Part(name: "file") File file,
@Part(name: "type") String type,
);
@override
Future<Result<ImageFile>> uploadFile(
file,
type,
) async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
final _data = FormData();
_data.files.add(MapEntry(
'file',
MultipartFile.fromFileSync(
file.path,
filename: file.path.split(Platform.pathSeparator).last,
),
));
_data.fields.add(MapEntry(
'type',
type,
));
final _result = await _dio
.fetch<Map<String, dynamic>>(_setStreamType<Result<ImageFile>>(Options(
method: 'POST',
headers: _headers,
extra: _extra,
contentType: 'multipart/form-data',
)
.compose(
_dio.options,
'common/upload',
queryParameters: queryParameters,
data: _data,
)
.copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
final value = Result<ImageFile>.fromJson(
_result.data!,
(json) => ImageFile.fromJson(json as Map<String, dynamic>),
);
return value;
}
dio.interceptors.add(TalkerDioLogger(
settings: const TalkerDioLoggerSettings(
printRequestHeaders: true,
),
));
Expected behavior
I/flutter (21545): ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (21545): │ [EXCEPTION] | 8:50:26 288ms | URL: http://192.168.1.61:8094/task-app/common/upload
I/flutter (21545): │ METHOD: POST
I/flutter (21545): │
I/flutter (21545): │ DioError [DioErrorType.other]: Converting object to an encodable object failed: Instance of 'FormData'
I/flutter (21545): │ #0 _JsonStringifier.writeObject (dart:convert/json.dart:794:7)
I/flutter (21545): │ #1 _JsonStringStringifier.printOn (dart:convert/json.dart:983:17)
I/flutter (21545): │ #2 _JsonStringStringifier.stringify (dart:convert/json.dart:968:5)
I/flutter (21545): │ #3 JsonEncoder.convert (dart:convert/json.dart:345:30)
I/flutter (21545): │ #4 HttpRequestLog.generateTextMessage (package:talker_dio_logger/http_logs.dart:40:34)
I/flutter (21545): │ #5 Talker._handleLogData (package:talker/src/talker.dart:325:16)
I/flutter (21545): │ #6 Talker.logTyped (package:talker/src/talker.dart:180:5)
I/flutter (21545): │ #7 TalkerDioLogger.onRequest (package:talker_dio_logger/talker_dio_logger_interceptor.dart:53:13)
I/flutter (21545): │ #8 DioMixin.fetch._requestInterceptorWrapper.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:dio/src/dio_mixin.dart:517:28)
I/flutter (21545): │ #9 DioMixin.checkIfNeedEnqueue (package:dio/src/dio_mixin.dart:789:22)
I/flutter (21545): │ #10 DioMixin.fetch._requestInterceptorWrapper.<anonymous closure>.<anonymous closure> (package:dio/src/dio_mixin.dart:515:22)
I/flutter (21545): │ #11 new Future.<anonymous closure> (dart:async/future.dart:252:37)
I/flutter (21545): │ #12 _rootRun (dart:async/zone.dart:1418:47)
I/flutter (21545): │ #13 _CustomZone.run (dart:async/zone.dart:1328:19)
I/flutter (21545): │ #14 _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
I/flutter (21545): │ #15 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1276:23)
I/flutter (21545): │ #16 _rootRun (dart:async/zone.dart:1426:13)
I/flutter (21545): │ #17 _CustomZone.run (dart:async/zone.dart:1328:19)
I/flutter (21545): │ #18 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:1260:23)
I/flutter (21545): │ #19 Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
I/flutter (21545): │ #20 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
I/flutter (21545): │ #21 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
I/flutter (21545): │ #22 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
I/flutter (21545): │
I/flutter (21545): │ #0 TalkerDioLogger.onError (package:talker_dio_logger/talker_dio_logger_interceptor.dart:76:18)
I/flutter (21545): │ #1 DioMixin.fetch._errorInterceptorWrapper.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:dio/src/dio_mixin.dart:574:28)
I/flutter (21545): │ #2 DioMixin.checkIfNeedEnqueue (package:dio/src/dio_mixin.dart:789:22)
I/flutter (21545): │ #3 DioMixin.fetch._errorInterceptorWrapper.<anonymous closure>.<anonymous closure> (package:dio/src/dio_mixin.dart:572:22)
I/flutter (21545): │ #4 new Future.<anonymous closure> (dart:async/future.dart:252:37)
I/flutter (21545): │ #5 _rootRun (dart:async/zone.dart:1418:47)
I/flutter (21545): │ #6 _CustomZone.run (dart:async/zone.dart:1328:19)
I/flutter (21545): │ #7 _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
I/flutter (21545): │ #8 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1276:23)
I/flutter (21545): │ #9 _rootRun (dart:async/zone.dart:1426:13)
I/flutter (21545): │ #10 _CustomZone.run (dart:async/zone.dart:1328:19)
I/flutter (21545): │ #11 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:1260:23)
I/flutter (21545): │ #12 Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
I/flutter (21545): │ #13 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
I/flutter (21545): │ #14 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
I/flutter (21545): │ #15 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
I/flutter (21545): │
I/flutter (21545): └──────────────────────────────────────────────────────────────────────────────────────────────────────────────
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.