Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors Non-SDK, when exporting to GooglePlay #49961

Closed
Valeryn4 opened this issue Jun 28, 2021 · 3 comments
Closed

Errors Non-SDK, when exporting to GooglePlay #49961

Valeryn4 opened this issue Jun 28, 2021 · 3 comments

Comments

@Valeryn4
Copy link
Contributor

Godot version

3.3.2-stable

System information

Any

Issue description

Good day!
Recently, when exporting to .aab format, automatic testing from Google began to swear at "Non-SDK" errors.
The problem has appeared recently. I suspect that Google has tightened the rules for the API.

image

Stak Trace:

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Lcom/android/org/conscrypt/ConscryptEngineSocket;->setHostname(Ljava/lang/String;)V
	at android.os.StrictMode.lambda$static$1(StrictMode.java:416)
	at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
	at java.lang.Class.getDeclaredMethodInternal(Native Method)
	at java.lang.Class.getPublicMethodRecursive(Class.java:2079)
	at java.lang.Class.getMethod(Class.java:2066)
	at java.lang.Class.getMethod(Class.java:1693)
	at okhttp3.internal.platform.OptionalMethod.getPublicMethod(OptionalMethod.java:164)
	at okhttp3.internal.platform.OptionalMethod.getMethod(OptionalMethod.java:149)
	at okhttp3.internal.platform.OptionalMethod.invokeOptional(OptionalMethod.java:66)
	at okhttp3.internal.platform.OptionalMethod.invokeOptionalWithoutCheckedException(OptionalMethod.java:86)
	at okhttp3.internal.platform.AndroidPlatform.configureTlsExtensions(AndroidPlatform.java:123)
	at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:314)
	at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:283)
	at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:168)
	at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:257)
	at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135)
	at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114)
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
	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:126)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:254)
	at okhttp3.RealCall.execute(RealCall.java:92)
	at com.google.firebase.crashlytics.internal.network.HttpRequest.execute(HttpRequest.java:129)
	at com.google.firebase.crashlytics.internal.settings.network.DefaultSettingsSpiCall.invoke(DefaultSettingsSpiCall.java:86)
	at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(SettingsController.java:200)
	at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(SettingsController.java:193)
	at com.google.android.gms.tasks.zzp.run(Unknown Source:2)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:60)
	at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:27)
	at java.lang.Thread.run(Thread.java:923)

I solved the problem myself.
Upgraded SDK and NDK versions to the latest

ext.versions = [
    androidGradlePlugin: '4.1.0',
    compileSdk         : 30,
    minSdk             : 18,
    targetSdk          : 30,
    buildTools         : '30.0.3',
    supportCoreUtils   : '1.0.0',
    kotlinVersion      : '1.5.20',
    v4Support          : '1.0.0',
    javaVersion        : 1.8,
    ndkVersion         : '22.1.7171670' 

]

Steps to reproduce

  • Load default template 3.3.2-stable.
  • Set access INTERNET.
  • Build custom template to AAB file.
  • Upload aab file to Google Play Console
  • Wait auto testing... Check Pre-launch report

Minimal reproduction project

No response

@Valeryn4
Copy link
Contributor Author

The updated SDK issues warnings. Don't crash.
But you need to remove the warnings.
Google suggests that the problem is in okHttp3-lib
image

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B
	at android.os.StrictMode.lambda$static$1(StrictMode.java:428)
	at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
	at java.lang.Class.getDeclaredMethodInternal(Native Method)
	at java.lang.Class.getPublicMethodRecursive(Class.java:2075)
	at java.lang.Class.getMethod(Class.java:2063)
	at java.lang.Class.getMethod(Class.java:1690)
	at okhttp3.internal.platform.OptionalMethod.getPublicMethod(OptionalMethod.java:164)
	at okhttp3.internal.platform.OptionalMethod.getMethod(OptionalMethod.java:149)
	at okhttp3.internal.platform.OptionalMethod.invoke(OptionalMethod.java:106)
	at okhttp3.internal.platform.OptionalMethod.invokeWithoutCheckedException(OptionalMethod.java:129)
	at okhttp3.internal.platform.AndroidPlatform.getSelectedProtocol(AndroidPlatform.java:137)
	at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:339)
	at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:283)
	at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:168)
	at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:257)
	at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135)
	at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114)
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
	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:126)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:254)
	at okhttp3.RealCall.execute(RealCall.java:92)
	at com.google.firebase.crashlytics.internal.network.HttpRequest.execute(HttpRequest.java:129)
	at com.google.firebase.crashlytics.internal.settings.network.DefaultSettingsSpiCall.invoke(DefaultSettingsSpiCall.java:86)
	at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(SettingsController.java:200)
	at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(SettingsController.java:193)
	at com.google.android.gms.tasks.zzp.run(Unknown Source:2)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:60)
	at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:27)
	at java.lang.Thread.run(Thread.java:764)

@m4gr3d
Copy link
Contributor

m4gr3d commented Jun 28, 2021

The updated SDK issues warnings. Don't crash.
But you need to remove the warnings.
Google suggests that the problem is in okHttp3-lib
image

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B
	at android.os.StrictMode.lambda$static$1(StrictMode.java:428)
	at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
	at java.lang.Class.getDeclaredMethodInternal(Native Method)
	at java.lang.Class.getPublicMethodRecursive(Class.java:2075)
	at java.lang.Class.getMethod(Class.java:2063)
	at java.lang.Class.getMethod(Class.java:1690)
	at okhttp3.internal.platform.OptionalMethod.getPublicMethod(OptionalMethod.java:164)
	at okhttp3.internal.platform.OptionalMethod.getMethod(OptionalMethod.java:149)
	at okhttp3.internal.platform.OptionalMethod.invoke(OptionalMethod.java:106)
	at okhttp3.internal.platform.OptionalMethod.invokeWithoutCheckedException(OptionalMethod.java:129)
	at okhttp3.internal.platform.AndroidPlatform.getSelectedProtocol(AndroidPlatform.java:137)
	at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:339)
	at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:283)
	at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:168)
	at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:257)
	at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135)
	at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114)
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
	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:126)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:254)
	at okhttp3.RealCall.execute(RealCall.java:92)
	at com.google.firebase.crashlytics.internal.network.HttpRequest.execute(HttpRequest.java:129)
	at com.google.firebase.crashlytics.internal.settings.network.DefaultSettingsSpiCall.invoke(DefaultSettingsSpiCall.java:86)
	at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(SettingsController.java:200)
	at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(SettingsController.java:193)
	at com.google.android.gms.tasks.zzp.run(Unknown Source:2)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:60)
	at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:27)
	at java.lang.Thread.run(Thread.java:764)

Yes, I was just about to comment that the stack trace shows the issue originating from the okhttp3 library which seems to be used by the firebase crashlytics library.
This doesn't seem like a Godot specific issue. Other developers may be running into the same issue with the okhttp3 library, so I would check their repo. It seems they may have a (now closed) issue tracking that bug.

@m4gr3d m4gr3d closed this as completed Jun 28, 2021
@akien-mga
Copy link
Member

Please be sure to mention when you compile third-party code in bug reports, we shouldn't have to guess that information from the logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants