Closed Kl3tus closed 3 years ago
Hi there.
The application is a Android web view application and is heavily focused on it, as this application does not use any APIs. The white screen on app launch unfortunately is the web view element loading the actual webpage, before the web page has actually been loaded. This issue is one I am already aware of and may be able to fix in the future using a splash screen to hide the web page loading, but so far have not gotten to yet due to it not fully impacting the use of the application, and only being a minor issue.
In terms of the white no response, that would be because the webpage has not loaded properly.
To better solve this issue, can you please tell me which version of the NAI APK you had used?
Currently there are two releases, version 1.0 and version 1.0.1. Version 1.0 being the stable version where everything has so far worked, except of course issue 1 where the import and export is not working due to the files being JSON files and Android handling JSON files differently when downloading. Version 1.0.1, a beta release of a future stable update which currently includes progress of code that is able to handle file downloading, however not yet JSON files. Version 1.0.1 is a version that I have been messing around with, including which webpage is to be loaded by the web APK, at which I may have inputted the wrong URL for it to load, and therefore is not loading, and version 1.0 is one that I know is stable so far.
However though, it is possible that there are external sources that may be affecting this the web view element from properly loading.
One of them may be the internet speed, if there are any filters that are blocking the NAI url, and how busy the NAI back end service was at the time.
I currently do not have Android Studio properly set up yet to check this with Android Pie (Android 9.0), but I will check this and test it as soon as I can.
Thank you for reporting this, and hopefully I can get back to you quickly with more information.
Tested version 1.0.1 on Android 9, the issue has been duplicated and is consistent.
Further tests will be conducted on lower versions of Android and higher versions of Android to determine the scope of the issue.
Version 1.0 will soon be tested to determine if any code changes from 1.0 to 1.0.1 is the cause of the issue, and with that against all Android versions to determine if there is any damage.
Note to testers: When testing NAI, you may need to update the Chrome browser to be able to properly view the NAI website as it appears to be rejecting AJAX, as the default Chrome in the Android Studio emulator has failed to load NAI.
Thank you @Kl3tus for bringing this issue up, now we've just gotta find out the cause and how to fix it.
Also as you can see from below, so far it looks like 1.0.1 is dead somehow, I have absolutely no idea how, but it's basically dead. I'm really sorry for this guys.
(API 27 - 30)
Update
Tested on Version 1.0, nothing is working, I have no idea what is happening, no codes have been changed so far. Currently trying out some stuff to see if it works, but no success so far.
Edit:
Current lead is the following screenshot below:
E/chromium: [ERROR:ssl_client_socket_impl.cc(959)] handshake failed; returned -1, SSL error code 1, net_error -201
This is one of the only errors that I think would effect the following application. This is tested on Version 1.0.
The other errors are below:
I am not sure of these errors though.
Update Version: 1.0
After some time, I've discovered that there has been another issue, that was Line 21.
Caused some fatal issues and I have had to remove it. The app is now able to consistently display other websites using the webview element. Websites tested are Google, Gabbage and Gab Tobing.
Samsung 9 to the left, the latest version on the right.
However, issues still persist in attempting to load Novel AI.
Samsung 9 to the left, the latest version on the right.
Noticed issue not present in loading other webpages:
E/chromium: [ERROR:ssl_client_socket_impl.cc(946)] handshake failed; returned -1, SSL error code 1, net_error -201
The SSL connection is not established and therefore we are stuck on the blank page. Still trying to figure out how to solve this sadly.
Complete run log:
09/05 01:55:11: Launching 'app' on Pixel 3a XL API 29. Install successfully finished in 961 ms. $ adb shell am start -n "com.example.novelai/com.example.novelai.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Connected to process 8896 on device 'Pixel_3a_XL_API_29 [emulator-5556]'. Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page. D/libEGL: Emulator has host GPU support, qemu.gles is set to 1. W/libc: Unable to set property "qemu.gles" to "1": connection failed; errno=13 (Permission denied) D/libEGL: loaded /vendor/lib/egl/libEGL_emulation.so W/RenderThread: type=1400 audit(0.0:40): avc: denied { write } for name="property_service" dev="tmpfs" ino=9026 scontext=u:r:untrusted_app:s0:c146,c256,c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0 app=com.example.novelai D/libEGL: loaded /vendor/lib/egl/libGLESv1_CM_emulation.so D/libEGL: loaded /vendor/lib/egl/libGLESv2_emulation.so W/example.novela: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed) Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed) I/WebViewFactory: Loading com.google.android.webview version 74.0.3729.185 (code 373018518) I/example.novela: The ClassLoaderContext is a special shared library. I/example.novela: The ClassLoaderContext is a special shared library. I/cr_LibraryLoader: Time to load native libraries: 1 ms (timestamps 4713-4714) I/chromium: [INFO:library_loader_hooks.cc(50)] Chromium logging enabled: level = 0, default verbosity = 0 I/cr_LibraryLoader: Expected native library version number "74.0.3729.185", actual native library version number "74.0.3729.185" W/cr_ChildProcLH: Create a new ChildConnectionAllocator with package name = com.google.android.webview, sandboxed = true W/example.novela: Accessing hidden method Landroid/content/Context;->bindServiceAsUser(Landroid/content/Intent;Landroid/content/ServiceConnection;ILandroid/os/Handler;Landroid/os/UserHandle;)Z (greylist, reflection, allowed) I/cr_BrowserStartup: Initializing chromium process, singleProcess=false W/example.novela: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;-><init>(Landroid/content/Context;I)V (greylist, reflection, allowed) Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logEvent(Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;)V (greylist, reflection, allowed) Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionStarted(I)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(II)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextSelection;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(III)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(IIILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) W/cr_media: Requires BLUETOOTH permission D/HostConnection: HostConnection::get() New Host Connection established 0xdbb57e20, tid 8980 D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_3_1 D/EGL_emulation: eglCreateContext: 0xdbb1b4a0: maj 3 min 1 rcv 4 D/EGL_emulation: eglMakeCurrent: 0xdbb1b4a0: ver 3 1 (tinfo 0xc2cd0d50) E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da glUtilsParamSize: unknow param 0x000082da W/example.novela: Accessing hidden method Landroid/view/View;->getViewRootImpl()Landroid/view/ViewRootImpl; (greylist, reflection, allowed) Accessing hidden field Landroid/view/View$AttachInfo;->mVisibleInsets:Landroid/graphics/Rect; (greylist, reflection, allowed) Accessing hidden field Landroid/view/ViewRootImpl;->mAttachInfo:Landroid/view/View$AttachInfo; (greylist, reflection, allowed) D/HostConnection: HostConnection::get() New Host Connection established 0xd8675050, tid 8927 D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_3_1 W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without... I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es W/cr_MediaCodecUtil: HW encoder for video/avc is not available on this device. D/EGL_emulation: eglCreateContext: 0xd867bb60: maj 3 min 1 rcv 4 D/EGL_emulation: eglMakeCurrent: 0xd867bb60: ver 3 1 (tinfo 0xe3c39190) E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da glUtilsParamSize: unknow param 0x000082da W/Gralloc3: mapper 3.x is not supported D/HostConnection: createUnique: call D/HostConnection: HostConnection::get() New Host Connection established 0xc47013e0, tid 8927 HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_3_1 D/eglCodecCommon: allocate: Ask for block of size 0x1000 allocate: ioctl allocate returned offset 0x3ffff4000 size 0x2000 D/EGL_emulation: eglMakeCurrent: 0xd867bb60: ver 3 1 (tinfo 0xe3c39190) D/EGL_emulation: eglCreateContext: 0xdbb1c700: maj 3 min 0 rcv 3 D/EGL_emulation: eglMakeCurrent: 0xdbb1c700: ver 3 0 (tinfo 0xc2cd0d50) E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef glUtilsParamSize: unknow param 0x000088ef E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef glUtilsParamSize: unknow param 0x000088ef E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef glUtilsParamSize: unknow param 0x000088ef D/NetworkSecurityConfig: No Network Security Config specified, using platform default E/chromium: [ERROR:ssl_client_socket_impl.cc(946)] handshake failed; returned -1, SSL error code 1, net_error -201
Update Version 1.0
We have progress and are able to actually go into the NAI website.
Thanks to Etornam Sunu, the code to handle the SSL exception was resolved. The code has however been changed to immedately accept the SSL connection (basically proceed) instead of having to show the dialogue. This code edit was done for the sake of the user and the fact that we know the destination URL is consistent.
In the above image, I have disabled Java Script in order to test the code or see if we were actually on the NAI website. It appears that we are having AJAX or dynamic code issues again, and the previous video explaining on how to fix it no longer works on this new code, I have no idea why, still looking into it.
Full credits will be displayed on the read me file when the application is updated.
Update Version 1.0
Hi there @Kl3tus,
I've just released version 1.2 which appears to have solved this issue of not being able to load the NAI website due to an SSL issue.
The app is now working on API 30, however API 29 and below are having AJAX/dynamic content issues that are preventing the website from loading properly (showing content that is dynamic).
Since I think the issue for this specific problem has been resolved, I will close this issue, however I will also start a new issue to solve the AJAX problem for API 29 and below.
If the problem still persists of the white screen, you should be able to still comment in this issue, and I will re-open the issue (if I can, I am not sure how Git Hub works). For any other issues, please start a new issue in the issues tab of the Git Hub repository.
Thank you for informing me of the problem and for helping to make the unofficial NAI web APK better, Gabriel :D
Screen is white on app launch, Stays white with no response
Galaxy S8+, android 9, snapdragon 835 variant.