kandi background
Explore Kits

NetGuard | A simple way to block access to the internet per app

 by   M66B Java Version: 2.299 License: GPL-3.0

 by   M66B Java Version: 2.299 License: GPL-3.0

Download this library from

kandi X-RAY | NetGuard Summary

NetGuard is a Java library. NetGuard has no bugs, it has no vulnerabilities, it has build file available, it has a Strong Copyleft License and it has medium support. You can download it from GitHub.
NetGuard provides simple and advanced ways to block access to the internet - no root required. Applications and addresses can individually be allowed or denied access to your Wi-Fi and/or mobile connection.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • NetGuard has a medium active ecosystem.
  • It has 3629 star(s) with 776 fork(s). There are 273 watchers for this library.
  • There were 3 major release(s) in the last 12 months.
  • NetGuard has no issues reported. There are 3 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of NetGuard is 2.299
NetGuard Support
Best in #Java
Average in #Java
NetGuard Support
Best in #Java
Average in #Java

quality kandi Quality

  • NetGuard has 0 bugs and 0 code smells.
NetGuard Quality
Best in #Java
Average in #Java
NetGuard Quality
Best in #Java
Average in #Java

securitySecurity

  • NetGuard has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • NetGuard code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
NetGuard Security
Best in #Java
Average in #Java
NetGuard Security
Best in #Java
Average in #Java

license License

  • NetGuard is licensed under the GPL-3.0 License. This license is Strong Copyleft.
  • Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.
NetGuard License
Best in #Java
Average in #Java
NetGuard License
Best in #Java
Average in #Java

buildReuse

  • NetGuard releases are available to install and integrate.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
  • NetGuard saves you 16194 person hours of effort in developing the same functionality from scratch.
  • It has 32199 lines of code, 455 functions and 172 files.
  • It has high code complexity. Code complexity directly impacts maintainability of the code.
NetGuard Reuse
Best in #Java
Average in #Java
NetGuard Reuse
Best in #Java
Average in #Java
Top functions reviewed by kandi - BETA

kandi has reviewed NetGuard and discovered the below as its top functions. This is intended to give you an instant insight into NetGuard implemented functionality, and help decide if they suit your requirements.

  • Invoked when a bound view holder is being bound .
  • Add the categories .
  • Gets all rules .
  • Creates a builder for network rules .
  • On upgrade .
  • Handle the network intent .
  • Show the menu challenge
  • Updates device wifi .
  • Show information about the tv .
  • Export PCAP

NetGuard Key Features

reduce your data usage

save your battery

increase your privacy

Simple to use

No root required

100% open source

No calling home

No tracking or analytics

Actively developed and supported

Android 5.1 and later supported

IPv4/IPv6 TCP/UDP supported

Tethering supported

Optionally allow when screen on

Optionally block when roaming

Optionally block system applications

Optionally forward ports, also to external addresses (not available if installed from the Play store)

Optionally notify when an application accesses the internet

Optionally record network usage per application per address

Optionally block ads using a hosts file (not available if installed from the Play store)

Material design theme with light and dark theme

Log all outgoing traffic; search and filter access attempts; export PCAP files to analyze traffic

Allow/block individual addresses per application

New application notifications; configure NetGuard directly from the notification

Display network speed graph in a status bar notification

Select from five additional themes in both light and dark version

Android 5.1 or later

A compatible device

GitHub

Google Play

MD5: B6:4A:E8:08:1C:3C:9C:19:D6:9E:29:00:46:89:DA:73

SHA1: EF:46:F8:13:D2:C8:A0:64:D7:2C:93:6B:9B:96:D1:CC:CC:98:93:78

SHA256: E4:A2:60:A2:DC:E7:B7:AF:23:EE:91:9C:48:9E:15:FD:01:02:B9:3F:9E:7C:9D:82:B0:9C:0B:39:50:00:E4:D4

Enable the firewall using the switch in the action bar

Allow/deny Wi-Fi/mobile internet access using the icons along the right side of the application list

Red/orange/yellow/amber = internet access denied

Teal/blue/purple/grey = internet access allowed

Community Discussions

Trending Discussions on NetGuard
  • HTTP request fails even if the connection is active
Trending Discussions on NetGuard

QUESTION

HTTP request fails even if the connection is active

Asked 2021-Mar-12 at 16:58

I'm facing a problem with an http request done in HTTP.java.

On desktop all works fine (that request is not performed because it's necessary only on Android).

In Android all works without that http request.

After that that http request is made, all others fail after timeout with UnknownHostException error, as if they no longer have access to the internet connection, even if it is active. Also after minutes and after the onResume all http requests fail. Although the app cannot get an http response, the AdMob ad appears in my App, so I think that probably the connection works (or does the AdMob library cache some ads and show them when needed?).

Often, in these cases sometimes it works again:

  • uninstalling and reinstalling the App from Android Studio
  • closing the App, waiting some minutes and reopening it
  • clearing App data from the device
  • waiting an undefined amount of time

After several attempts I discovered that as soon as the problem occurs, almost every time, if I activate the airplane mode and then disable it, the data connection is deactivated and then reactivated, and the App can immediately execute all subsequent http requests without having to do anything else on your device and without even having to reopen the application.

  • tested with wifi on a 1GB fibra network: same error
  • I checked the connection: it is stable, in wifi and also with SIM
  • in the manifest there is the permission for using internet (otherwise it would never have worked)
  • at the same time, the same App on desktop works perfectly and at the best speed, receiving http responses in less than 1 second, so the server isn't the problem
  • I tested also with the url https://www.google.it: same error, the same url is reachable in the device via browser in less than 1 second
  • as in the line .timeout(10000) I'm using a timeout of 10 seconds, the server has timeout set to 60 seconds
  • checked the server SSL "quality" at https://www.ssllabs.com/ssltest: got "A" in "Overall Rating"
  • done the SIM "reboot" directly with a Vodafone operator

I'm testing on a real device with a flat 4G connection and with wifi, with "NetGuard - no-root firewall" VPN App installed.

This VPN works very well with all the other apps and probably mine too, but I can't rule out that it's the problem, although I hardly think it is (I use it since years without problems).

There is something wrong in my code? Or at least, how can I know the exact cause of this error?

Thanks.

AndroidLauncher.java:

@Override
protected void onCreate (Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    ...

    // Create the layout
    RelativeLayout layout = new RelativeLayout(this);

    // Do the stuff that initialize() would do for you
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);

    // Add the libGDX view
    game = new MyGame(this);
    gameView = initializeForView(game);
    layout.addView(gameView);

    // Add the AdMob view
    RelativeLayout.LayoutParams adParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
    adParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
    adParams.addRule(RelativeLayout.CENTER_HORIZONTAL);
    layout.addView(mAdView, adParams);

    layout.setKeepScreenOn(true);

    setContentView(layout);
}

MyGame.java:

public class MyGame extends Game {
    public void create() {
    
    ...

    java.security.Security.setProperty("networkaddress.cache.ttl" , "0");

    this.setScreen(new MainMenuScreen(this));
}

MainMenuScreen.java:

public MainMenuScreen(final MyGame game) {
    ... 
    
    performHttpRequest(baseUrl, getData, true, myListener);
}

HTTP.java:

public class HTTP {
    public static void performHttpRequest(String baseUrl, String q, Net.HttpResponseListener httpResponseListener) {
        HttpRequestBuilder requestBuilder = new HttpRequestBuilder();
        Net.HttpRequest httpRequest = requestBuilder.newRequest()
            .method(Net.HttpMethods.GET)
            .url(baseUrl)
            .content(q)
            .timeout(10000)
            .build();
        Gdx.net.sendHttpRequest(httpRequest, httpResponseListener);
    }
}

build.gradle (module android):

...
buildTypes {
        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            debuggable true
        }
    }
...

build.gradle (project):

buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
        maven { url "https://plugins.gradle.org/m2/" }
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.1'
    }
}

allprojects {
    apply plugin: "eclipse"

    version = '1.0'
    ext {
        appName = "MyAppName"
        gdxVersion = '1.9.13'
        roboVMVersion = '2.3.8'
        box2DLightsVersion = '1.4'
        ashleyVersion = '1.7.0'
        aiVersion = '1.8.0'
    }

    repositories {
        mavenLocal()
        mavenCentral()
        jcenter()
        google()
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        maven { url "https://oss.sonatype.org/content/repositories/releases/" }
    }
}

project(":desktop") {
    apply plugin: "java-library"

    dependencies {
        implementation project(":core")
        api "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
        api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
        api "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
        api "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
        api "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-desktop"
        api "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
    }
}

project(":android") {
    apply plugin: "android"

    configurations { natives }

    dependencies {
        implementation project(":core")
        api "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
        api "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-arm64-v8a"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86_64"
        api "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-arm64-v8a"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86_64"
        api "com.badlogicgames.gdx:gdx-bullet:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-arm64-v8a"
        natives "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-x86"
        natives "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-x86_64"
        implementation 'com.google.android.gms:play-services-ads:19.6.0'
        implementation 'com.google.android.gms:play-services-basement:17.5.0'
    }
}

project(":core") {
    apply plugin: "java-library"

    dependencies {
        api "com.badlogicgames.gdx:gdx:$gdxVersion"
        api "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
        api "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
        api "com.badlogicgames.gdx:gdx-bullet:$gdxVersion"
    }
}

Logcat:

I/System.out: failed to connect to myDomain.app/NN.NN.NN.NN (port 443) from /10.NN.NN.NN (port 41326) after 10000ms
W/System.err: java.net.SocketTimeoutException: failed to connect to myDomain.app/NN.NN.NN.NN (port 443) from /10.NN.NN.NN (port 41326) after 10000ms
        at libcore.io.IoBridge.connectErrno(IoBridge.java:191)
        at libcore.io.IoBridge.connect(IoBridge.java:135)
        at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
        at java.net.Socket.connect(Socket.java:621)
        at com.android.okhttp.internal.Platform.connectSocket(Platform.java:182)
        at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:1407)
        at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:1359)
        at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:221)
        at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:144)
        at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:106)
W/System.err:     at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:400)
        at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:333)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:483)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:135)
        at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:90)
        at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:30)
        at com.badlogic.gdx.net.NetJavaImpl$2.run(NetJavaImpl.java:223)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:919)

(I removed the libGDX tag because it seems Android related, because the method is only invoked from the MainMenuScreen class through the interface, but executed in the Android activity)

adb logcat *:E as suggested by Always Learning in a comment, the log is from the App opening to the end of the http request:

cognitionService: handleMessage: event 200 value : 1
02-23 19:39:55.336  5803  5803 E libprocessgroup: set_timerslack_ns write failed: Operation not permitted
02-23 19:39:55.347  5803  5803 E libprocessgroup: set_timerslack_ns write failed: Operation not permitted
02-23 19:39:57.163  4987  5272 E ActivityTaskManager: TouchDown intent received, starting ActiveLaunch
02-23 19:39:57.205  4987  5041 E system_server: Invalid ID 0x00000000.
02-23 19:39:57.212 12157 12157 E .myAppName: Unknown bits set in runtime_flags: 0x8000
02-23 19:39:57.233  4987  5041 E DecorView: mWindow.mActivityCurrentConfig is null
02-23 19:39:57.281  4500  4613 E BufferQueueProducer: [com.sec.android.app.launcher/com.sec.android.app.launcher.activities.LauncherActivity$_5803#0] disconnect: not connected (req=1)
02-23 19:39:57.281  5803  7530 E OpenGLRenderer: ReliableSurface: perform returned an error
02-23 19:39:57.295  4987  5234 E PkgPredictorService-Collector: record changed bt=0  wifi=0 screen=0
02-23 19:39:57.932 14641 14641 E webview_servic: Not starting debugger since process cannot load the jdwp agent.
02-23 19:39:57.935  4987  5540 E PackageManager: Failed to find package; permName: android.permission.INTERNET, uid: 99774, caller: 1000
02-23 19:39:57.962 14661 14661 E ocessService0:: Not starting debugger since process cannot load the jdwp agent.
02-23 19:39:58.627  4987  5307 E WindowManager: win=Window{5a5aa90 u0 com.sec.android.app.launcher/com.sec.android.app.launcher.activities.LauncherActivity} destroySurfaces: appStopped=true win.mWindowRemovalAllowed=false win.mRemoveOnExit=false win.mViewVisibility=8 caller=com.android.server.wm.AppWindowToken.destroySurfaces:1248 com.android.server.wm.AppWindowToken.destroySurfaces:1229 com.android.server.wm.AppWindowToken.notifyAppStopped:1284 com.android.server.wm.ActivityRecord.activityStoppedLocked:2776 com.android.server.wm.ActivityTaskManagerService.activityStopped:2512 android.app.IActivityTaskManager$Stub.onTransact:2288 android.os.Binder.execTransactInternal:1056 
02-23 19:39:58.708  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:39:58.728  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:39:58.775  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:39:58.923  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:39:58.924  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:39:58.981  4987  5041 E WindowManager: win=Window{b1dc417 u0 Splash Screen my.package.name EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true win.mViewVisibility=0 caller=com.android.server.wm.AppWindowToken.destroySurfaces:1248 com.android.server.wm.AppWindowToken.destroySurfaces:1229 com.android.server.wm.WindowState.onExitAnimationDone:5189 com.android.server.wm.WindowStateAnimator.onAnimationFinished:320 com.android.server.wm.WindowState.onAnimationFinished:5630 com.android.server.wm.-$$Lambda$yVRF8YoeNdTa8GR1wDStVsHu8xM.run:2 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0$SurfaceAnimator:100 
02-23 19:39:59.120 12157 12157 E libc    : Access denied finding property "ro.serialno"
02-23 19:39:59.354  4447  4447 E audit   : type=1400 audit(1614105599.351:37597): avc:  denied  { write } for  pid=12157 comm="Thread-12" name="perfd" dev="sda32" ino=35421 scontext=u:r:untrusted_app:s0:c112,c257,c512,c768 tcontext=u:object_r:shell_data_file:s0 tclass=dir permissive=0 SEPF_SM-M315F_10_0024 audit_filtered
02-23 19:39:59.354  4447  4447 E audit   : type=1300 audit(1614105599.351:37597): arch=c00000b7 syscall=48 success=no exit=-13 a0=ffffff9c a1=7b243f7ec1 a2=2 a3=0 items=0 ppid=4460 pid=12157 auid=... uid=10368 gid=10368 euid=10368 suid=10368 fsuid=10368 egid=10368 sgid=10368 fsgid=10368 tty=(none) ses=... comm="Thread-12" exe="/system/bin/app_process64" subj=u:r:untrusted_app:s0:c112,c257,c512,c768 key=(null)
02-23 19:39:59.354  4447  4447 E audit   : type=1327 audit(1614105599.351:37597): proctitle="my.package.name"
02-23 19:39:59.860  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:40:00.275  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:40:00.910 29776 14898 E memtrack: Couldn't load memtrack module
02-23 19:40:01.889  4500  4613 E BufferQueueProducer: [Toast$_12157#0] disconnect: not connected (req=1)
02-23 19:40:01.889 12157 14616 E OpenGLRenderer: ReliableSurface: perform returned an error
02-23 19:40:05.264  4987  5166 E MotionRecognitionService: handleMessage: event 200 value : 1
02-23 19:40:05.861  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:40:06.165  4987  5049 E NotificationService: Suppressing notification from package by user request.
02-23 19:40:06.272  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:40:09.116  4987  5043 E Watchdog: !@Sync: 19566 heap: 96 / 119 [2021-02-23 19:40:09.116] sdogWay: softdog
02-23 19:40:15.247  4987  5166 E MotionRecognitionService: handleMessage: event 200 value : 1
02-23 19:40:16.486  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:40:16.490  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:40:16.512  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:40:16.533  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:40:17.865  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:40:18.274  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:40:21.181  4987  5049 E NotificationService: Suppressing notification from package by user request.
02-23 19:40:25.335  4987  5166 E MotionRecognitionService: handleMessage: event 200 value : 1
02-23 19:40:30.587  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:40:30.616 12157 12157 E Ads     : JS: Uncaught ReferenceError: OmidCreativeSession is not defined (https://googleads.g.doubleclick.net/mads/gma?caps=inlineVideo_interactiveVideo_mraid1_mraid2_mraid3_sdkVideo_exo3_th_autoplay_mediation_scroll_av_av_transparentBackground_sdkAdmobApiForAds_di_aso_sfv_dinm_dim_nav_navc_dinmo_ipdof_gls_gcache_saiMacro_xSeconds&eid=...)
02-23 19:40:30.658 12157 12157 E Ads     : JS: Uncaught ReferenceError: OmidCreativeSession is not defined (https://googleads.g.doubleclick.net/mads/gma?caps=mraid1_mraid2_mraid3_th_mediation_scroll_av_av_transparentBackground_sdkAdmobApiForAds_di_aso_dinm_dim_dinmo_ipdof_gls_saiMacro_xSeconds&eid=...)
02-23 19:40:31.277  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:40:31.437  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:40:35.380  4987  5166 E MotionRecognitionService: handleMessage: event 200 value : 1
02-23 19:40:36.199  4987  5049 E NotificationService: Suppressing notification from package by user request.
02-23 19:40:36.586  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:40:37.279  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:40:37.443  4459  4647 E Netd    : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
02-23 19:40:39.129  4987  5043 E Watchdog: !@Sync: 19567 heap: 87 / 110 [2021-02-23 19:40:39.129] sdogWay: softdog

Edit 1 ---------------------------------------------------------:

I just performed the SIM "reboot" directly with a Vodafone operator, so now I should exclude a SIM problem.

Some info while the http request fails in the MainMenuScreen but the AdMod ad is displayed and also all works fine in firefox:

activeNetwork.toString()           = 601
activeNetwork.describeContents()   = 0
activeNetworkInfo.getReason()      = null
activeNetworkInfo.getType()        = 0
activeNetworkInfo.getTypeName()    = MOBILE
activeNetworkInfo.getSubtype()     = 13
activeNetworkInfo.getSubtypeName() = LTE
activeNetworkInfo.getExtraInfo()   = mobile.vodafone.it
activeNetworkInfo.toString()       = [
    type:        MOBILE[LTE]
    , state:     CONNECTED/CONNECTED
    , reason:    (unspecified)
    , extra:     mobile.vodafone.it
    , failover:  false
    , available: true
    , roaming:   false
]

The errors:

W/System.err: java.net.SocketTimeoutException: SSL handshake timed out
W/System.err:     at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
        at com.android.org.conscrypt.NativeSsl.doHandshake(NativeSsl.java:387)
        at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:234)
        at com.android.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:1471)
        at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:1415)
        at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:1359)
        at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:221)
        at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:144)
        at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:106)
        at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:400)
        at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:333)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:483)
W/System.err:     at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:135)
        at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:90)
        at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:30)
        at com.badlogic.gdx.net.NetJavaImpl$2.run(NetJavaImpl.java:223)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:919)

W/System.err: javax.net.ssl.SSLHandshakeException: SSL handshake aborted: ssl=0x7021beca08: I/O error during system call, Connection reset by peer
        at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
W/System.err:     at com.android.org.conscrypt.NativeSsl.doHandshake(NativeSsl.java:387)
        at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:234)
        at com.android.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:1471)
        at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:1415)
        at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:1359)
        at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:221)
        at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:144)
        at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:106)
        at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:400)
        at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:333)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:483)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:135)
        at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:90)
        at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:30)
        at com.badlogic.gdx.net.NetJavaImpl$2.run(NetJavaImpl.java:223)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:919)

My solution:

Uninstall the VPN App.

It was such a simple solution ... I would not have imagined it was the App's fault for the VPN, I considered it foolproof having used it for over 3 years ...

If this hadn't been the problem, your suggestions would certainly have been helpful and probably decisive, thank you all! (unfortunately I cannot purposely give the bounty reward to multiple users, but I can upvote your answer)

ANSWER

Answered 2021-Mar-02 at 03:51

That error maybe relate to VPN connect, please close the application, off VNP if it was connected, re-connect to VPN and restart you application.

In all case, you must be connect the VPN before open the application.

Source https://stackoverflow.com/questions/66303303

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install NetGuard

You can download it from GitHub.
You can use NetGuard like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the NetGuard component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

Support

For questions, feature requests and bug reports, please use this XDA-Developers forum thread. There is support on the latest version of NetGuard only. There is no support on things that are not directly related to NetGuard. There is no support on building and developing things by yourself.

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Share this Page

share link
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.