Code Monkey home page Code Monkey logo

androidpluto / pluto Goto Github PK

View Code? Open in Web Editor NEW
637.0 637.0 62.0 1.53 MB

Android Pluto is a on-device debugging framework for Android applications, which helps intercept Network calls, capture Crashes & ANRs, manipulate application data on-the-go, and much more.

Home Page: https://androidpluto.com

License: Apache License 2.0

Kotlin 99.91% Shell 0.09%
android android-debug-tools android-development android-library android-sdk datastore-preferences http-requests java kotlin kotlin-library layout-builder layoutmanager mocklets okhttp-interceptor okhttp3 okhttpclient pluto pluto-debugger room-database shared-preferences

pluto's People

Contributors

aasthajn avatar artemyto avatar epicadk avatar govinddixit avatar hibob224 avatar ishaangarg avatar mocklets-tech avatar mukeshsolanki avatar nikcapko avatar piyush7890 avatar rishabhsinghbisht avatar shridhargoel avatar shurikus57 avatar srtvprateek avatar tpakis 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  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

pluto's Issues

Spaces getting removed from curl request

When we share the curl request from Network call detail page, then all the spaces re getting removed from the curl request,

To Reproduce
Steps to reproduce the behavior:

  1. Go to pluto network calls log page
  2. Click on any api request
  3. On the app call detail page click on copy curl and paste it somewhere
  4. The request body in the curl request doesn't have any spaces in it.

Expected behavior
Spaced shouldn't get removed from the string part of the json.

use kotlin-parcelize instead of kotlin-extensions

Describe the bug
kotlin-extensions are obsolete, just remove it and use id:kotlin-parcelize

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Library Version [e.g. 22]

Additional context
Add any other context about the problem here.

Project uses v4 code, forcing to use Jetifier

Describe the bug
Issue might not be noticed as android.enableJetifier=true is the default setting but in a project where all 3rd party libs were up to date android.enableJetifier=false will make the compile faster

To Reproduce
Steps to reproduce the behavior:
In gradle.properities change
android.enableJetifier=true
to
android.enableJetifier=false
run/compile project

Execution failed for task ':app:checkAcceptanceSignedDuplicateClasses'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.IResultReceiver found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0)

Expected behavior
Project compiles because most libs still in use migrated to AndroidX by now

Please define @JvmStatic for log functions

Is your feature request related to a problem? Please describe.
The library does not support java calls, please add @JvmStatic annotations

Describe the solution you'd like
@JvmStatic
fun e(tr: Throwable?) {
e(tr?.message ?: "", tr)
}

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.

The call can be simplified same behavior as Timber have, no tag string is needed or can be optional

Is your feature request related to a problem? Please describe.
Love the Timber calls that does not need a tag string, also missing calls for exceptions only.

Describe the solution you'd like
For exceptions:
@JvmStatic
fun e(tr: Throwable?) {
e(tr?.message ?: "", tr)
}
Where to get tags:
From stacktrace, something like:
val tag = Thread.currentThread().stackTrace.let {
if (it.size > 3) it[3] else null
}.let {
it?.className?.lastPart(".") ?: this::class.simpleName ?: ""
}
fun String.lastPart(s: String): String = if (this.contains(s)) this.split(s).last() else this

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.

Android TV support?

Does this lib support Android TV?

Tested the lib on simulator for apis 28 30 and 31, I see from the logs that activity_tracker is working fine and traking the lifecycles fine.
ANR and logging events are also working fine.
Toast message also shows saying that pluto has been initialized successfully.

But for some reason, no Pluto notification has been generated, so I am unable to launch the underlying Pluto views.

Also, Is there any other way that Pluto can be launched (as an alternative) other than from the notification?

Missing version - pluto-no-op 2.0.0

If I'm looking correctly, there is no 2.0.0 no-op version released on maven central. The latest is 1.1.3-alpha
https://search.maven.org/search?q=g:com.plutolib%20AND%20a:pluto-no-op

Also no-op version is not mentioned in readme and only debugImplementation dependency is mentioned.

Please align no-op version with newest release and add info to readme like

debugImplementation "com.plutolib:pluto:${rootProject.ext.plutoVersion}"
rcImplementation "com.plutolib:pluto-no-op:${rootProject.ext.plutoVersion}"
releaseImplementation "com.plutolib:pluto-no-op:${rootProject.ext.plutoVersion}"

This is also valid for all current plugins which is missing no-op version completely. I didn't duplicate this issue for each plugin.

Thank you

Build issues because of duplicate attribute corner_radius

Describe the bug
Build issues because of duplicate attribute.
AAPT: error: duplicate value for resource 'attr/corner_radius' with config ''

https://github.com/mocklets/pluto/blob/445ad948e282a2054044056bf9a26c15b0820b82/pluto/src/main/res/values/attr.xml#L5

Can we append resource prefix here also to not use a common name which might conflict with some other library in big projects?

To Reproduce
Steps to reproduce the behavior:

  1. Add implementation 'com.crystal:crystalrangeseekbar:1.1.3' library (Just to replicate the conflict)
  2. Build.

Expected behavior
There should be no AAPT error and project should build without any issue.

Build Environment:

  • Library Version : All versions

Local Database Viewer

Is your feature request related to a problem? Please describe.

It's not related to a problem, but i find it quite useful in the future.

Describe the solution you'd like

So the current version have the ability to look keys and values of SharedPreference. And I think Local Database Inspector would be a great addition. Furthermore, the ability to update values to the database is good too.

Describe alternatives you've considered

For alternative, i think just able to see the local database from the device would be helpful.

Additional context

So actually i'm stumble upon this library and i think it would be really to good to combine it here.

Task :app:mergeDebugResources FAILED

Describe the bug
Build getting failed with Task :app:mergeDebugResources FAILED error

To Reproduce
Steps to reproduce the behavior:

  1. follow the startup guide
  2. Add dependency
  3. Build project
  4. See build error

Screenshots
https://imgur.com/a/iMkysPE

Full error logs
`> Task :app:mergeDebugResources
/home/dalakoti07/.gradle/caches/transforms-3/ac13ed731ff91608bb885e6070e58d98/transformed/preference-1.1.1/res/values/values.xml:424:4: Duplicate value for resource 'attr/min' with config 'DEFAULT' and product ''. Resource was previously defined here: /home/dalakoti07/AndroidStudioProjects/consumer/commons/ui/build/intermediates/packaged_res/debug/values/values.xml:1749:4: .

Task :app:mergeDebugResources FAILED
Execution failed for task ':app:mergeDebugResources'.
A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
Resource compilation failed. Check logs for details.

`

Please use synchronization in LogsRepo.

Describe the bug
ConcurrentException happen in LogsRepo.

Use synchronization on list to avoid it.

Example:
fun save(level: Level, tag: String, message: String?, tr: Throwable?, ele: StackTraceElement) {
synchronized(logsList) {
logsList.add(0, LogData(level, tag, message ?: "", tr, ele))
val temp = logsList.take(MAX_LIMIT)
logsList.clear()
logsList.addAll(temp)
logs.postValue(logsList)
}
}

Catch Memory Leaks

Is your feature request related to a problem? Please describe.
Pluto should be able to capture memory leaks also, thus becoming a superset of Leak Canary.

For Context: We are using leak canary but we like your library and so was thinking to use this for debugging from now on. But, we are also using Leak canary and if Pluto could include the feature provided by Leak Canary (capture memory leaks), we could simply replace it with Pluto.

In addition, as somebody has already raised an issue, if we can add database inspector also in the Pluto, that would be awesome.
Something similar to this https://github.com/amitshekhariitbhu/Android-Debug-Database

Improve pluto response search

Pluto search just highlights the response, for long responses it's very hard to find what I'm searching. It would be perfect to have option to scroll to next found match (like Gander does it)

FileProvider - conflict

Describe the bug
Can't build application when using own FileProvider.

To Reproduce
Steps to reproduce the behavior:

Have your own FileProvider in your AndroidManifest.xml

    <provider
        android:name="androidx.core.content.FileProvider"
        android:authorities="${applicationId}.fileProvider"
        android:exported="false"
        android:grantUriPermissions="true">
        <meta-data
            android:name="android.support.FILE_PROVIDER_PATHS"
            android:resource="@xml/provider_paths" />
    </provider>

When building application you get error message:

C:\Android\project\src\debug\AndroidManifest.xml:14:13-64 Error:
Attribute provider#androidx.core.content.FileProvider@authorities value=(com.your.app.debug.fileProvider) from [:moduleName] AndroidManifest.xml:14:13-64
is also present at [com.mocklets:pluto:1.0.5] AndroidManifest.xml:21:13-68 value=(pluto___com.your.app.debug.provider).
Suggestion: add 'tools:replace="android:authorities"' to element at AndroidManifest.xml:12:9-20:20 to override.
C:\Android\project\src\debug\AndroidManifest.xml:19:17-55 Error:
Attribute meta-data#android.support.FILE_PROVIDER_PATHS@resource value=(@xml/provider_paths) from [:moduleName] AndroidManifest.xml:19:17-55
is also present at [com.mocklets:pluto:1.0.5] AndroidManifest.xml:26:17-68 value=(@xml/pluto___file_provider_paths).
Suggestion: add 'tools:replace="android:resource"' to element at AndroidManifest.xml to override.

Expected behavior
Application can be build using own FileProvider without conflict.

Additional context
Gradle 7.1.1
AGP 7.0.0

explore DataStore Preferences

Is your feature request related to a problem? Please describe.

  • Support DataStore preferences along the SharedPreferences

discussion reference : #10

Activate and deactivate the debugging (and notification) on demand

I'd like to programmatically (de)activate the debugging (and notification), for example by turning a switch "debug mode" in settings.

As there is a method Pluto.initialize(context), it could be a Pluto.terminate(context) one. Personally, I prefer the "start/stop" tuple but whatever.

Maybe it could be painful for the related classes (OkHttp's interceptor, ANRListener), to stop the debugging. What about an event mechanism?

memory leak

┬───
│ GC Root: Input or output parameters in native code

├─ android.os.MessageQueue instance
│ Leaking: NO (MessageQueue#mQuitting is false)
│ HandlerThread: "main"
│ ↓ MessageQueue.mMessages
│ ~~~~~~~~~
├─ android.os.Message instance
│ Leaking: UNKNOWN
│ Retaining 702.5 kB in 11971 objects
│ Message.what = 0
│ Message.when = 769228675 (2324 ms after heap dump)
│ Message.obj = null
│ Message.callback = instance @318226192 of androidx.viewpager2.adapter.FragmentStateAdapter$4
│ ↓ Message.callback
│ ~~~~~~~~
├─ androidx.viewpager2.adapter.FragmentStateAdapter$4 instance
│ Leaking: UNKNOWN
│ Retaining 702.4 kB in 11969 objects
│ Anonymous class implementing java.lang.Runnable
│ ↓ FragmentStateAdapter$4.this$0
│ ~~~~~~
├─ com.pluto.plugins.network.internal.interceptor.ui.details.DetailsPagerAdapter instance
│ Leaking: UNKNOWN
│ Retaining 702.4 kB in 11968 objects
│ ↓ FragmentStateAdapter.mFragmentMaxLifecycleEnforcer
│ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
├─ androidx.viewpager2.adapter.FragmentStateAdapter$FragmentMaxLifecycleEnforcer instance
│ Leaking: UNKNOWN
│ Retaining 52 B in 2 objects
│ ↓ FragmentStateAdapter$FragmentMaxLifecycleEnforcer.mViewPager
│ ~~~~~~~~~~
├─ androidx.viewpager2.widget.ViewPager2 instance
│ Leaking: UNKNOWN
│ Retaining 5.9 kB in 156 objects
│ View not part of a window view hierarchy
│ View.mAttachInfo is null (view detached)
│ View.mID = R.id.viewPager
│ View.mWindowAttachCount = 1
│ mContext instance of com.pluto.ui.PlutoActivity with mDestroyed = false
│ ↓ View.mParent
│ ~~~~~~~
╰→ androidx.coordinatorlayout.widget.CoordinatorLayout instance
​ Leaking: YES (ObjectWatcher was watching this because com.pluto.plugins.network.internal.interceptor.ui.
​ DetailsFragment received Fragment#onDestroyView() callback (references to its views should be cleared to prevent
​ leaks))
​ Retaining 3.3 kB in 91 objects
​ key = 3253d9dc-f567-4382-aed9-d48de289d7ee
​ watchDurationMillis = 6785
​ retainedDurationMillis = 1784
​ View not part of a window view hierarchy
​ View.mAttachInfo is null (view detached)
​ View.mWindowAttachCount = 1
​ mContext instance of com.pluto.ui.PlutoActivity with mDestroyed = false

METADATA

Build.VERSION.SDK_INT: 30
Build.MANUFACTURER: samsung
LeakCanary version: 2.7
App process name: com.network.demo
Stats: LruCache[maxSize=3000,hits=4909,misses=119772,hitRate=3%]
RandomAccess[bytes=5720210,reads=119772,travel=71213401277,range=37701777,size=48734451]
Heap dump reason: 5 retained objects, app is visible
Analysis duration: 11994 ms

Share option for cURL

Is your feature request related to a problem? Please describe.

  • cURL request can only be copied, need option to share it as text/file also

AndroidX support

Is your feature request related to a problem? Please describe.
Applications using this library needs to have dependency on deprecated com.android.support library and also be using enableJetifier=true instead of false if they already migrated. This is slowing for example builds and forcing apps to be using non AndroidX libraries.

Describe the solution you'd like
Delete or replace deprecated dependency
android.arch.lifecycle:extensions
with not deprecated variant. See
https://developer.android.com/reference/android/arch/lifecycle/package-summary

Additional context
https://developer.android.com/jetpack/androidx/migrate

This should be quite simple approach.

Test it building your library with
enableJetifier=false
android.useAndroidX=true
in your gradle.properties.

Describe alternatives you've considered
Trying to exclude group: 'com.android.support' but with runtime crash so it's not possible.

Additional context
Error during gradle build when not using Jetifier is
Could not find com.android.support:support-fragment:26.1.0. Required by: project :projectName > project :moduleName > com.mocklets:pluto:1.0.5 > android.arch.lifecycle:extensions:1.1.1

use navigation+koin+jetpack and click "Logger,Crashes&ANRs,SP"

com.creative.recure

Product: US716I
CPU_ABI: ["arm64-v8a","armeabi-v7a","armeabi"]
TAGS: test-keys
VERSION_CODES.BASE: 1
MODEL: US716I
SDK: 28
VERSION.RELEASE: 9
DEVICE: US716I
DISPLAY: UF282.P0.V10.1.RC-V20.8768T.M64
BRAND: US716I
BOARD: US716I
FINGERPRINT: alps/full_tb8768p1_64_bsp_m8/tb8768p1_64_bsp_m8:9/PPR1.180610.011/psg03011058:userdebug/test-keys
ID: PPR1.180610.011
MANUFACTURER: mid
USER: psg
java.lang.RuntimeException: Cannot create an instance of class a.a.a.c.c.f.j
at androidx.lifecycle.ViewModelProvider$AndroidViewModelFactory.create(ViewModelProvider.java:275)
at androidx.lifecycle.SavedStateViewModelFactory.create(SavedStateViewModelFactory.java:112)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:185)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:150)
at androidx.lifecycle.ViewModelLazy.getValue(ViewModelProvider.kt:54)
at androidx.lifecycle.ViewModelLazy.getValue(ViewModelProvider.kt:41)
at a.a.a.c.c.f.d.c(Unknown Source:2)
at a.a.a.c.c.f.d.onCreate(Unknown Source:3)
at androidx.fragment.app.Fragment.performCreate(Fragment.java:2949)
at androidx.fragment.app.FragmentStateManager.create(FragmentStateManager.java:475)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:278)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2189)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2100)
at androidx.fragment.app.FragmentManager.execSingleAction(FragmentManager.java:1971)
at androidx.fragment.app.BackStackRecord.commitNow(BackStackRecord.java:305)
at androidx.viewpager2.adapter.FragmentStateAdapter.placeFragmentInViewHolder(FragmentStateAdapter.java:353)
at androidx.viewpager2.adapter.FragmentStateAdapter.onViewAttachedToWindow(FragmentStateAdapter.java:284)
at androidx.viewpager2.adapter.FragmentStateAdapter.onViewAttachedToWindow(FragmentStateAdapter.java:72)
at androidx.recyclerview.widget.RecyclerView.dispatchChildAttached(RecyclerView.java:7867)
at androidx.recyclerview.widget.RecyclerView$5.addView(RecyclerView.java:893)
at androidx.recyclerview.widget.ChildHelper.addView(ChildHelper.java:107)
at androidx.recyclerview.widget.RecyclerView$LayoutManager.addViewInt(RecyclerView.java:8902)
at androidx.recyclerview.widget.RecyclerView$LayoutManager.addView(RecyclerView.java:8860)
at androidx.recyclerview.widget.RecyclerView$LayoutManager.addView(RecyclerView.java:8848)
at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1645)
at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1591)
at androidx.recyclerview.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java:1395)
at androidx.recyclerview.widget.LinearLayoutManager.scrollHorizontallyBy(LinearLayoutManager.java:1124)
at androidx.recyclerview.widget.RecyclerView.scrollStep(RecyclerView.java:1969)
at androidx.recyclerview.widget.RecyclerView$SmoothScroller.onAnimation(RecyclerView.java:12316)
at androidx.recyclerview.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:5564)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:953)
at android.view.Choreographer.doCallbacks(Choreographer.java:765)
at android.view.Choreographer.doFrame(Choreographer.java:694)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:939)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6702)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at androidx.lifecycle.ViewModelProvider$AndroidViewModelFactory.create(ViewModelProvider.java:267)
... 41 more
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object reference
at android.content.ContextWrapper.getApplicationContext(ContextWrapper.java:116)
at a.a.a.c.c.f.j.(Unknown Source:8)
... 44 more
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at androidx.lifecycle.ViewModelProvider$AndroidViewModelFactory.create(ViewModelProvider.java:267)
at androidx.lifecycle.SavedStateViewModelFactory.create(SavedStateViewModelFactory.java:112)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:185)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:150)
at androidx.lifecycle.ViewModelLazy.getValue(ViewModelProvider.kt:54)
at androidx.lifecycle.ViewModelLazy.getValue(ViewModelProvider.kt:41)
at a.a.a.c.c.f.d.c(Unknown Source:2)
at a.a.a.c.c.f.d.onCreate(Unknown Source:3)
at androidx.fragment.app.Fragment.performCreate(Fragment.java:2949)
at androidx.fragment.app.FragmentStateManager.create(FragmentStateManager.java:475)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:278)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2189)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2100)
at androidx.fragment.app.FragmentManager.execSingleAction(FragmentManager.java:1971)
at androidx.fragment.app.BackStackRecord.commitNow(BackStackRecord.java:305)
at androidx.viewpager2.adapter.FragmentStateAdapter.placeFragmentInViewHolder(FragmentStateAdapter.java:353)
at androidx.viewpager2.adapter.FragmentStateAdapter.onViewAttachedToWindow(FragmentStateAdapter.java:284)
at androidx.viewpager2.adapter.FragmentStateAdapter.onViewAttachedToWindow(FragmentStateAdapter.java:72)
at androidx.recyclerview.widget.RecyclerView.dispatchChildAttached(RecyclerView.java:7867)
at androidx.recyclerview.widget.RecyclerView$5.addView(RecyclerView.java:893)
at androidx.recyclerview.widget.ChildHelper.addView(ChildHelper.java:107)
at androidx.recyclerview.widget.RecyclerView$LayoutManager.addViewInt(RecyclerView.java:8902)
at androidx.recyclerview.widget.RecyclerView$LayoutManager.addView(RecyclerView.java:8860)
at androidx.recyclerview.widget.RecyclerView$LayoutManager.addView(RecyclerView.java:8848)
at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1645)
at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1591)
at androidx.recyclerview.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java:1395)
at androidx.recyclerview.widget.LinearLayoutManager.scrollHorizontallyBy(LinearLayoutManager.java:1124)
at androidx.recyclerview.widget.RecyclerView.scrollStep(RecyclerView.java:1969)
at androidx.recyclerview.widget.RecyclerView$SmoothScroller.onAnimation(RecyclerView.java:12316)
at androidx.recyclerview.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:5564)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:953)
at android.view.Choreographer.doCallbacks(Choreographer.java:765)
at android.view.Choreographer.doFrame(Choreographer.java:694)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:939)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6702)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object reference
at android.content.ContextWrapper.getApplicationContext(ContextWrapper.java:116)
at a.a.a.c.c.f.j.(Unknown Source:8)
... 44 more
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object reference
at android.content.ContextWrapper.getApplicationContext(ContextWrapper.java:116)
at a.a.a.c.c.f.j.(Unknown Source:8)
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at androidx.lifecycle.ViewModelProvider$AndroidViewModelFactory.create(ViewModelProvider.java:267)
at androidx.lifecycle.SavedStateViewModelFactory.create(SavedStateViewModelFactory.java:112)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:185)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:150)
at androidx.lifecycle.ViewModelLazy.getValue(ViewModelProvider.kt:54)
at androidx.lifecycle.ViewModelLazy.getValue(ViewModelProvider.kt:41)
at a.a.a.c.c.f.d.c(Unknown Source:2)
at a.a.a.c.c.f.d.onCreate(Unknown Source:3)
at androidx.fragment.app.Fragment.performCreate(Fragment.java:2949)
at androidx.fragment.app.FragmentStateManager.create(FragmentStateManager.java:475)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:278)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2189)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2100)
at androidx.fragment.app.FragmentManager.execSingleAction(FragmentManager.java:1971)
at androidx.fragment.app.BackStackRecord.commitNow(BackStackRecord.java:305)
at androidx.viewpager2.adapter.FragmentStateAdapter.placeFragmentInViewHolder(FragmentStateAdapter.java:353)
at androidx.viewpager2.adapter.FragmentStateAdapter.onViewAttachedToWindow(FragmentStateAdapter.java:284)
at androidx.viewpager2.adapter.FragmentStateAdapter.onViewAttachedToWindow(FragmentStateAdapter.java:72)
at androidx.recyclerview.widget.RecyclerView.dispatchChildAttached(RecyclerView.java:7867)
at androidx.recyclerview.widget.RecyclerView$5.addView(RecyclerView.java:893)
at androidx.recyclerview.widget.ChildHelper.addView(ChildHelper.java:107)
at androidx.recyclerview.widget.RecyclerView$LayoutManager.addViewInt(RecyclerView.java:8902)
at androidx.recyclerview.widget.RecyclerView$LayoutManager.addView(RecyclerView.java:8860)
at androidx.recyclerview.widget.RecyclerView$LayoutManager.addView(RecyclerView.java:8848)
at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1645)
at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1591)
at androidx.recyclerview.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java:1395)
at androidx.recyclerview.widget.LinearLayoutManager.scrollHorizontallyBy(LinearLayoutManager.java:1124)
at androidx.recyclerview.widget.RecyclerView.scrollStep(RecyclerView.java:1969)
at androidx.recyclerview.widget.RecyclerView$SmoothScroller.onAnimation(RecyclerView.java:12316)
at androidx.recyclerview.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:5564)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:953)
at android.view.Choreographer.doCallbacks(Choreographer.java:765)
at android.view.Choreographer.doFrame(Choreographer.java:694)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:939)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6702)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)

Logger - share option

Is your feature request related to a problem? Please describe.
I have in code for example this log:
PlutoLog.e("Flow.catchAndPrint", it.message, it)
but in Pluto Viewer there is no share option for this.
image

For ANR and Crash there is this option.
image

Describe the solution you'd like
Add similar option for sharing logger info. For example only for Throwable / Stacktrace.

Describe alternatives you've considered
Copy the whole text with long press and using OS Copy feature.

Possibility to disable isRooted checks

Currently when a device is not rooted RootUtil.checkRootMethod3() is logging an error Cannot run program "/system/xbin/which": error=2, No such file or directory
I am not sure if this log can be avoided. Maybe https://github.com/scottyab/rootbeer can help here. For us the info if a device is rooted or not is not so important and we would like to disable the root check. The crash logs could show rooted = unknown in this case.

Parsing/prettifying response is on main thread

Describe the bug
If response json is too big (confirmed with 315 kB) then app gets stuck.

To Reproduce
Steps to reproduce the behavior:

  1. Call API with enormous response
  2. Open pluto
  3. Open the endpoint detail
  4. Switch to response tab
  5. Move around/try to scroll
  6. See error

Expected behavior
Response should be parsed much faster or with loading. Definitely not on main thread though.

Smartphone (please complete the following information):

  • Device: Pixel 5
  • OS: Android 11
  • Library Version 1.0.7

PendingIntents changes in Android 12

Describe the bug
According to Google's changes we must specify the mutability of each PendingIntent object. Please add flags to SetupNotification.kt line 21 and CrashNotification.kt line 21 as well.

To Reproduce
Steps to reproduce the behavior:

  1. set compileSdkVersion and targetSdkVersion in application to 31
  2. set buildToolsVersion to 31.0.0
  3. initialize Pluto
  4. generate crash or ANR to trigger notification creation

Expected behavior
No error about mutability of PendingIntent should be in Logcat

Duplicate value for Resource

Describe the bug

After adding the library to build.gradle every time i build, there's error claiming duplicate values for defaultValues

* What went wrong:
Execution failed for task ':app:mergeDevDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource compilation failed
     C:\Users\User\.gradle\caches\transforms-2\files-2.1\e013974637a7524419b1493618a99d2d\preference-1.1.1\res\values\values.xml:257:5-336:25: AAPT: error: duplicate value for resource 'attr/defaultValue' with config ''.
         
     C:\Users\User\.gradle\caches\transforms-2\files-2.1\e013974637a7524419b1493618a99d2d\preference-1.1.1\res\values\values.xml:257:5-336:25: AAPT: error: resource previously defined here.
         
     D:\#KERJAAN\useetvgo\app\build\intermediates\incremental\mergeDevDebugResources\merged.dir\values\values.xml: AAPT: error: file failed to compile.

To Reproduce

  • Add libray to build.gradle
  • Configure the library as intended
  • Build application
  • Build failed with error

Expected behavior

The app build successfully

Screenshots

image

Smartphone (please complete the following information):

  • Library Version 1.1.1

Additional context

My guess is there's duplicate variable name in my project, that used in this library. the defaultValues variable i used in my project is from this library

use AppStartup library instead of no-op

Is your feature request related to a problem? Please describe.
currently, we have to add two dependencies, one for debug and one for release.

Describe the solution you'd like
AppStartup library instead initialises the library using ContentProvider.
https://developer.android.com/topic/libraries/app-startup

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.

Response Body shows - " ~ Binary Data " in Pluto

No Response Body info in pluto for some apis while it works for apis we're calling through Retrofit

To Reproduce
Steps to reproduce the behavior:

the code for making the call is this(I have added PlutoInterceptor in the okhttp client's code):

public static String makeRequest(Request request) throws IOException, HttpException, JSONException, NoNetworkException
  {
      if (NetworkUtils.isNetworkAvailable(BaseApp.getContext()))
      {
          return doRequest(request);
      } else
      {
          throw new NoNetworkException(BaseApp.getContext().getResources().getString(R.string.no_network_message));
      }
  }

  private static String doRequest(Request request) throws IOException, HttpException, JSONException
  {
      OkHttpClient httpClient = Factory.getOkHTTPClient();
      Response response = httpClient.newCall(request).execute();
      String body = response.body().string();
  }

Expected behavior
Screenshot_2021-09-20-17-32-51-216_com aranoah healthkart plus

Screenshots
Screenshot_2021-09-20-17-32-40-945_com aranoah healthkart plus

Smartphone (please complete the following information):

  • Device: Xiaomi
  • Library Version 1.0.1

Additional context
It shows the response data for call made through Retrofit

fun getRetrofitInstance(type: Type, typeAdapter: Any): Retrofit {

            return Retrofit.Builder()
                    .baseUrl(HkpApi.RETROFIT_SERVER_BASE_URL)
                    .addCallAdapterFactory(RxErrorHandlingCallAdapterFactory.create())
                    .addConverterFactory(gsonConverterForCustomDeserializer(type, typeAdapter)!!)
                    .client(getOkHTTPClient(true))
                    .build()
}

Pluto widget like option

We use your library to monitor the status of requests and responses in our application. But we faced one problem - Pluto's widget leads to conflicts with automation tests of the application on the BrowserStack. It would be nice to add an option that will programmatically disable the use of the widget and Over Other App request, depending on the needs of the developers, leaving access only through the notification panel (as is done in some libraries). Perhaps by using the builder when initializing Pluto, something like -
Pluto.Builder().overOtherAppsOption(false).build().initialize(this)

Sincerely. Yaroslav.

Describe the solution you'd like

using the builder when initializing Pluto ->

Pluto.Builder().overOtherAppsOption(false).build().initialize(context: this)

fun overOtherAppsOption(isEnabled: Boolean = true)
{
if (isEnabled) allowOverOtherAppOption()
}

java.lang.VerifyError on API 19

Describe the bug
In development branch minSdkVersion is 19, but Pluto crashes the application when Pluto.initialize(context) is called. Any older versions(tested with 0.23, 1.0.0, 1.0.2-beta, 1.0.4) that has minSdkVersion < 21 also causes this bug.

Process: com.sampleapp, PID: 6020
    java.lang.VerifyError: com/mocklets/pluto/modules/activities/ActivityTracker$lifecycleCallbacks$1
        at com.mocklets.pluto.modules.activities.ActivityTracker.<init>(ActivityTracker.kt:67)
        at com.mocklets.pluto.Pluto.initialize(Pluto.kt:37)
        at com.sampleapp.SampleApp.onCreate(SampleApp.kt:14)
        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4344)
        at android.app.ActivityThread.access$1500(ActivityThread.java:135)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:136)
        at android.app.ActivityThread.main(ActivityThread.java:5017)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:515)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
        at dalvik.system.NativeStart.main(Native Method)

To Reproduce
Steps to reproduce the behavior:

  1. Set minSdkVersion in sample project to 19
  2. Run the application

Expected behavior
Pluto successfully works on API 19

Smartphone:

  • Android emulator API 19

Header info is not visible in request or curl

Describe the bug
Headers info is not visible in request as well as not getting added in curl request share or file share.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Pluto Network tab'
  2. Click on 'any request'
  3. See 'headers info'

Expected behavior
All headers should be visible on the debugger screen as well as in curl

Smartphone (please complete the following information):

  • Device: Poco X3 Pro
  • OS: Android 11
  • Library Version 1.0.6

read timeout on release build

Describe the bug
I am getting read timeout while building the release apk. My concern is, why it's resolving no-op dependency on release build ?

Version

debugImplementation 'com.mocklets:pluto:1.0.2-beta'
releaseImplementation'com.mocklets:pluto-no-op:1.0.2-beta'

Screenshots

Screen Shot 2021-09-16 at 4 27 01 PM

Stop asking for overlay permission

Is your feature request related to a problem? Please describe.
I have to constantly skip initial screen of asking permission to overlay. I don't want it not once but forever.

Describe the solution you'd like
Ask for the overlay permission only when I want to switch the overlay button on. So yeah, also add such on/off checkbox into settings.

Pluto is crashing when clicking on notification after app has been killed.

Describe the bug
Pluto app is crashing with lateinit property session has not been initialized when clicking on notification after the target app crashed or has been killed. I did not try to reproduce it in a more simple app with different launch mode.

To Reproduce
Steps to reproduce the behavior:

  1. Kill the hosting app
  2. Click on the notification: "Pluto is debugging ..."
  3. See app is crashing

Expected behavior
Pluto notification is dismissed after app is killed/crashed. Alternatively if notification can not be dismissed for technical reasons to show an error message that Pluto session has ended.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: Emulator android 10, Pixel 5 android 12
  • OS: Android 10, Android 12
  • Library Version 1.1.0

Additional context

(LeakCanary) Memory leak

Describe the bug
Leakcanary detected memory leak

To Reproduce
Add leakcanary to the project

Log

│ GC Root: Input or output parameters in native code
│
├─ okio.AsyncTimeout class
│    Leaking: NO (PathClassLoader↓ is not leaking and a class is never leaking)
│    ↓ static AsyncTimeout.$class$classLoader
├─ dalvik.system.PathClassLoader instance
│    Leaking: NO (Pluto↓ is not leaking and A ClassLoader is never leaking)
│    ↓ ClassLoader.runtimeInternalObjects
├─ java.lang.Object[] array
│    Leaking: NO (Pluto↓ is not leaking)
│    ↓ Object[].[807]
├─ com.mocklets.pluto.Pluto class
│    Leaking: NO (a class is never leaking)
│    ↓ static Pluto.activity
│                   ~~~~~~~~
├─ com.mocklets.pluto.modules.activities.ActivityTracker instance
│    Leaking: UNKNOWN
│    Retaining 1.1 MB in 723 objects
│    application instance of in.mohalla.sharechat.MyApplication
│    ↓ ActivityTracker.popup
│                      ~~~~~
├─ com.mocklets.pluto.modules.setup.easyaccess.Popup instance
│    Leaking: UNKNOWN
│    Retaining 1.1 MB in 720 objects
│    context instance of in.mohalla.sharechat.MyApplication
│    ↓ Popup.popupViewManager
│            ~~~~~~~~~~~~~~~~
├─ com.mocklets.pluto.modules.setup.easyaccess.PopupViewManager instance
│    Leaking: UNKNOWN
│    Retaining 1.1 MB in 718 objects
│    context instance of in.mohalla.sharechat.MyApplication
│    ↓ PopupViewManager.view
│                       ~~~~
╰→ androidx.constraintlayout.widget.ConstraintLayout instance
​     Leaking: YES (ObjectWatcher was watching this because androidx.
​     constraintlayout.widget.ConstraintLayout received
​     View#onDetachedFromWindow() callback)
​     Retaining 1.1 MB in 711 objects
​     key = dc066432-940d-464d-802d-da3bfd9393ea
​     watchDurationMillis = 125864
​     retainedDurationMillis = 120862
​     View not part of a window view hierarchy
​     View.mAttachInfo is null (view detached)
​     View.mWindowAttachCount = 1
​     mContext instance of in.mohalla.sharechat.MyApplication
METADATA
Build.VERSION.SDK_INT: 30
Build.MANUFACTURER: OnePlus
LeakCanary version: 2.7
App process name: in.mohalla.sharechat
Stats: LruCache[maxSize=3000,hits=12740,misses=230140,hitRate=5%]
RandomAccess[bytes=12527485,reads=230140,travel=150539792178,range=46265088,size
=61204920]
Heap dump reason: 1 retained objects, app is not visible
Analysis duration: 12743 ms```

Crash on clicking setting icon in Pluto

Describe the bug
App is crashing on clicking setting icon in Pluto.

To Reproduce
Steps to reproduce the behavior:

  1. Opened my app
  2. Opened Pluto
  3. Clicked on the Pluto

Screenshots

20210823_175321.mp4

Smartphone (please complete the following information):

  • Device: Samsung F41
  • OS: Android 11
  • Library Version 1.0.1

Additional context

2021-08-23 17:50:31.989 3262-3262/com.whizdm.moneyview.loans E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.whizdm.moneyview.loans, PID: 3262
    java.lang.NullPointerException: Missing required view with ID: com.whizdm.moneyview.loans:id/checkbox
        at a.a.a.b.a0.a(Unknown Source:54)
        at a.a.a.c.g.j.f.<init>(Unknown Source:23)
        at a.a.a.c.g.a.a(Unknown Source:38)
        at a.a.a.a.j.c.a.onCreateViewHolder(Unknown Source:1)
        at androidx.recyclerview.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:7131)
        at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6260)
        at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6143)
        at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6139)
        at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2314)
        at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1631)
        at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1591)
        at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:668)
        at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4141)
        at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:3853)
        at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4410)
        at android.view.View.layout(View.java:24475)
        at android.view.ViewGroup.layout(ViewGroup.java:7383)
        at androidx.constraintlayout.widget.ConstraintLayout.onLayout(ConstraintLayout.java:1855)
        at android.view.View.layout(View.java:24475)
        at android.view.ViewGroup.layout(ViewGroup.java:7383)
        at com.google.android.material.appbar.HeaderScrollingViewBehavior.layoutChild(HeaderScrollingViewBehavior.java:148)
        at com.google.android.material.appbar.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:43)
        at com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:2003)
        at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:918)
        at android.view.View.layout(View.java:24475)
        at android.view.ViewGroup.layout(ViewGroup.java:7383)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
        at android.view.View.layout(View.java:24475)
        at android.view.ViewGroup.layout(ViewGroup.java:7383)
        at androidx.constraintlayout.widget.ConstraintLayout.onLayout(ConstraintLayout.java:1855)
        at android.view.View.layout(View.java:24475)
        at android.view.ViewGroup.layout(ViewGroup.java:7383)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
        at android.view.View.layout(View.java:24475)
        at android.view.ViewGroup.layout(ViewGroup.java:7383)
        at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
        at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
        at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
        at android.view.View.layout(View.java:24475)
        at android.view.ViewGroup.layout(ViewGroup.java:7383)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
        at com.android.internal.policy.DecorView.onLayout(DecorView.java:1225)
        at android.view.View.layout(View.java:24475)
        at android.view.ViewGroup.layout(ViewGroup.java:7383)
        at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:4260)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3695)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2618)
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9965)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1010)
        at android.view.Choreographer.doCallbacks(Choreographer.java:809)
        at android.view.Choreographer.doFrame(Choreographer.java:744)

Almost whole response is truncated

image

I cannot see the response, for some reason pluto prints it on one line (even if its the long response) and even message is truncated. I'd like to see whole response like Gander can do it

App crashes with java.util.ConcurrentModificationException

Describe the bug
A fantom bug reproduced in 1.0.4 that causes a crash with ConcurrentModificationException.

To Reproduce
Steps to reproduce the behavior:
Causes randomly.

Expected behavior
Application doesn't crashes

Stack trace

java.util.ConcurrentModificationException: null
	 at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:757)
	 at java.util.LinkedHashMap$LinkedValueIterator.next(LinkedHashMap.java:785)
	 at java.util.AbstractCollection.toArray(AbstractCollection.java:141)
	 at java.util.Collections$SynchronizedCollection.toArray(Collections.java:2075)
	 at java.util.ArrayList.<init>(ArrayList.java:191)
	 at com.mocklets.pluto.modules.network.NetworkCallsRepo.updateLiveData(NetworkCallsRepo.kt:27)
	 at com.mocklets.pluto.modules.network.NetworkCallsRepo.set(NetworkCallsRepo.kt:16)
	 at com.mocklets.pluto.PlutoInterceptor.intercept(PlutoInterceptor.kt:43)
	 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
	 at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
	 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
	 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
	 at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
	 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
	 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
	 at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
	 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
	 at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:127)
	 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
	 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
	 at zerobranch.androidremotedebugger.logging.NetLoggingInterceptor.intercept(NetLoggingInterceptor.java:147)
	 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
	 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
	 at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:257)
	 at okhttp3.RealCall$AsyncCall.execute(RealCall.java:201)
	 + 4 more linesThread : OKHTTP DISPATCHER (id : 11078,  priority : Normal,  is_Daemon : false,  state : RUNNABLE)==================APP STATE : 
App Version : 1.61.0 (16100)
Android  (OS : 10, API_Level : 29)
Orientation : portrait
is_Rooted : false==================DEVICE INFO : 
Model : Samsung SM-A515F
Screen : { height : 2186px, width : 2186px, density :  420 dpi, size :  6.0 inches }-----
report powered by Pluto https://pluto.mocklets.com

add feature flag to allow catch exceptions

Is your feature request related to a problem? Please describe.

  • allow catching exceptions locally and provide callback to intercept and submit to Crashlytics, etc tools manually.

discussion reference : #10

Easy access button is not working properly

Describe the bug
A clear and concise description of what the bug is.
Many times even when I click on the Pluto easy access button (floating on top of my app), it does not open the Pluto screen
Sometime, it get opened, but most of the time it does not open.

Screenshots

easy_access_button.mp4

Smartphone (please complete the following information):

  • Device: Samsung F41
  • OS: Android 11
  • Library Version 1.0.0

Pluto is crashing when clicking on notification on Android 4.4

Describe the bug
After fixing #76 application starts well, but still crashes when open PlutoActivity

To Reproduce
Steps to reproduce the behavior:

  1. Run the application
  2. Open Pluto activity via notification

Expected behavior
Pluto successfully opens on API 19

Smartphone:

  • Device: Android emulator
  • OS: Android 4.4
  • Library Version 1.1.1

Stack trace:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: my.cool.app, PID: 3665
java.lang.RuntimeException: Unable to start activity ComponentInfo{my.cool.app/com.mocklets.pluto.ui.PlutoActivity}: android.view.InflateException: Binary XML file line #20: Error inflating class android.widget.ImageView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #20: Error inflating class android.widget.ImageView
at android.view.LayoutInflater.createView(LayoutInflater.java:620)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:669)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:694)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at androidx.fragment.app.Fragment.onCreateView(Fragment.java:1924)
at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2963)
at androidx.fragment.app.FragmentStateManager.ensureInflatedView(FragmentStateManager.java:386)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:281)
at androidx.fragment.app.FragmentLayoutInflaterFactory.onCreateView(FragmentLayoutInflaterFactory.java:140)
at androidx.fragment.app.FragmentController.onCreateView(FragmentController.java:135)
at androidx.fragment.app.FragmentActivity.dispatchFragmentsOnCreateView(FragmentActivity.java:319)
at androidx.fragment.app.FragmentActivity.onCreateView(FragmentActivity.java:298)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:689)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
at android.app.Activity.setContentView(Activity.java:1929)
at androidx.activity.ComponentActivity.setContentView(ComponentActivity.java:380)
at androidx.activity.ComponentActivity.onCreate(ComponentActivity.java:302)
at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:273)
at com.mocklets.pluto.ui.PlutoActivity.onCreate(PlutoActivity.kt:28)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233) 
at android.app.ActivityThread.access$800(ActivityThread.java:135) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:136) 
at android.app.ActivityThread.main(ActivityThread.java:5001) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) 
at dalvik.system.NativeStart.main(Native Method) 
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at android.view.LayoutInflater.createView(LayoutInflater.java:594)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) 
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:669) 
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:694) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
at androidx.fragment.app.Fragment.onCreateView(Fragment.java:1924) 
at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2963) 
at androidx.fragment.app.FragmentStateManager.ensureInflatedView(FragmentStateManager.java:386) 
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:281) 
at androidx.fragment.app.FragmentLayoutInflaterFactory.onCreateView(FragmentLayoutInflaterFactory.java:140) 
at androidx.fragment.app.FragmentController.onCreateView(FragmentController.java:135) 
at androidx.fragment.app.FragmentActivity.dispatchFragmentsOnCreateView(FragmentActivity.java:319) 
at androidx.fragment.app.FragmentActivity.onCreateView(FragmentActivity.java:298) 
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:689) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290) 
at android.app.Activity.setContentView(Activity.java:1929) 
at androidx.activity.ComponentActivity.setContentView(ComponentActivity.java:380) 
at androidx.activity.ComponentActivity.onCreate(ComponentActivity.java:302) 
at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:273) 
at com.mocklets.pluto.ui.PlutoActivity.onCreate(PlutoActivity.kt:28) 
at android.app.Activity.performCreate(Activity.java:5231) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233) 
at android.app.ActivityThread.access$800(ActivityThread.java:135) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:136) 
at android.app.ActivityThread.main(ActivityThread.java:5001) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) 
at dalvik.system.NativeStart.main(Native Method) 
Caused by: android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x2/d=0x101045c a=-1}
at android.content.res.Resources.loadDrawable(Resources.java:2068)

Support custom actions

Is your feature request related to a problem? Please describe.
Support app-driven custom actions, which devs can trigger from Pluto UI

Describe the solution you'd like
Provide a UI handle in the Pluto UI, through which devs can trigger certain pre-defined tasks.

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.