running into ```e: org.jetbrains.kotlin.util.FileA...
# javascript
c
running into
Copy code
e: org.jetbrains.kotlin.util.FileAnalysisException: Somewhere in file /Users/casvanluijtelaar/Projects/***/deals/DealsOfferKey.kt: java.lang.NullPointerException: null cannot be cast to non-null type org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol
	at org.jetbrains.kotlin.util.AnalysisExceptionsKt.wrapIntoFileAnalysisExceptionIfNeeded(AnalysisExceptions.kt:62)
	at org.jetbrains.kotlin.fir.FirCliExceptionHandler.handleExceptionOnFileAnalysis(Utils.kt:251)
	at org.jetbrains.kotlin.fir.resolve.transformers.FirSupertypeResolverTransformer.transformFile(FirSupertypesResolution.kt:892)
	at org.jetbrains.kotlin.fir.declarations.FirFile.transform(FirFile.kt:46)
	at org.jetbrains.kotlin.fir.resolve.transformers.FirTransformerBasedResolveProcessor.processFile(FirResolveProcessor.kt:48)
	at org.jetbrains.kotlin.fir.resolve.transformers.FirTotalResolveProcessor.process(FirTotalResolveProcessor.kt:36)
	at org.jetbrains.kotlin.fir.pipeline.AnalyseKt.runResolution(analyse.kt:24)
	at org.jetbrains.kotlin.fir.pipeline.FirUtilsKt.resolveAndCheckFir(firUtils.kt:76)
when I try to build
jsBrowserDevelopmentLibraryDistribution
seems to throw on any file with kotlinx-serializable imported. e.g. this file only contains:
Copy code
import kotlinx.serialization.Serializable

@Serializable
data class DealsOfferKey(
    val offerId: Int,
    val offerInstanceUniqueId: String?,
)
removing the annotation and the import fixes the issue. but then errors on one of a million other files with serializable included. Anyone seen this before?
e
I think the first useful info would be the version of Kotlin and kotlinx-serialization.
c
kotlin: 2.1.21 serialization: 1.8.1
e
Compatible then. This might be a K2 bug
Report it on YouTrack, easier that way
👍 1
a
Yes, it looks like wither K2 or kotlinx.serialization issue. Could you please also check if the same issue occurred if you use other target (JVM or Native)?
c
doesn't look like it's happening on other targets (at least not android/iOS). strungelling a bit with creating a minimum reproducable example. running into different issues there.
a
If you need any guidance or help I could help you (just DM me)