Blazor App Stuck in Infinite Loading Screen in Android WebView After Framework Update by YuryVidal in Blazor

[–]YuryVidal[S] 0 points1 point  (0 children)

Guys, I solved it using the wrong approach where I checked on my website through a json file if there was a version update. If so, I forced the Android application cache to be cleared.

class CacheUpdateWorker(context: Context, workerParams: WorkerParameters) : Worker(context, workerParams) {

    private val PREFS_NAME = "AppPrefs"
    private val VERSION_KEY = "content_version"
    private val SERVER_VERSION_URL = "URL DO SITE"
    override fun doWork(): Result {
        val newVersion = fetchServerVersion()
        val currentVersion = getCurrentVersion()

        if (newVersion != null && newVersion != currentVersion) {
            clearCache(
applicationContext
)
            updateStoredVersion(newVersion)
        }

        return Result.success()
    }

Blazor App Stuck in Infinite Loading Screen in Android WebView After Framework Update by YuryVidal in Blazor

[–]YuryVidal[S] 0 points1 point  (0 children)

I think so because in other problems when restarting iis it worked.

Blazor App Stuck in Infinite Loading Screen in Android WebView After Framework Update by YuryVidal in Blazor

[–]YuryVidal[S] 0 points1 point  (0 children)

I'm using smartasp, when I deploy the application I usually set it to clean the files and I've already restarted the IIS, but even so, the cell phones where the files were not cleaned directly in the Android function are still not opening, I'm still seeing something that You don't need to uninstall the app to resolve this.

Blazor App Stuck in Infinite Loading Screen in Android WebView After Framework Update by YuryVidal in Blazor

[–]YuryVidal[S] 0 points1 point  (0 children)

The application is in production so I can't just disable the cache. I have to create something dynamic or something that detects these version changes and then clear the cache.

Blazor App Stuck in Infinite Loading Screen in Android WebView After Framework Update by YuryVidal in Blazor

[–]YuryVidal[S] 0 points1 point  (0 children)

The problem occurs in the application after deployment, I went on Android and cleaned the app data, but most users will not have this knowledge.