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

Browser not working on desktop release version #207

Open
sambuddha90 opened this issue Jul 30, 2024 · 0 comments
Open

Browser not working on desktop release version #207

sambuddha90 opened this issue Jul 30, 2024 · 0 comments

Comments

@sambuddha90
Copy link

I have modified the KCEF initializer code as follows:


val homePath: String = System.getProperty("user.home")
const val supportPath = "/Library/Application Support/com.swiggy.merch.editor"
val bundleLocation = File("$homePath$supportPath")

LaunchedEffect(Unit) {
    withContext(Dispatchers.IO) {
        val homePath: String = System.getProperty("user.home")
           const val supportPath = "/Library/Application Support/com.swiggy.merch.editor"
            val bundleLocation = File("$homePath$supportPath")
        KCEF.init(builder = {
            installDir(File(bundleLocation,"kcef-bundle"))
            progress {
                onDownloading {
                    downloading = it
                }
                onInitialized {
                    initialized = true
                    onInitializationFinished.invoke()
                }
            }
            release("jbr-release-17.0.10b1087.23")
            settings {
                cachePath = "$homePath$supportPath/cache"
                windowlessRenderingEnabled = true
            }
        }, onError = {
            it?.printStackTrace()
        }, onRestartRequired = {
            restartRequired = true
        })
    }
}

if (restartRequired) {
    Text(text = "Configuration download complete. Please restart your application..", modifier = modifier)
} else {
    if (downloading < 100F && initialized.not()) {
        Column(modifier = modifier.fillMaxSize(), verticalArrangement = Arrangement.Center) {
            Text("$downloading % Downloaded..", modifier = Modifier.align(Alignment.CenterHorizontally))
            LinearProgressIndicator((downloading/100f), modifier = Modifier.width(100.dp).align(Alignment.CenterHorizontally))
        }
    }
}

DisposableEffect(Unit) {
    onDispose {
        KCEF.disposeBlocking()
    }
}

}


I have created a release dmg and running on macOs: 14.4 (23E214) (apple silicon chip). The download gets completed but the browser does not load.

console Log:

ERROR:disk_cache.cc(205)] Unable to create cache
ERROR:gpu_disk_cache.cc(673)] Gpu Cache Creation failed: -2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant