0

I'm trying to set up Kotlin/JS sub-module in my gradle project and faced with a trouble that Google Chrome isn't able to load a source map with NPE error

webpack-internal:///./kotlin-dce-dev/kotlin.js:43104 Uncaught NullPointerException
[WDS] Live Reloading enabled.
DevTools failed to load SourceMap: Could not load content for chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/injectGlobalHook.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME

This is module's build.gradle.kts

plugins {
    id("org.jetbrains.kotlin.js") version "1.4.10"
}

group = "org.org.foo"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
    jcenter()
    maven(url = "https://dl.bintray.com/kotlin/kotlin-dev")
}

dependencies {
    implementation(kotlin("stdlib-js"))
    implementation("org.jetbrains.kotlinx:kotlinx-html-js:0.7.1")
}

kotlin {
    js {
        browser {
            webpackTask {
                cssSupport.enabled = true
            }

            runTask {
                cssSupport.enabled = true
            }

            testTask {
                useKarma {
                    useChromeHeadless()
                    webpackConfig.cssSupport.enabled = true
                }
            }

        }
        binaries.executable()
    }
}

Could some tell me please where I'm wrong?

2 Answers2

1

It seems to be an issue with the "React Developer Tools" Chrome extension - see this answer. Try to run your app in an anonymous tab without extensions to confirm it is really related to your own code.

João Melo
  • 784
  • 6
  • 16
0

I had some strange trouble with React Dev Chrome extension. After I uninstalled it, source map become pushed to hrome OK.