egl_emulation eglsurfaceattrib not implemented error in android application - android

I am getting the following error in console logs:
egl_emulation eglsurfaceattrib not implemented
I am not able to see what I am drawing using Draw function.
I have tried changing manifest file, adding library. But no luck.

Related

React-native-webview: net::ERR_FAILED

Bug description:
The first time I open my app the website loads correctly in the WebView. Then I go to the homescreen and after a while I return to the app and gets the following error:
Website not available
The website at https://www.example.com?param=value could not be loaded because:
net::ERR_FAILED
Has anyone seen this error before?
Here is some logs from Android Studio that may or my not be related/useful.
2019-06-24 10:59:11.233 16101-16166/? W/cr_ChildProcLH: Create a new ChildConnectionAllocator with package name = com.android.chrome, sandboxed = true
2019-06-24 10:59:11.237 16101-16101/? I/cr_BrowserStartup: Initializing chromium process, singleProcess=false
2019-06-24 10:59:11.239 16101-16101/? W/ResourceType: Failure getting entry for 0x7f130537 (t=18 e=1335) (error -2147483647)
2019-06-24 10:59:11.241 16169-16169/? E//system/bin/webview_zygote32: failed to make and chown /acct/uid_99051: Permission denied
2019-06-24 10:59:11.241 16169-16169/? E/Zygote: createProcessGroup(99051, 0) failed: Permission denied
2019-06-24 10:59:11.244 16169-16169/? W//system/bin/webview_zygote32: Using default instruction set features for ARM CPU variant (cortex-a9) using conservative defaults
2019-06-24 10:59:11.248 1700-6616/? I/ActivityManager: Start proc 16169:com.android.chrome:sandboxed_process0/u0i51 for webview_service dk.MYAPPNAME.app/org.chromium.content.app.SandboxedProcessService0
2019-06-24 10:59:11.264 1991-1991/? I/chatty: uid=10016(u0_a16) com.android.systemui identical 1 line
2019-06-24 10:59:11.265 16169-16169/? I/SamplingProfilerIntegration: Profiling disabled.
2019-06-24 10:59:11.289 16197-16197/? E/asset: setgid: Operation not permitted
To Reproduce:
I have only been able to reproduce this error in release - not in debug. This error happens after loading the app the first time, then leaving it and return to the app after a few hours.
Maybe it is related to cache.
The problem persist when I force quit the app. If I reinstall the app it is working for a while.
Expected behavior:
Website should fully load.
Screenshots/Videos:
Environment:
- OS: Android (Huawei P20 Pro and multiple other Android phones)
- OS version: Android 8
- react-native version: 59.3
- react-native-webview version: 5.6.2
I found a fix for this issue!
It looks like a broken service worker stalled the website.
I solved it by using the injectedJavascript prop in my WebView to inject the following lines of code:
navigator.serviceWorker.getRegistrations().then(function(registrations) {
for (let registration of registrations) {
registration.unregister();
}
});
It is a bug in Google Chrome 75.

Blank screen with release mode, app does not start. Working fine in debug mode

I just created my release candidate with Android Studio in release mode and generating a signed apk. Everything fine, but when I test it in my device or other devices, the app starts and just shows a blank screen. No login screen, nothing.
The logs of the release version doesn't say anything to me. It's the first time that happens to me after 4 years of app development. I don't really understand what's going on.
I've also tried the rolling back to the version that we have in Google Play Store, same happens. Debug working fine, Release signed not working.
I tried it with another computer and another phone, same issues.
I will appreciate any help, because I never felt that lost.
These are the logs
09-13 17:27:07.837 16977-16977/? I/applabs.sharif: Late-enabling -Xcheck:jni
09-13 17:27:07.918 16977-16977/es.sharifyapplabs.sharify I/applabs.sharif: The ClassLoaderContext is a special shared library.
09-13 17:27:08.052 16977-16977/es.sharifyapplabs.sharify I/MultiDex: VM with version 2.1.0 has multidex support
Installing application
VM has multidex support, MultiDex support library is disabled.
Installing application
VM has multidex support, MultiDex support library is disabled.
09-13 17:27:08.080 16977-16977/es.sharifyapplabs.sharify D/FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
09-13 17:27:08.096 16977-16977/es.sharifyapplabs.sharify I/FirebaseInitProvider: FirebaseApp initialization successful
09-13 17:27:08.138 16977-16977/es.sharifyapplabs.sharify I/CrashlyticsCore: Initializing Crashlytics 2.6.1.23
09-13 17:27:08.151 16977-16977/es.sharifyapplabs.sharify I/CrashlyticsInitProvider: CrashlyticsInitProvider initialization successful
09-13 17:27:08.168 16977-16977/es.sharifyapplabs.sharify E/com.facebook.internal.a: getAttributionIdentifiers should not be called from the main thread
09-13 17:27:08.178 16977-17019/es.sharifyapplabs.sharify D/NetworkSecurityConfig: No Network Security Config specified, using platform default
09-13 17:27:08.276 16977-17002/es.sharifyapplabs.sharify I/FA: App measurement is starting up, version: 12451
To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
To enable faster debug mode event logging run:
adb shell setprop debug.firebase.analytics.app es.sharifyapplabs.sharify
09-13 17:27:18.273 16977-17014/es.sharifyapplabs.sharify W/Fabric: Could not call getAdvertisingIdInfo on com.google.android.gms.ads.identifier.AdvertisingIdClient
09-13 17:27:18.274 16977-17014/es.sharifyapplabs.sharify W/Fabric: Could not call getId on com.google.android.gms.ads.identifier.AdvertisingIdClient$Info
09-13 17:27:28.333 16977-17014/es.sharifyapplabs.sharify W/Fabric: Could not call getAdvertisingIdInfo on com.google.android.gms.ads.identifier.AdvertisingIdClient
09-13 17:27:28.334 16977-17014/es.sharifyapplabs.sharify W/Fabric: Could not call isLimitAdTrackingEnabled on com.google.android.gms.ads.identifier.AdvertisingIdClient$Info
09-13 17:27:28.658 16977-17006/es.sharifyapplabs.sharify D/skia: --- Failed to create image decoder with message 'unimplemented'
09-13 17:27:29.907 16977-17006/es.sharifyapplabs.sharify W/CrashlyticsCore: Expected method missing: registerOnMeasurementEventListener
java.lang.NoSuchMethodException: parameter type is null
at java.lang.Class.getMethod(Class.java:2060)
at java.lang.Class.getDeclaredMethod(Class.java:2047)
at com.crashlytics.android.c.u.a(DefaultAppMeasurementEventListenerRegistrar.java:89)
at com.crashlytics.android.c.u.a(DefaultAppMeasurementEventListenerRegistrar.java:54)
at com.crashlytics.android.c.k.a(CrashlyticsController.java:1574)
at com.crashlytics.android.c.l.d(CrashlyticsCore.java:320)
at com.crashlytics.android.c.l.e(CrashlyticsCore.java:44)
at c.a.a.a.h.a(InitializationTask.java:63)
at c.a.a.a.h.a(InitializationTask.java:28)
at c.a.a.a.a.c.a$2.call(AsyncTask.java:311)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
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:764)
09-13 17:27:38.083 16977-16996/es.sharifyapplabs.sharify E/FirebaseInstanceId: Token retrieval failed: SERVICE_NOT_AVAILABLE
09-13 17:28:38.101 16977-16996/es.sharifyapplabs.sharify E/FirebaseInstanceId: Token retrieval failed: SERVICE_NOT_AVAILABLE
09-13 17:30:08.126 16977-16996/es.sharifyapplabs.sharify E/FirebaseInstanceId: Token retrieval failed: SERVICE_NOT_AVAILABLE
1) Invalidate Cache/Restart Android Studio.
2) Refresh Build completely, Sign Apk & test!
I just found the solution. Basically Facebook messed up again.
Related to the dependency in gradle.
App getting stuck with E/com.facebook.internal.AttributionIdentifiers

Trouble to migrate some flavors from Firebase CrashReport to Firebase Crashlytics

So we have an Android application which was monitored using Firebase Crash Report and we updated it a couple weeks ago to migrate to Firebase Crashlytics.
We followed the (pretty straightforward) official procedure and tested it on our development flavor. It took some time for the first test crash reports to pop up but it definitively worked.
But we tried it this week on another flavor of our application and it does not work in this case. Looking closer, we can see the following lines in Logcat :
com.ourapp.flavorb I/CrashlyticsCore: Initializing Crashlytics 2.6.3.25
com.ourapp.flavorb I/CrashlyticsInitProvider: CrashlyticsInitProvider initialization successful
com.ourapp.flavorb D/FirebaseApp: com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization.
com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
com.ourapp.flavorb E/Fabric: Failed to retrieve settings from https://settings.crashlytics.com/spi/v2/platforms/android/apps/com.ourapp.flavorb/settings
com.ourapp.flavorb W/CrashlyticsCore: Received null settings, skipping report submission!
The working flavor has the following output :
com.laposte.tvfacteur.integration I/CrashlyticsCore: Initializing Crashlytics 2.6.3.25
com.ourapp.flavora I/CrashlyticsInitProvider: CrashlyticsInitProvider initialization successful
com.ourapp.flavora D/FirebaseApp: com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization.
com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
com.ourapp.flavora I/CrashlyticsCore: Crashlytics report upload complete: [SOME-UID]
Is there something we're missing ? It seems we did nothing more for the first flavor…
I'm under the impression that Firebase creates at some point a settings entry in Crashlytics servers and, for some reason, it has not worked for the second flavor.
Does anyone saw something like that ? Any idea on things we could try ?
Any help will be welcomed !
So… It's kinda weird but it finally works for both flavors !
Seems that it took a looooooooooooooong time to process the new flavor. My guess is that some kind of account is automatically created on Crashlytics on first report. In my case, it took nearly a week !
I also uninstalled/reinstalled the application multiple times, maybe it helped…
Just for my archives, here is the situation before :
And after :

Meaning of these logcat messages

I got this error in Log but it doesn't prevent my app from processing and doesn't do any errors in app but i don't what's it
01-12 09:54:41.726 14988-15006/com.android.muslimstudios.bookstore W/EGL_emulation: eglSurfaceAttrib not implemented
01-12 09:54:41.731 14988-15006/com.android.muslimstudios.bookstore W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xe0513980, error=EGL_SUCCESS
01-12 09:54:41.908 14988-15006/com.android.muslimstudios.bookstore D/OpenGLRenderer: endAllStagingAnimators on 0xe03c5a00 (RippleDrawable) with handle 0xe0dbe390
01-12 09:54:52.360 14988-14998/com.android.muslimstudios.bookstore W/art: Suspending all threads took: 9.121ms
None of those are errors. W/ is a warning; D/ is a debug message.
Pretty much any Android app will trigger those specific messages from time to time. Please ignore them.
If logcat gives you an error message, it will be E/ tag and red text
These are messages from the Android emulator and can be helpful in some situations. If you would like to filter these out, however, I would suggest (per here) only filtering out the Debug messages, and not the Warning or Error messages as those may be useful.
Prefix:
D/ - Debug
W/ - Warning
E/ - Error
For Android Studio Logcat logs:
Use the method recommended here in logcat but modify to ^(?!(D/EGL_emulation)) so that Warnings and Errors will still show.
For VSCode Debug Console logs:
Simply use a Filter exclusion string as !D/EGL_emulation.

Android app force stop on modelBatch.render

I'm trying to render a model in libgdx - everything runs perfectly on the desktop, but on android force stop on modelBatch.render(poleInstance, environment);
Log:
03-30 16:37:40.317 5249-5249/? E/cutils-trace﹕ Error opening trace file: No such file or directory (2)
03-30 16:37:42.621 5269-5269/? E/cutils-trace﹕ Error opening trace file: No such file or directory (2)
03-30 16:37:46.181 5283-5283/com.badlogic.gdx.tests E/OpenGLRenderer﹕ Getting MAX_TEXTURE_SIZE from GradienCache
03-30 16:37:46.209 5283-5283/com.badlogic.gdx.tests E/OpenGLRenderer﹕ Getting MAX_TEXTURE_SIZE from Caches::initConstraints()
03-30 16:37:46.533 5283-5297/com.badlogic.gdx.tests E/EGL_genymotion﹕ [getAttribValue] Bad attribute idx
03-30 16:37:46.533 5283-5297/com.badlogic.gdx.tests E/EGL_genymotion﹕ tid 5297: eglGetConfigAttrib(605): error 0x3004 (EGL_BAD_ATTRIBUTE)
03-30 16:37:46.533 5283-5297/com.badlogic.gdx.tests E/EGL_genymotion﹕ [getAttribValue] Bad attribute idx
03-30 16:37:46.533 5283-5297/com.badlogic.gdx.tests E/EGL_genymotion﹕ tid 5297: eglGetConfigAttrib(605): error 0x3004 (EGL_BAD_ATTRIBUTE)
03-30 16:37:46.825 5283-5297/com.badlogic.gdx.tests E/AndroidRuntime﹕ FATAL EXCEPTION: GLThread 168
com.badlogic.gdx.utils.GdxRuntimeException: File not found: com/badlogic/gdx/graphics/g3d/shaders/default.vertex.glsl (Classpath)
at com.badlogic.gdx.files.FileHandle.read(FileHandle.java:134)
at com.badlogic.gdx.backends.android.AndroidFileHandle.read(AndroidFileHandle.java:78)
at com.badlogic.gdx.files.FileHandle.length(FileHandle.java:548)
at com.badlogic.gdx.backends.android.AndroidFileHandle.length(AndroidFileHandle.java:167)
at com.badlogic.gdx.files.FileHandle.estimateLength(FileHandle.java:229)
at com.badlogic.gdx.files.FileHandle.readString(FileHandle.java:194)
at com.badlogic.gdx.files.FileHandle.readString(FileHandle.java:187)
at com.badlogic.gdx.graphics.g3d.shaders.DefaultShader.getDefaultVertexShader(DefaultShader.java:409)
at com.badlogic.gdx.graphics.g3d.shaders.DefaultShader.<init>(DefaultShader.java:504)
at com.badlogic.gdx.graphics.g3d.shaders.DefaultShader.<init>(DefaultShader.java:500)
at com.badlogic.gdx.graphics.g3d.utils.DefaultShaderProvider.createShader(DefaultShaderProvider.java:46)
at com.badlogic.gdx.graphics.g3d.utils.BaseShaderProvider.getShader(BaseShaderProvider.java:34)
at com.badlogic.gdx.graphics.g3d.ModelBatch.render(ModelBatch.java:269)
at com.badlogic.gdx.tests.PathTest.render(PathTest.java:221)
at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(AndroidGraphics.java:391)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1523)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
03-30 16:37:51.401 5283-5283/com.badlogic.gdx.tests E/AndroidGraphics﹕ waiting for pause synchronization took too long; assuming deadlock and killing
03-30 16:37:51.521 475-517/system_process E/InputDispatcher﹕ channel '528ce2b4 com.badlogic.gdx.tests/com.badlogic.gdx.tests.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
Yes, my question is similar to this, but updating the library didn't helped
And yes, file com/badlogic/gdx/graphics/g3d/shaders/default.vertex.glsl in place
My code place here
The error is File not found, so apparently it cannot find the file. If you are sure the file is included, this might be caused by duplicate references (although it doesn't have to). For example if you include (and export) the gdx library in both your core and android project. You could check this by right clicking each project, click on Java Build Path and then the Order and Export tab. Make sure that the gdx project (or jar, depending if you work from source or nightly/stable) is only included (and exported by clicking the checkbox) in the core project.
However, having assets (which the shader files are) on the classpath is merely to support out-of-box rendering for libgdx. In your case would advise to copy the shader files to (a subfolder of) your assets folder and use those instead. That makes managing your assets a lot cleaner. You can load the shaders using the constructor of ModelBatch, e.g.:
modelbatch = new ModelBatch(Gdx.files.internal("data/default.vertex.glsl"), Gdx.files.internal("data/default.fragment.glsl"));
Of course, you still might want to double check your project configuration.
Please install Arm Transition on your Genymotion Emulator
Here is a detailed guide on How to install this transition :
How to install Google Play Services in a Genymotion VM (with no drag and drop support)?
I hope this helps.

Categories

Resources