Coder Social home page Coder Social logo

appspector / flutter-plugin Goto Github PK

View Code? Open in Web Editor NEW
62.0 62.0 11.0 3.64 MB

Flutter plugin for AppSpector SDK. With AppSpector you can remotely debug your app running in the same room or on another continent in real-time. https://pub.dev/packages/appspector

Home Page: https://appspector.com

License: Other

Java 16.48% Ruby 1.67% Objective-C 35.19% Dart 46.27% Shell 0.38%
android dart debugging flutter ios logger

flutter-plugin's Introduction

appspector

flutter-plugin's People

Contributors

atrope avatar danydev avatar deszip avatar dimdron avatar fylfot avatar leocardoso94 avatar rasmusir avatar sergeyzenchenko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

flutter-plugin's Issues

Unable to build in Flutter after 3.0

When running my app on Flutter versions after 3.0, he is unable to build, and show this error:

: Error: The non-abstract class 'AppSpectorHttpClient' is missing implementations for these members

image

The method 'toImage' isn't defined for the class 'ContainerLayer' after upgrading to Flutter 1.9

I'm getting the following error while trying to compile my project uysing Appspector 0.0.7 with Flutter 1.9.1+hotfix.2, dart 2.5.0

Compiler message:
../../software/flutter/.pub-cache/hosted/pub.dartlang.org/appspector-0.0.7/lib/src/request_receiver.dart:39:8: Error: The method 'toImage' isn't defined for the class 'ContainerLayer'.
 - 'ContainerLayer' is from 'package:flutter/src/rendering/layer.dart' ('../../software/flutter/packages/flutter/lib/src/rendering/layer.dart').
Try correcting the name to the name of an existing method, or defining a method named 'toImage'.
      .toImage(renderObject.paintBounds, pixelRatio: ratio > 1.0 ? 1.0 : ratio);
       ^^^^^^^
Compiler failed on /home/<me>/GitHub/flutter_kotlin_test/lib/main.inquinova.dart

FAILURE: Build failed with an exception.

* Where:
Script '/home/<me>/software/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 765

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebugArm64'.

As far as I can tell the method toImage still exist on ContainerLayer, but something seems wonky.

[QUESTION] No Logger output when the app is built in release mode

Hi! I want to use the inbuilt Logger, with runZonedGuarded. When I build the app in debug mode and the error occurs, I can see the line TEST with the TEST tag on my AppSpector control center. However if I build the app in release mode, then I can't see that line, when the same error occurs. Any idea on this one?

runZonedGuarded(() async {
      await onInit();
      await onInjection();
      await onTypeAdapterRegistration();
      onAppSpectorInit(
        enable: EnvironmentConfiguration.enableAppSpector,
        sessionId: EnvironmentConfiguration.getSessionId(),
      );
      final Widget app = await onCreate();
      runApp(app);
    }, (error, stack) {
      Logger.e('TEST', 'TEST');
      print(error);
      print(stack);
    });

Error while building release apk

This happens after upgrading flutter sdk to v1.7.

file:///home/cirrus/.pub-cache/hosted/pub.dartlang.org/appspector-0.0.5/lib/src/http/response_wrapper.dart:4:7: Error: The non-abstract class 'HttpResponseWrapper' is missing implementations for these members:
 - HttpClientResponse.compressionState
Try to either
 - provide an implementation,
 - inherit an implementation from a superclass or mixin,
 - mark the class as abstract, or
 - provide a 'noSuchMethod' implementation.

class HttpResponseWrapper extends StreamView<List<int>>
      ^^^^^^^^^^^^^^^^^^^
org-dartlang-sdk:///third_party/dart/sdk/lib/_http/http.dart:1967:42: Context: 'HttpClientResponse.compressionState' is defined here.
  HttpClientResponseCompressionState get compressionState;
                                         ^^^^^^^^^^^^^^^^

In iOS build flutter logs are not printing

Hi, In iOS build the print statements of is not logging in AppSpector console, only native print statements are logging. When i am running app directly from XCode it's working fine but from build it's not(Tried with both debug and release build). Thanks

Crash on iOS

Hi, i have some weird crash on iOS app.

Here are stacktraces

Fatal Exception: NSInvalidArgumentException

0 CoreFoundation 0x1a3bf1654 __exceptionPreprocess
1 libobjc.A.dylib 0x1a3913bcc objc_exception_throw
2 CoreFoundation 0x1a3af5dd8 -[NSOrderedSet initWithSet:copyItems:]
3 CoreFoundation 0x1a3bf57f8 forwarding
4 CoreFoundation 0x1a3bf771c _CF_forwarding_prep_0
5 appspector 0x1020762bc (Missing)
6 appspector 0x102075dd8 (Missing)
7 Flutter 0x101b89d48 (Missing)
8 Flutter 0x10166c994 (Missing)
9 Flutter 0x1019332e8 (Missing)
10 Flutter 0x101675a40 (Missing)
11 Flutter 0x1016776b8 (Missing)
12 CoreFoundation 0x1a3b70134 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION
13 CoreFoundation 0x1a3b6fe50 __CFRunLoopDoTimer
14 CoreFoundation 0x1a3b6f52c __CFRunLoopDoTimers
15 CoreFoundation 0x1a3b6a53c __CFRunLoopRun
16 CoreFoundation 0x1a3b69ba8 CFRunLoopRunSpecific
17 GraphicsServices 0x1adcd9344 GSEventRunModal
18 UIKitCore 0x1a7ca53e4 UIApplicationMain
19 Runner 0x100d871ec main + 6 (AppDelegate.swift:6)
20 libdyld.dylib 0x1a39f18f0 start

AND

Crashed: com.apple.main-thread
0 libsystem_kernel.dylib 0x1a39e6d88 __pthread_kill + 8
1 libsystem_pthread.dylib 0x1a38ff1e8 pthread_kill$VARIANT$mp + 136
2 libsystem_c.dylib 0x1a3852934 abort + 100
3 AppSpectorSDK 0x104b6b074 _ASExceptionHandler + 322
4 FBSDKCoreKit 0x104ef7e04 FBSDKExceptionHandler + 64
5 CoreFoundation 0x1a3bf195c __handleUncaughtException + 636
6 libobjc.A.dylib 0x1a3913e74 _objc_terminate() + 112
7 Runner 0x10482f578 CLSTerminateHandler() + 4308923768
8 libc++abi.dylib 0x1a39ba14c std::__terminate(void (*)()) + 16
9 libc++abi.dylib 0x1a39bce58 __cxa_rethrow + 144
10 libobjc.A.dylib 0x1a3913d80 objc_exception_rethrow + 40
11 CoreFoundation 0x1a3b69c14 CFRunLoopRunSpecific + 532
12 GraphicsServices 0x1adcd9344 GSEventRunModal + 160
13 UIKitCore 0x1a7ca53e4 UIApplicationMain + 1932
14 Runner 0x1048171ec main + 6 (AppDelegate.swift:6)
15 libdyld.dylib 0x1a39f18f0 start + 4

Thanks a lot

Getting Undefined Symbol Errors when archiving iOS build

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_ASExternalEvent", referenced from:
      objc-class-ref in ASPluginEventsHandler.o
  "_AS_COMMANDS_MONITOR", referenced from:
      -[AppSpectorPlugin validateAndMapRawMonitorIds:] in AppSpectorPlugin.o
  "_AS_HTTP_MONITOR", referenced from:
      -[AppSpectorPlugin validateAndMapRawMonitorIds:] in AppSpectorPlugin.o
      -[ASPluginEventsHandler handleHTTPRequestCall:result:] in ASPluginEventsHandler.o
      -[ASPluginEventsHandler handleHTTPResponseCall:result:] in ASPluginEventsHandler.o
  "_AS_FS_MONITOR", referenced from:
      -[AppSpectorPlugin validateAndMapRawMonitorIds:] in AppSpectorPlugin.o
  "_OBJC_CLASS_$_AppSpector", referenced from:
      objc-class-ref in AppSpectorPlugin.o
      objc-class-ref in ASPluginEventsHandler.o
     (maybe you meant: _OBJC_CLASS_$_AppSpectorPlugin)
  "_AS_LOG_MONITOR", referenced from:
      -[AppSpectorPlugin validateAndMapRawMonitorIds:] in AppSpectorPlugin.o
      -[ASPluginEventsHandler handleLogEventCall:result:] in ASPluginEventsHandler.o
  "_AS_SCREENSHOT_MONITOR", referenced from:
      -[AppSpectorPlugin validateAndMapRawMonitorIds:] in AppSpectorPlugin.o
  "_AS_ENVIRONMENT_MONITOR", referenced from:
      -[AppSpectorPlugin validateAndMapRawMonitorIds:] in AppSpectorPlugin.o
  "_AS_COREDATA_MONITOR", referenced from:
      -[AppSpectorPlugin validateAndMapRawMonitorIds:] in AppSpectorPlugin.o
  "_AS_SQLITE_MONITOR", referenced from:
      -[AppSpectorPlugin validateAndMapRawMonitorIds:] in AppSpectorPlugin.o
  "_AS_NOTIFICATION_MONITOR", referenced from:
      -[AppSpectorPlugin validateAndMapRawMonitorIds:] in AppSpectorPlugin.o
  "_AS_DEFAULTS_MONITOR", referenced from:
      -[AppSpectorPlugin validateAndMapRawMonitorIds:] in AppSpectorPlugin.o
  "_AS_ANALYTICS_MONITOR", referenced from:
      -[AppSpectorPlugin validateAndMapRawMonitorIds:] in AppSpectorPlugin.o
  "_AS_PERFORMANCE_MONITOR", referenced from:
      -[AppSpectorPlugin validateAndMapRawMonitorIds:] in AppSpectorPlugin.o
  "_AS_LOCATION_MONITOR", referenced from:
      -[AppSpectorPlugin validateAndMapRawMonitorIds:] in AppSpectorPlugin.o
  "_OBJC_CLASS_$_AppSpectorConfig", referenced from:
      objc-class-ref in AppSpectorPlugin.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Podfile.lock

 - appspector (0.0.1):
    - AppSpectorSDK
    - Flutter
  - AppSpectorSDK (1.4.4)

Pubspec.lock

appspector:
    dependency: "direct main"
    description:
      name: appspector
      url: "https://pub.dartlang.org"
    source: hosted
    version: "0.7.0"

SQLite monitor don't work on Android

I have configured plugin like inscructions and it works fine on iOS, when I click on SQLite, shows all tables that I have on my app. But when I open on Android and click on SQLite, shows a message "The app doesn't have any databases".

Follow my configuration:

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  SharedPreferences session = await SharedPreferences.getInstance();

  DB db = DB();
  await db.initBd();
  runAppSpector();
  initializeDateFormatting('pt_BR', null)
      .then((_) => runApp(MyApp(session)));
}

void runAppSpector() {
  final config = Config()
    ..iosApiKey = "XXXXX"
    ..androidApiKey = "XXXX";

  config.monitors = [
    Monitors.http,
    Monitors.logs,
    Monitors.screenshot,
    Monitors.sqLite,
    Monitors.sharedPreferences
  ];

  AppSpectorPlugin.run(config);
}

Desktop Support?

Do you have plans to support Flutter Desktop (Windows, Mac, etc?

Issue receiving logs on Android 13 devices

Hello, I am currently in the trial, and attempting to receive debug logs for my Android app. I am not receiving logs for two Android 13 devices, these are the only Android 13 devices I have tried.

I have received logs successfully with the same app on Android 11, and 12.

The Android 13 devices:

Realme GT NEO 3T
realme RMX3371 | Android 13

Xiaomi 12 Pro
Xiaomi 2201122G | Android 13

The logs screen just says NO DATA

Is it possible to specify modules from flutter?

Hi there, this is working great for me in general but I was wondering if there is a way, or if you have plans to support, selectively enabling collection modules as you can in the native SDKs?

On flutter I am not able to start sessions.

AppSpector( 1355): Session start failed. UNKNOWN

I am continuously getting this error.

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.6, on macOS 11.0.1 20B50 darwin-x64, locale en-IN)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.4)
[!] Android Studio (version 4.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.53.0)
[✓] Connected device (3 available)
! Error: iphone 12 pro max is busy: Copying cache files from device. Xcode will continue when iphone 12 pro max is finished. (code -10)
! Error: iPhone is busy: Waiting for Device. Xcode will continue when iPhone is finished. (code -10)

! Doctor found issues in 1 category.

AppSpector Flutter Plugin makes the iOS App Crash if there is no Internet Connection

AppSpector Integration with iOS Crashes when User opens the App in Offline Mode:

appspector: ^0.6.0

appspector:
    dependency: "direct main"
    description:
      name: appspector
      url: "https://pub.dartlang.org"
    source: hosted
    version: "0.6.0"

Crash Logs:

(
	0   CoreFoundation                      0x0000000187c0c314 AF42303F-57B6-3C11-8F18-8E80ABF7D886 + 1254164
	1   libobjc.A.dylib                     0x0000000187920c1c objc_exception_throw + 60
	2   CoreFoundation                      0x0000000187b0aa90 AF42303F-57B6-3C11-8F18-8E80ABF7D886 + 199312
	3   CoreFoundation                      0x0000000187c10a60 AF42303F-57B6-3C11-8F18-8E80ABF7D886 + 1272416
	4   CoreFoundation                      0x0000000187c12d60 _CF_forwarding_prep_0 + 96
	5   appspector                          0x0000000104422284 -[ASPluginEventsHandler handleResponseCall:result:] + 228
	6   appspector                          0x0000000104421d80 -[ASPluginEventsHandler handleMethodCall:result:] + 560
	7   Flutter                             0x0000000104fff468 __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 116
	8   Flutter                             0x00000001047e13b0 _ZN7flutter15PlatformViewIOS21HandlePlatformMessageEN3fml6RefPtrINS_15PlatformMessageEEE + 504
	9   Flutter                             0x0000000104acfff0 _ZNSt3__110__function6__funcIZN7flutter5Shell29OnEngineHandlePlatformMessageEN3fml6RefPtrINS2_15PlatformMessageEEEE4$_34NS_9allocatorIS8_EEFvvEEclEv + 108
	10  Flutter                             0x0000000104a6f798 _ZN3fml15MessageLoopImpl10FlushTasksENS_9FlushTypeE + 1472
	11  Flutter                             0x0000000104a71db8 _ZN3fml17MessageLoopDarwin11OnTimerFireEP16__CFRunLoopTimerPS0_ + 32
	12  CoreFoundation                      0x0000000187b88190 AF42303F-57B6-3C11-8F18-8E80ABF7D886 + 713104
	13  CoreFoundation                      0x0000000187b87ea8 AF42303F-57B6-3C11-8F18-8E80ABF7D886 + 712360
	14  CoreFoundation                      0x0000000187b8751c AF42303F-57B6-3C11-8F18-8E80ABF7D886 + 709916
	15  CoreFoundation                      0x0000000187b82274 AF42303F-57B6-3C11-8F18-8E80ABF7D886 + 688756
	16  CoreFoundation                      0x0000000187b818f4 CFRunLoopRunSpecific + 480
	17  GraphicsServices                    0x0000000191f98604 GSEventRunModal + 164
	18  UIKitCore                           0x000000018bd55358 UIApplicationMain + 1944
	19  Runner                              0x0000000102d82020 main + 88
	20  libdyld.dylib                       0x00000001879fd2dc E5E56A85-E4D6-332E-9F32-FED4B986AFE0 + 4828
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00000001879f2df0 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`__pthread_kill:
->  0x1879f2df0 <+8>:  b.lo   0x1879f2e0c               ; <+36>
    0x1879f2df4 <+12>: stp    x29, x30, [sp, #-0x10]!
    0x1879f2df8 <+16>: mov    x29, sp
    0x1879f2dfc <+20>: bl     0x1879d10e8               ; cerror_nocancel
Target 0: (Runner) stopped.```

error while running the application

warning: unknown enum constant Include.NON_EMPTY
reason: class file for com.fasterxml.jackson.annotation.JsonInclude$Include not found
warning: unknown enum constant Include.NON_EMPTY
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 warnings
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:checkDebugDuplicateClasses'.

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.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.internal.jdk7.JDK7PlatformImplementations found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) 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.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) 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.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.io.path.ExperimentalPathApi found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) 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.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) 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.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) 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.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) 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.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) 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.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk7-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10)
Duplicate class kotlin.random.jdk8.PlatformThreadLocalRandom found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.streams.jdk8.StreamsKt found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$1 found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$2 found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$3 found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$4 found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.text.jdk8.RegexExtensionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.time.jdk8.DurationConversionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)

 Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
  • Try:

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 3s
Exception: Gradle task assembleDebug failed with exit code 1

Enable custom user agent string in header

Is it possible to set a custom user agent in header after Appspector is inited?

Currently I am setting my own user agent string with

IOClient(HttpClient()..userAgent = '$kAppName/$kAppBuild')

But after

AppSpectorPlugin.run(config);

My user agent string is overwritten with the default one: Dart/2.14 (dart:io)

The list of Monitors is set as:

config.monitors = <Monitor>[Monitors.logs, Monitors.http];

Build failed

AppSpector works fine on flutter debug mode. But when I try generate app build, it break. With error message:

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':generateReleaseRFile'.
> Could not resolve all files for configuration ':releaseCompileClasspath'.
   > Could not find androidx.annotation:annotation:1.1.0.
     Required by:
         project :

* Try:
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.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':javaPreCompileRelease'.
> Could not resolve all files for configuration ':releaseCompileClasspath'.
   > Could not find androidx.annotation:annotation:1.1.0.
     Required by:
         project :

* Try:
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.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 21s

My Flutter doctor result is:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.14.6 18G87, locale pt-BR)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Android Studio (version 3.6)
[✓] VS Code (version 1.42.1)



neton-alpha:milks_camp oaugustus$ 
[✓] Connected device (1 available)

• No issues found!

HTTP Error 411. The request must be chunked or have a content length

I've confirmed this is an issue with the appspector plugin. If I include the plugin all json requests that have a payload (ie post) throw this error:

HTTP Error 411. The request must be chunked or have a content length.

Removing the plugin and it works correctly.

I am using this library which is just a wrapper on the standard http client.

Support Add2App Integration

Hello we have native app with flutter app as module and want to implement appspector but it seems not supported yet. Can this plugin also support add2app(https://flutter.dev/docs/development/add-to-app)?

The plugin appspector is built using an older version of the Android plugin API which assumes that it's running in a full-Flutter environment. It may have undefined behaviors when Flutter
is integrated into an existing app as a module.
The plugin can be updated to the v2 Android Plugin APIs by following https://flutter.dev/go/android-plugin-migration.

Crash on Android

Hi, I have some weird crash on Android.
I initially tested on my Flutter app, then I tested on the default example Flutter app .
This is the output is the same for both apps.

When I launch the app:

E/flutter (11976): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Null check operator used on a null value
E/flutter (11976): #0      MethodChannel.binaryMessenger (package:flutter/src/services/platform_channel.dart:121:86)
E/flutter (11976): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:146:36)
E/flutter (11976): #2      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:329:12)
E/flutter (11976): #3      AppSpectorPlugin.isStarted (package:appspector/src/appspector_plugin.dart:138:16)
E/flutter (11976): #4      AppSpectorPlugin.run (package:appspector/src/appspector_plugin.dart:114:44)
E/flutter (11976): #5      runAppSpector (package:appspectorproject/main.dart:17:20)
E/flutter (11976): #6      main (package:appspectorproject/main.dart:5:3)
E/flutter (11976): #7      _runMainZoned.<anonymous closure>.<anonymous closure> (dart:ui/hooks.dart:145:25)
E/flutter (11976): #8      _rootRun (dart:async/zone.dart:1428:13)
E/flutter (11976): #9      _CustomZone.run (dart:async/zone.dart:1328:19)
E/flutter (11976): #10     _runZoned (dart:async/zone.dart:1863:10)
E/flutter (11976): #11     runZonedGuarded (dart:async/zone.dart:1851:12)
E/flutter (11976): #12     _runMainZoned.<anonymous closure> (dart:ui/hooks.dart:141:5)
E/flutter (11976): #13     _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:283:19)
E/flutter (11976): #14     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)

Side notes
I am registered on AppSpector.
I created two projects (iOS and Android) in it.
My Flutter version: 2.5.1
My Dart SDK version: 2.14.2

I followed the instructions that I found on pub.dev for your plugin so:

  • added the dependency on pubspec.yaml
  appspector: '0.8.1'
  • initialized the plugin in main.dart
  runAppSpector();
  runApp(const MyApp());
}

void runAppSpector() {
  final config = Config()
    ..iosApiKey = "my API key for ios"
    ..androidApiKey = "my API key for android ";
  
  config.monitors = [Monitors.http, Monitors.logs, Monitors.screenshot];

  AppSpectorPlugin.run(config);
}

Can you help?
Thanks a lot!

The non-abstract class 'HttpRequestWrapper' is missing implementations for these members: - HttpClientRequest.abort

I found this one error for appspector: ^0.3.0 during assembly of my project.

../../flutter/.pub-cache/hosted/pub.dartlang.org/appspector-0.3.0/lib/src/http/request_wrapper.dart:8:7: Error: The non-abstract class 'HttpRequestWrapper' is missing implementations for these members:
 - HttpClientRequest.abort
Try to either
 - provide an implementation,
 - inherit an implementation from a superclass or mixin,
 - mark the class as abstract, or
 - provide a 'noSuchMethod' implementation.

class HttpRequestWrapper extends HttpClientRequest {
      ^^^^^^^^^^^^^^^^^^
org-dartlang-sdk:///third_party/dart/sdk/lib/_http/http.dart:2045:8: Context: 'HttpClientRequest.abort' is defined here.
  void abort([Object? exception, StackTrace? stackTrace]);
       ^^^^^


FAILURE: Build failed with an exception.

flutter --version

Flutter 1.21.0-10.0.pre.139 • channel master • https://github.com/flutter/flutter.git
Framework • revision a51dc3d913 (8 days ago) • 2020-08-18 02:51:02 -0400
Engine • revision 0b330467da
Tools • Dart 2.10.0 (build 2.10.0-38.0.dev)

Deprecation notice after upgrading to Flutter 2.5

The plugin `appspector` uses a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.