Skip to content

java.lang.NoSuchMethodError: 'void okhttp3.internal.platform.Platform.log(int, java.lang.String, java.lang.Throwable) #210

Closed
@Flole998

Description

@Flole998

I'm getting this error quite often and after that it's impossible for the bot to receive any additional messages:

Exception in thread "OkHttp Dispatcher" java.lang.NoSuchMethodError: 'void okhttp3.internal.platform.Platform.log(int, java.lang.String, java.lang.Throwable)'
        at com.pengrad.telegrambot.impl.UpdatesHandler$1.onResponse(UpdatesHandler.java:59)
        at com.pengrad.telegrambot.impl.UpdatesHandler$1.onResponse(UpdatesHandler.java:47)
        at com.pengrad.telegrambot.impl.TelegramBotClient$1.onResponse(TelegramBotClient.java:45)
        at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

I am using okhttp aswell so I have the following dependencies in my pom.xml:

		<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp -->
		<dependency>
			<groupId>com.squareup.okhttp3</groupId>
			<artifactId>okhttp</artifactId>
			<version>4.8.0</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp-urlconnection -->
		<dependency>
			<groupId>com.squareup.okhttp3</groupId>
			<artifactId>okhttp-urlconnection</artifactId>
			<version>4.8.0</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.squareup.okio/okio -->
		<dependency>
			<groupId>com.squareup.okio</groupId>
			<artifactId>okio</artifactId>
			<version>2.7.0</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/logging-interceptor -->
		<dependency>
			<groupId>com.squareup.okhttp3</groupId>
			<artifactId>logging-interceptor</artifactId>
			<version>4.8.0</version>
		</dependency>

Is this a conflict between my dependencies and this libraries dependencies? How could this be resolved?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions