paperweight icon indicating copy to clipboard operation
paperweight copied to clipboard

Build error: "Malformed input or input contains unmappable characters" on "generate mappings" task

Open yukijoou opened this issue 2 years ago • 2 comments

I followed the instructions at https://docs.papermc.io/paper/dev/userdev, and got the following build.gradle.kts

plugins {
    kotlin("jvm") version "1.9.0"
    id("io.papermc.paperweight.userdev") version "1.5.5"
}

group = "net.yukijoou"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
    maven("https://repo.papermc.io/repository/maven-public/")
}

dependencies {
    // compileOnly("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT")
    paperweight.paperDevBundle("1.20.1-R0.1-SNAPSHOT")
}

kotlin {
    jvmToolchain(8)
}

java {
    toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}

and settings.gradle.kts

pluginManagement {
    repositories {
        mavenCentral()
        gradlePluginPortal()
        maven("https://repo.papermc.io/repository/maven-public/")
    }
}

plugins {
    id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0"
}

rootProject.name = "osc"

But when building the project, I get the following error

There was a failure while executing work items
A failure occurred while executing io.papermc.paperweight.tasks.GenerateMappings$GenerateMappingsAction
Malformed input or input contains unmappable characters: [project root]/.gradle/caches/paperweight/mappings/server_mappings.txt

Running gradle tasks from IntelliJ or the terminal doesn't change anything, setting LC_ALL=en_US.UTF-8 doesn't help.

yukijoou avatar Sep 16 '23 20:09 yukijoou

What is the content of that file? Try deleting the cache too

MiniDigger avatar Sep 17 '23 11:09 MiniDigger

I tried deleting the cache and it re-downloads the same file, with the same issue.

Here is the file: server_mappings.txt

yukijoou avatar Sep 17 '23 12:09 yukijoou

This is an encoding issue with the file path: https://stackoverflow.com/questions/39185613/java-nio-file-invalidpathexception-malformed-input-or-input-contains-unmappable

I suspect you have some "unmappable" characters in the part of the file path that you truncated from the error message.

This is something that you need to resolve within your environment. Feel free to report back with details about what fixes it for you though!

jpenilla avatar Apr 01 '24 18:04 jpenilla