bug in network tool

bug in network tool please any one solve

1 Like

Please discribe your problem.


application getting every time crash…

How many screens does your app has?

Not because of these blocks. There must be another reason for the crash.
Post all relevant blocks and / or post logcat.

this blocks work on kodular

… and on Niotron as well.

It works here.
Suggestion: Create an app with nothing but this blocks and see if the error continues. Probably it will work. If so, then the error is someplace else.

Or may be it happens in some android versions, or when there is another component or extension being used together, etc. In this case, show the components and extensions being used, send the apk here so others can test, whatever you can to help find and solve your problem

One more thing: May be if you put this block inside a clock with 500ms it will work. Sometimes the component crashes in initialize block because the app is still initializing, so the component is not fully working yet. This happens to me specially in old smartphones.

Playconsole Crash Report!
SourceFile - com.google.appinventor.components.runtime.NiotronNetworkTools.onPause

  1. Post a simple test aia that can reproduce the problem / crash.
  2. Post a screenshot of the entire error message from the Play Developer console (including the affected Android version).

@medha_ranjan_barman Please tell the Android version on which this error is occurring the most, and yes, there is a bug in network tools on some Android versions only, and this will be fixed by the next update. Until then, please consider using an extension, and please share the details of the Android versions.

New Crash:
android.widget.ScrollView.onRestoreInstanceState
java.lang.ClassCastException

Android 10

Exception java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.ScrollView$SavedState
at android.widget.ScrollView.onRestoreInstanceState (ScrollView.java:1834)
at android.view.View.dispatchRestoreInstanceState (View.java:18635)
at android.view.ViewGroup.dispatchRestoreInstanceState (ViewGroup.java:3823)
at android.view.ViewGroup.dispatchRestoreInstanceState (ViewGroup.java:3829)
at android.view.ViewGroup.dispatchRestoreInstanceState (ViewGroup.java:3829)
at android.view.ViewGroup.dispatchRestoreInstanceState (ViewGroup.java:3829)
at android.view.ViewGroup.dispatchRestoreInstanceState (ViewGroup.java:3829)
at android.view.ViewGroup.dispatchRestoreInstanceState (ViewGroup.java:3829)
at android.view.ViewGroup.dispatchRestoreInstanceState (ViewGroup.java:3829)
at android.view.ViewGroup.dispatchRestoreInstanceState (ViewGroup.java:3829)
at android.view.View.restoreHierarchyState (View.java:18613)
at com.android.internal.policy.PhoneWindow.restoreHierarchyState (PhoneWindow.java:2140)
at android.app.Activity.onRestoreInstanceState (Activity.java:1173)
at android.app.Activity.performRestoreInstanceState (Activity.java:1128)
at android.app.Instrumentation.callActivityOnRestoreInstanceState (Instrumentation.java:1318)
at android.app.ActivityThread.handleStartActivity (ActivityThread.java:2986)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence (TransactionExecutor.java:180)
at android.app.servertransaction.TransactionExecutor.cycleToPath (TransactionExecutor.java:165)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:142)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1831)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:201)
at android.app.ActivityThread.main (ActivityThread.java:6810)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:873)

Exception java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2994)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3072)
at android.app.ActivityThread.-wrap11
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1766)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:214)
at android.app.ActivityThread.main (ActivityThread.java:6977)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:528)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:910)
Caused by java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.ScrollView$SavedState
at android.widget.ScrollView.onRestoreInstanceState (ScrollView.java:1910)
at android.view.View.dispatchRestoreInstanceState (View.java:18042)
at android.view.ViewGroup.dispatchRestoreInstanceState (ViewGroup.java:3859)
at android.view.ViewGroup.dispatchRestoreInstanceState (ViewGroup.java:3865)
at android.view.ViewGroup.dispatchRestoreInstanceState (ViewGroup.java:3865)
at android.view.ViewGroup.dispatchRestoreInstanceState (ViewGroup.java:3865)
at android.view.ViewGroup.dispatchRestoreInstanceState (ViewGroup.java:3865)
at android.view.ViewGroup.dispatchRestoreInstanceState (ViewGroup.java:3865)
at android.view.ViewGroup.dispatchRestoreInstanceState (ViewGroup.java:3865)
at android.view.ViewGroup.dispatchRestoreInstanceState (ViewGroup.java:3865)
at android.view.View.restoreHierarchyState (View.java:18020)
at com.android.internal.policy.PhoneWindow.restoreHierarchyState (PhoneWindow.java:2205)
at android.app.Activity.onRestoreInstanceState (Activity.java:1173)
at android.app.Activity.performRestoreInstanceState (Activity.java:1128)
at android.app.Instrumentation.callActivityOnRestoreInstanceState (Instrumentation.java:1260)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2967)

Exception java.lang.RuntimeException:
at android.app.ActivityThread.performPauseActivityIfNeeded (ActivityThread.java:4671)
at android.app.ActivityThread.performPauseActivity (ActivityThread.java:4622)
at android.app.ActivityThread.handlePauseActivity (ActivityThread.java:4574)
at android.app.servertransaction.PauseActivityItem.execute (PauseActivityItem.java:46)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:181)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:98)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2080)
at android.os.Handler.dispatchMessage (Handler.java:107)
at android.os.Looper.loop (Looper.java:264)
at android.app.ActivityThread.main (ActivityThread.java:7581)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:980)
Caused by java.lang.IllegalArgumentException:
at android.app.LoadedApk.forgetReceiverDispatcher (LoadedApk.java:1430)
at android.app.ContextImpl.unregisterReceiver (ContextImpl.java:1640)
at android.content.ContextWrapper.unregisterReceiver (ContextWrapper.java:664)
at com.google.appinventor.components.runtime.NiotronNetworkTools.onPause (SourceFile:67)
at com.google.appinventor.components.runtime.Form.onPause (SourceFile:798)
at android.app.Activity.performPause (Activity.java:7981)
at android.app.Instrumentation.callActivityOnPause (Instrumentation.java:1507)
at android.app.ActivityThread.performPauseActivityIfNeeded (ActivityThread.java:4661)