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

Error loading page #65

Open
map7 opened this issue Oct 19, 2024 · 11 comments
Open

Error loading page #65

map7 opened this issue Oct 19, 2024 · 11 comments

Comments

@map7
Copy link

map7 commented Oct 19, 2024

I've followed the tutorial at https://native.hotwired.dev/android/getting-started and when I start the app through the 'Pixel 9 Pro API 30' emulator on Ubuntu 24.04 it fails to load the website displaying 'Error loading page'.

I'm using Android Studio 2024.2.1 Patch 1. I can create an empty Android app and start the 'Hello world' example fine.

@EmilioCristalli
Copy link

Are you using http for the startLocation?
If that's the case, you might have to add android:usesCleartextTraffic="true" to the <application> in the AndroidManifest, or one of the other solutions here https://stackoverflow.com/a/50834600 (I think Android doesn't allow http URLs in WebViews by default)

@map7
Copy link
Author

map7 commented Oct 20, 2024

I'm using https as in the tutorial

package au.map7.shopping
import android.os.Bundle
import dev.hotwire.navigation.activities.HotwireActivity
import dev.hotwire.navigation.navigator.NavigatorConfiguration

class MainActivity : HotwireActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
    }

    override fun navigatorConfigurations() = listOf(
        NavigatorConfiguration(
            name = "main",
            startLocation = "https://hotwire-native-demo.dev",
            navigatorHostId = R.id.main_nav_host
        )
    )
}

@map7
Copy link
Author

map7 commented Oct 20, 2024

Log

2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/content/res/ResourcesKey;-><init>(Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;ILandroid/content/res/Configuration;Landroid/content/res/CompatibilityInfo;[Landroid/content/res/loader/ResourcesLoader;)V (blacklist, linking, denied)
2024-10-20 11:30:22.016 21483-21483 chatty                  au.map7.shopping                     I  uid=10155(au.map7.shopping) identical 1 line
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/content/res/ResourcesKey;-><init>(Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;ILandroid/content/res/Configuration;Landroid/content/res/CompatibilityInfo;[Landroid/content/res/loader/ResourcesLoader;)V (blacklist, linking, denied)
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/app/ResourcesManager;->dump(Ljava/lang/String;Ljava/io/PrintWriter;)V (greylist-max-o, linking, denied)
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Lcom/android/internal/util/IndentingPrintWriter;-><init>(Ljava/io/Writer;Ljava/lang/String;)V (greylist, linking, allowed)
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Lcom/android/internal/util/IndentingPrintWriter;->increaseIndent()Lcom/android/internal/util/IndentingPrintWriter; (greylist, linking, allowed)
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden field Landroid/app/ResourcesManager;->mLoadedApkAssets:Landroid/util/LruCache; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.016 21483-21483 chatty                  au.map7.shopping                     I  uid=10155(au.map7.shopping) identical 5 lines
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden field Landroid/app/ResourcesManager;->mLoadedApkAssets:Landroid/util/LruCache; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden field Landroid/app/ResourcesManager;->mCachedApkAssets:Landroid/util/ArrayMap; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/app/ResourcesManager;->countLiveReferences(Ljava/util/Collection;)I (greylist-max-o, linking, denied)
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden field Landroid/app/ResourcesManager;->mCachedApkAssets:Landroid/util/ArrayMap; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/app/ResourcesManager;->countLiveReferences(Ljava/util/Collection;)I (greylist-max-o, linking, denied)
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/app/ResourcesManager;->getAdjustedDisplay(ILandroid/content/res/Resources;)Landroid/view/Display; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/hardware/display/DisplayManagerGlobal;->getCompatibleDisplay(ILandroid/content/res/Resources;)Landroid/view/Display; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/app/ResourcesManager;->getConfiguration()Landroid/content/res/Configuration; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/app/ResourcesManager;->getDisplayMetrics()Landroid/util/DisplayMetrics; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden field Landroid/view/DisplayAdjustments;->DEFAULT_DISPLAY_ADJUSTMENTS:Landroid/view/DisplayAdjustments; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/app/ResourcesManager;->getDisplayMetrics(ILandroid/view/DisplayAdjustments;)Landroid/util/DisplayMetrics; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/app/ResourcesManager;->getDisplayMetrics(ILandroid/view/DisplayAdjustments;)Landroid/util/DisplayMetrics; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/app/ResourcesManager;->getAdjustedDisplay(ILandroid/view/DisplayAdjustments;)Landroid/view/Display; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/app/ResourcesManager;->getResources(Landroid/os/IBinder;Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;ILandroid/content/res/Configuration;Landroid/content/res/CompatibilityInfo;Ljava/lang/ClassLoader;Ljava/util/List;)Landroid/content/res/Resources; (blacklist, linking, denied)
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/content/res/ResourcesKey;-><init>(Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;ILandroid/content/res/Configuration;Landroid/content/res/CompatibilityInfo;[Landroid/content/res/loader/ResourcesLoader;)V (blacklist, linking, denied)
2024-10-20 11:30:22.016 21483-21483 chatty                  au.map7.shopping                     I  uid=10155(au.map7.shopping) identical 1 line
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/content/res/ResourcesKey;-><init>(Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;ILandroid/content/res/Configuration;Landroid/content/res/CompatibilityInfo;[Landroid/content/res/loader/ResourcesLoader;)V (blacklist, linking, denied)
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/app/ResourcesManager;->invalidatePath(Ljava/lang/String;)V (greylist-max-o, linking, denied)
2024-10-20 11:30:22.016 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/content/res/ResourcesKey;->isPathReferenced(Ljava/lang/String;)Z (greylist-max-o, linking, denied)
2024-10-20 11:30:22.017 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden field Landroid/app/ResourcesManager;->mCachedApkAssets:Landroid/util/ArrayMap; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.017 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden field Landroid/app/ResourcesManager;->mCachedApkAssets:Landroid/util/ArrayMap; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.017 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden field Landroid/app/ResourcesManager$ApkKey;->path:Ljava/lang/String; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.017 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden field Landroid/app/ResourcesManager;->mCachedApkAssets:Landroid/util/ArrayMap; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.017 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/content/res/ApkAssets;->close()V (blacklist, linking, denied)
2024-10-20 11:30:22.017 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden field Landroid/app/ResourcesManager;->mCachedApkAssets:Landroid/util/ArrayMap; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.017 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden field Landroid/app/ResourcesManager$ApkKey;->path:Ljava/lang/String; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.017 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden field Landroid/app/ResourcesManager;->mCachedApkAssets:Landroid/util/ArrayMap; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.017 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/content/res/ApkAssets;->close()V (blacklist, linking, denied)
2024-10-20 11:30:22.017 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/app/ResourcesManager;->isSameResourcesOverrideConfig(Landroid/os/IBinder;Landroid/content/res/Configuration;)Z (greylist-max-o, linking, denied)
2024-10-20 11:30:22.017 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden field Landroid/app/ResourcesManager$ActivityResources;->overrideConfig:Landroid/content/res/Configuration; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.017 21483-21483 chatty                  au.map7.shopping                     I  uid=10155(au.map7.shopping) identical 1 line
2024-10-20 11:30:22.017 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden field Landroid/app/ResourcesManager$ActivityResources;->overrideConfig:Landroid/content/res/Configuration; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.017 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/content/res/Configuration;->diffPublicOnly(Landroid/content/res/Configuration;)I (greylist-max-o, linking, denied)
2024-10-20 11:30:22.017 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/app/ResourcesManager;->overrideTokenDisplayAdjustments(Landroid/os/IBinder;Ljava/util/function/Consumer;)Z (blacklist, linking, denied)
2024-10-20 11:30:22.017 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden field Landroid/app/ResourcesManager$ActivityResources;->activityResources:Ljava/util/ArrayList; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.017 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/content/res/Resources;->overrideDisplayAdjustments(Ljava/util/function/Consumer;)V (blacklist, linking, denied)
2024-10-20 11:30:22.017 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/app/ResourcesManager;->updateResourcesForActivity(Landroid/os/IBinder;Landroid/content/res/Configuration;IZ)V (greylist-max-o, linking, denied)
2024-10-20 11:30:22.017 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/app/ResourcesManager;->getOrCreateActivityResourcesStructLocked(Landroid/os/IBinder;)Landroid/app/ResourcesManager$ActivityResources; (greylist-max-o, linking, denied)
2024-10-20 11:30:22.040 21483-21483 u.map7.shoppin          au.map7.shopping                     I  The ClassLoaderContext is a special shared library.
2024-10-20 11:30:22.170 21483-21483 NetworkSecurityConfig   au.map7.shopping                     D  No Network Security Config specified, using platform default
2024-10-20 11:30:22.170 21483-21483 NetworkSecurityConfig   au.map7.shopping                     D  No Network Security Config specified, using platform default
2024-10-20 11:30:22.191 21483-21513 libEGL                  au.map7.shopping                     D  loaded /vendor/lib/egl/libEGL_emulation.so
2024-10-20 11:30:22.192 21483-21513 libEGL                  au.map7.shopping                     D  loaded /vendor/lib/egl/libGLESv1_CM_emulation.so
2024-10-20 11:30:22.193 21483-21513 libEGL                  au.map7.shopping                     D  loaded /vendor/lib/egl/libGLESv2_emulation.so
2024-10-20 11:30:22.217 21483-21483 AppCompatDelegate       au.map7.shopping                     D  Checking for metadata for AppLocalesMetadataHolderService : Service not found
2024-10-20 11:30:22.287 21483-21483 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
2024-10-20 11:30:22.308 21483-21483 WebViewFactory          au.map7.shopping                     I  Loading com.google.android.webview version 83.0.4103.106 (code 410410681)
2024-10-20 11:30:22.310 21483-21483 u.map7.shoppin          au.map7.shopping                     I  The ClassLoaderContext is a special shared library.
2024-10-20 11:30:22.311 21483-21483 nativeloader            au.map7.shopping                     D  classloader namespace configured for unbundled product apk. library_path=/product/app/WebViewGoogle/lib/x86:/product/app/WebViewGoogle/WebViewGoogle.apk!/lib/x86:/product/app/TrichromeLibrary/TrichromeLibrary.apk!/lib/x86:/product/lib:/system/product/lib
2024-10-20 11:30:22.320 21483-21483 u.map7.shoppin          au.map7.shopping                     I  The ClassLoaderContext is a special shared library.
2024-10-20 11:30:22.320 21483-21483 nativeloader            au.map7.shopping                     D  classloader namespace configured for unbundled product apk. library_path=/product/app/WebViewGoogle/lib/x86:/product/app/WebViewGoogle/WebViewGoogle.apk!/lib/x86:/product/app/TrichromeLibrary/TrichromeLibrary.apk!/lib/x86:/product/lib:/system/product/lib
2024-10-20 11:30:22.403 21483-21483 cr_LibraryLoader        au.map7.shopping                     I  Loaded native library version number "83.0.4103.106"
2024-10-20 11:30:22.404 21483-21483 cr_CachingUmaRecorder   au.map7.shopping                     I  Flushed 3 samples from 3 histograms.
2024-10-20 11:30:22.421 21483-21483 TetheringManager        au.map7.shopping                     I  registerTetheringEventCallback:au.map7.shopping
2024-10-20 11:30:22.432 21483-21538 chromium                au.map7.shopping                     W  [WARNING:dns_config_service_posix.cc(341)] Failed to read DnsConfig.
2024-10-20 11:30:22.743 21483-21483 Choreographer           au.map7.shopping                     I  Skipped 33 frames!  The application may be doing too much work on its main thread.
2024-10-20 11:30:22.758 21483-21511 HostConnection          au.map7.shopping                     D  HostConnection::get() New Host Connection established 0xf06fa850, tid 21511
2024-10-20 11:30:22.764 21483-21511 HostConnection          au.map7.shopping                     D  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_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_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0 
2024-10-20 11:30:22.766 21483-21511 OpenGLRenderer          au.map7.shopping                     W  Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
2024-10-20 11:30:22.768 21483-21511 EGL_emulation           au.map7.shopping                     D  eglCreateContext: 0xf06fbea0: maj 3 min 0 rcv 3
2024-10-20 11:30:22.770 21483-21511 EGL_emulation           au.map7.shopping                     D  eglMakeCurrent: 0xf06fbea0: ver 3 0 (tinfo 0xc0e0a9f0) (first time)
2024-10-20 11:30:22.778 21483-21511 Gralloc4                au.map7.shopping                     I  mapper 4.x is not supported
2024-10-20 11:30:22.779 21483-21511 HostConnection          au.map7.shopping                     D  createUnique: call
2024-10-20 11:30:22.780 21483-21511 HostConnection          au.map7.shopping                     D  HostConnection::get() New Host Connection established 0xf06fc680, tid 21511
2024-10-20 11:30:22.780 21483-21511 goldfish-address-space  au.map7.shopping                     D  allocate: Ask for block of size 0x100
2024-10-20 11:30:22.780 21483-21511 goldfish-address-space  au.map7.shopping                     D  allocate: ioctl allocate returned offset 0x3efffe000 size 0x2000
2024-10-20 11:30:22.843 21483-21511 HostConnection          au.map7.shopping                     D  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_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_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0 
2024-10-20 11:30:22.928 21483-21483 Hotwire-Core            au.map7.shopping                     W  bridgeNotInitializedForWebView .... [https://hotwire-native-demo.dev]
2024-10-20 11:30:22.938 21483-21483 HostConnection          au.map7.shopping                     D  HostConnection::get() New Host Connection established 0xbc5019e0, tid 21483
2024-10-20 11:30:22.948 21483-21483 HostConnection          au.map7.shopping                     D  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_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_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0 
2024-10-20 11:30:22.950 21483-21483 EGL_emulation           au.map7.shopping                     D  eglCreateContext: 0xbc501b30: maj 3 min 0 rcv 3
2024-10-20 11:30:22.950 21483-21483 EGL_emulation           au.map7.shopping                     D  eglMakeCurrent: 0xbc501b30: ver 3 0 (tinfo 0xc0e06650) (first time)
2024-10-20 11:30:22.978 21483-21531 u.map7.shoppin          au.map7.shopping                     W  Accessing hidden method Landroid/media/AudioManager;->getOutputLatency(I)I (greylist, reflection, allowed)
2024-10-20 11:30:22.979 21483-21560 HostConnection          au.map7.shopping                     D  HostConnection::get() New Host Connection established 0xbc503110, tid 21560
2024-10-20 11:30:22.985 21483-21531 cr_media                au.map7.shopping                     W  Requires BLUETOOTH permission
2024-10-20 11:30:22.991 21483-21560 HostConnection          au.map7.shopping                     D  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_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_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0 
2024-10-20 11:30:23.069 21483-21560 VideoCapabilities       au.map7.shopping                     I  Unsupported profile 4 for video/mp4v-es
2024-10-20 11:30:23.070 21483-21560 cr_MediaCodecUtil       au.map7.shopping                     W  HW encoder for video/avc is not available on this device.
2024-10-20 11:30:23.072 21483-21560 EGL_emulation           au.map7.shopping                     D  eglCreateContext: 0xbc505790: maj 3 min 0 rcv 3
2024-10-20 11:30:23.073 21483-21560 EGL_emulation           au.map7.shopping                     D  eglMakeCurrent: 0xbc505790: ver 3 0 (tinfo 0xc0e13110) (first time)
2024-10-20 11:30:23.391 21483-21505 System                  au.map7.shopping                     W  A resource failed to call close. 
2024-10-20 11:30:24.017 21483-21483 chromium                au.map7.shopping                     I  [INFO:CONSOLE(0)] "Uncaught TypeError: Failed to resolve module specifier "@hotwired/turbo". Relative references must start with either "/", "./", or "../".", source: https://hotwire-native-demo.dev/ (0)
2024-10-20 11:30:28.437 21483-21580 ProfileInstaller        au.map7.shopping                     D  Installing profile for au.map7.shopping
2024-10-20 11:31:21.140 21483-21499 u.map7.shoppin          au.map7.shopping                     I  Thread[6,tid=21499,WaitingInMainSignalCatcherLoop,Thread*=0xe2acc410,peer=0x13d00268,"Signal Catcher"]: reacting to signal 3
2024-10-20 11:31:21.140 21483-21499 u.map7.shoppin          au.map7.shopping                     I  
2024-10-20 11:31:21.375 21483-21499 u.map7.shoppin          au.map7.shopping                     I  Wrote stack traces to tombstoned
2024-10-20 11:31:25.220 21483-21725 u.map7.shoppin          au.map7.shopping                     E  Invalid ID 0x00000001.
2024-10-20 11:31:25.227 21483-21725 WebView                 au.map7.shopping                     W  java.lang.Throwable: A WebView method was called on thread 'Binder:21483_4'. All WebView methods must be called on the same thread. (Expected Looper Looper (main, tid 2) {c99eac4} called on null, FYI main Looper is Looper (main, tid 2) {c99eac4})
                                                                                                    	at android.webkit.WebView.checkThread(WebView.java:2592)
                                                                                                    	at android.webkit.WebView.encodeProperties(WebView.java:3073)
                                                                                                    	at android.view.View.encode(View.java:29945)
                                                                                                    	at android.view.ViewGroup.encodeProperties(ViewGroup.java:9248)
                                                                                                    	at android.view.View.encode(View.java:29945)
                                                                                                    	at android.view.ViewGroup.encodeProperties(ViewGroup.java:9248)
                                                                                                    	at android.widget.FrameLayout.encodeProperties(FrameLayout.java:413)
                                                                                                    	at android.view.View.encode(View.java:29945)
                                                                                                    	at android.view.ViewGroup.encodeProperties(ViewGroup.java:9248)
                                                                                                    	at android.view.View.encode(View.java:29945)
                                                                                                    	at android.view.ViewGroup.encodeProperties(ViewGroup.java:9248)
                                                                                                    	at android.widget.FrameLayout.encodeProperties(FrameLayout.java:413)
                                                                                                    	at android.view.View.encode(View.java:29945)
                                                                                                    	at android.view.ViewGroup.encodeProperties(ViewGroup.java:9248)
                                                                                                    	at android.widget.FrameLayout.encodeProperties(FrameLayout.java:413)
                                                                                                    	at android.view.View.encode(View.java:29945)
                                                                                                    	at android.view.ViewGroup.encodeProperties(ViewGroup.java:9248)
                                                                                                    	at android.widget.FrameLayout.encodeProperties(FrameLayout.java:413)
                                                                                                    	at android.view.View.encode(View.java:29945)
                                                                                                    	at android.view.ViewGroup.encodeProperties(ViewGroup.java:9248)
                                                                                                    	at android.widget.LinearLayout.encodeProperties(LinearLayout.java:1965)
                                                                                                    	at android.view.View.encode(View.java:29945)
                                                                                                    	at android.view.ViewGroup.encodeProperties(ViewGroup.java:9248)
                                                                                                    	at android.widget.FrameLayout.encodeProperties(FrameLayout.java:413)
                                                                                                    	at android.view.View.encode(View.java:29945)
                                                                                                    	at android.view.ViewGroup.encodeProperties(ViewGroup.java:9248)
                                                                                                    	at android.widget.LinearLayout.encodeProperties(LinearLayout.java:1965)
                                                                                                    	at android.view.View.encode(View.java:29945)
                                                                                                    	at android.view.ViewGroup.encodeProperties(ViewGroup.java:9248)
                                                                                                    	at android.widget.FrameLayout.encodeProperties(FrameLayout.java:413)
                                                                                                    	at android.view.View.encode(View.java:29945)
                                                                                                    	at android.view.ViewDebug.dumpEncoded(ViewDebug.java:1215)
                                                                                                    	at android.view.ViewDebug.dispatchCommand(ViewDebug.java:543)
                                                                                                    	at android.view.ViewRootImpl$W.executeCommand(ViewRootImpl.java:9199)
                                                                                                    	at android.view.IWindow$Stub.onTransact(IWindow.java:297)
                                                                                                    	at android.os.Binder.execTransactInternal(Binder.java:1159)
                                                                                                    	at android.os.Binder.execTransact(Binder.java:1123)

@crmne
Copy link

crmne commented Oct 22, 2024

Having the same issue in https://github.com/crmne/cluster-headache-tracker-android

@EmilioCristalli
Copy link

@crmne that repo seems to be working for me
image

maybe try adding this to see if there are any errors in the logs?

        Hotwire.config.debugLoggingEnabled = true
        Hotwire.config.webViewDebuggingEnabled = true

@EmilioCristalli
Copy link

@map7 do you have a public repo where you can reproduce the error?
does https://hotwire-native-demo.dev work fine if you open it in a browser in the Android simulator?
you can also try the debug logs

        Hotwire.config.debugLoggingEnabled = true
        Hotwire.config.webViewDebuggingEnabled = true

@crmne
Copy link

crmne commented Oct 22, 2024

@crmne that repo seems to be working for me image

maybe try adding this to see if there are any errors in the logs?

        Hotwire.config.debugLoggingEnabled = true
        Hotwire.config.webViewDebuggingEnabled = true

Thanks for the reply @EmilioCristalli !

It works there because I set minSdk = 32 otherwise locally it failed with these older devices. Hotwire Native should be compatible with every device with SDK > 28 however.

Note that while working locally, it is still failing in Google Play console with SDK 33 as shown by this screenshot:
Screenshot 2024-10-22 at 15 24 18

Here's a debug log from a locally emulated tablet with SDK 30:
sdk30.log

@EmilioCristalli
Copy link

@crmne It looks like your page is returning a 406, if you open the same url from a browser you can also see the error

image

@crmne
Copy link

crmne commented Oct 23, 2024

@EmilioCristalli thank you! I wasn't aware of how Hotwire throws errors in case of a 406. That is because by default Rails does this:

class ApplicationController < ActionController::Base
  # Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has.
  allow_browser versions: :modern
end

I now commented it out and it works also on older devices. It would be great to add this to the guide so people don't stumble upon the same thing.

@map7
Copy link
Author

map7 commented Oct 24, 2024

I can also verify that if I change the 'minSdk' from 28 to 32, and I use the "Pixel 9 Pro API 33" device the Hotwire Native Demo works

map7 added a commit to map7/hotwire-native-site that referenced this issue Oct 24, 2024
Updated the API recommendation so that the hotwire demo app will load in the emulator. Ref: hotwired/hotwire-native-android#65
@map7
Copy link
Author

map7 commented Oct 24, 2024

I've pushed a change to the documentation to clarify this on the Getting Started page.

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

No branches or pull requests

3 participants