You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.
As per the docs for Class.getResourceAsStream, any resources in a jar are encapsulated if that class is in a named module. This means that the binary resources for kmp-tor cannot be loaded by Extractor.kt, since in a modular setting it is in a different jar and therefore module.
The following error occurs:
io.matthewnelson.kmp.tor.manager.common.exceptions.TorManagerException: io.matthewnelson.kmp.tor.binary.extract.ExtractionException: Resource not found: kmptor/geoip.gz
at [email protected]/io.matthewnelson.kmp.tor.TorConfigProviderJvm.extractGeoIpV4File(TorConfigProviderJvm.kt:63)
at [email protected]/io.matthewnelson.kmp.tor.manager.TorConfigProvider.retrieve$kmp_tor_manager(TorConfigProvider.kt:253)
at [email protected]/io.matthewnelson.kmp.tor.manager.KmpTorLoader$load$validated$1.invokeSuspend(KmpTorLoader.kt:171)
at kotlin.stdlib/kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at [email protected]/kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: io.matthewnelson.kmp.tor.binary.extract.ExtractionException: Resource not found: kmptor/geoip.gz
at [email protected]/io.matthewnelson.kmp.tor.binary.extract.internal.ExtractorDelegate.resourceNotFound$kmp_tor_binary_extract(-ExtractorDelegate.kt:207)
at [email protected]/io.matthewnelson.kmp.tor.binary.extract.Extractor$extract$1.invoke(Extractor.kt:46)
at [email protected]/io.matthewnelson.kmp.tor.binary.extract.Extractor$extract$1.invoke(Extractor.kt:42)
at [email protected]/io.matthewnelson.kmp.tor.binary.extract.internal.ExtractorDelegate.extract$kmp_tor_binary_extract(-ExtractorDelegate.kt:76)
at [email protected]/io.matthewnelson.kmp.tor.binary.extract.Extractor.extract(Extractor.kt:42)
at [email protected]/io.matthewnelson.kmp.tor.TorConfigProviderJvm.extractGeoIpV4File(TorConfigProviderJvm.kt:57)
... 7 more
Caused by: java.lang.NullPointerException
at [email protected]/io.matthewnelson.kmp.tor.binary.extract.Extractor$extract$1.invoke(Extractor.kt:44)
... 11 more
Probably the answer is to use a 'loader' class contained in the resources jar for this purpose.
I've committed the current state of my test project to https://github.com/craigraw/kmp-tor-java, which produces this error. BTW, I'm happy to wait for the 2.0.0 release - it may make more sense at this point to wait for kmp-tor to support modular applications natively if that is a goal.
The text was updated successfully, but these errors were encountered:
Original report: 05nelsonm/kmp-tor#291
cc: @craigraw
As per the docs for Class.getResourceAsStream, any resources in a jar are encapsulated if that class is in a named module. This means that the binary resources for kmp-tor cannot be loaded by
Extractor.kt
, since in a modular setting it is in a different jar and therefore module.The following error occurs:
Probably the answer is to use a 'loader' class contained in the resources jar for this purpose.
I've committed the current state of my test project to https://github.com/craigraw/kmp-tor-java, which produces this error. BTW, I'm happy to wait for the
2.0.0
release - it may make more sense at this point to wait for kmp-tor to support modular applications natively if that is a goal.The text was updated successfully, but these errors were encountered: