ImSejin / lezhin-comics-downloader

📥 Downloader for lezhin comics
https://www.lezhin.com
Apache License 2.0
59 stars 4 forks source link

WARNING: Invalid Status code=403 text=Forbidden #172

Closed yimeji closed 1 year ago

yimeji commented 1 year ago

Hi,

Got this error today.

Starting ChromeDriver 111.0.5563.64 (c710e93d5b63b7095afe8c2c17df34408078439d-refs/branch-heads/5563@{#995}) on port 17066 Only local connections are allowed. Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe. ChromeDriver was started successfully. Mar 10, 2023 4:11:06 AM org.openqa.selenium.remote.http.WebSocket$Listener onError WARNING: Invalid Status code=403 text=Forbidden java.io.IOException: Invalid Status code=403 text=Forbidden at org.asynchttpclient.netty.handler.WebSocketHandler.abort(WebSocketHandler.java:92) at org.asynchttpclient.netty.handler.WebSocketHandler.handleRead(WebSocketHandler.java:118) at org.asynchttpclient.netty.handler.AsyncHttpClientHandler.channelRead(AsyncHttpClientHandler.java:78) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:336) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:323) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:444) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:280) at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:280) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:1589)

Exception in thread "main" java.lang.ExceptionInInitializerError at io.github.imsejin.dl.lezhin.browser.WebBrowser.run(WebBrowser.java:140) at io.github.imsejin.dl.lezhin.process.impl.LoginProcessor.process(LoginProcessor.java:59) at io.github.imsejin.dl.lezhin.process.impl.LoginProcessor.process(LoginProcessor.java:39) at io.github.imsejin.dl.lezhin.Application.main(Application.java:59) Caused by: org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://localhost:50102/devtools/browser/1027f9d1-fee4-49f1-8005-99804376b53c Build info: version: '4.6.0', revision: '79f1c02ae20' System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '19.0.1' Driver info: driver.version: ChromeDriver at org.openqa.selenium.remote.http.netty.NettyWebSocket.(NettyWebSocket.java:102) at org.openqa.selenium.remote.http.netty.NettyWebSocket.lambda$create$3(NettyWebSocket.java:128) at org.openqa.selenium.remote.http.netty.NettyClient.openSocket(NettyClient.java:107) at org.openqa.selenium.devtools.Connection.(Connection.java:77) at org.openqa.selenium.chromium.ChromiumDriver.lambda$new$2(ChromiumDriver.java:116) at java.base/java.util.Optional.map(Optional.java:260) at org.openqa.selenium.chromium.ChromiumDriver.(ChromiumDriver.java:114) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:81) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:70) at io.github.imsejin.dl.lezhin.browser.WebBrowser$SingletonLazyHolder.(WebBrowser.java:125) ... 4 more

Arekkusu1998 commented 1 year ago

OS: Windows 10 64-bit

java -version: Java(TM) SE Development Kit 19.0.2 (64-bit) Version of lezhin-comics-downloader used: v3.0.3 (latest) Command used: C:\Users\Utente\Downloads\Lezhin Comics Downloader v3.0.3>java -jar lezhin-comics-downloader.jar -l=en -n=onesmallstep -r=1~2 -j

Good morning @ImSejin. I can confirm the same result reported by @yimeji. To make sure I didn't leave anything to chance, I also reinstalled the .jar file, updated ChromeDriver and Java and made various tests with various webtoons, both free chapters and already purchased ones, but the result is still the same.

yimeji commented 1 year ago

From my search of this error, this happen due to recent update of chrome 111 ver.

Here is one of the topic on it https://stackoverflow.com/questions/75678572/java-io-ioexception-invalid-status-code-403-text-forbidden

and this

https://groups.google.com/g/chromedriver-users/c/xL5-13_qGaA/m/cGk_5MvTAAAJ?pli=1

I can't understand them but hopefully these are of help to developer.

Arekkusu1998 commented 1 year ago

Good day @ImSejin. Please, forgive me if I'm bothering You, but I got a doubt: @yimeji opened both this issue and the #176 one, but the latter was closed when he wrote

I use the latest version and it works fine.

So he's no longer crippled by this bug? How? I still can't download.

yimeji commented 1 year ago

@Arekkusu1998

I use latest ver of the downloader but old ver of chrome.

As I mention in my previous reply in this thread the issue was caused by chrome update to ver 111. The prior version works if you haven't updated your chrome.

ImSejin commented 1 year ago

Hi @Arekkusu1998

I'm sorry to slow response. Could you try new release v3.0.4 and give me some feedback?

yimeji commented 1 year ago

Hi, This is what I got wehn trying the latest ver.

C:\Users\User\Webtoons>java -jar lezhin-comics-downloader-3.0.4.jar -l=en -n=engarde -r=1~1 Failed to perform a process java.lang.ExceptionInInitializerError: null at org.openqa.selenium.remote.HttpCommandExecutor.getDefaultClientFactory(HttpCommandExecutor.java:62) at org.openqa.selenium.remote.HttpCommandExecutor.(HttpCommandExecutor.java:96) at org.openqa.selenium.remote.service.DriverCommandExecutor.(DriverCommandExecutor.java:88) at org.openqa.selenium.chromium.ChromiumDriverCommandExecutor.(ChromiumDriverCommandExecutor.java:40) at org.openqa.selenium.chrome.ChromeDriver$ChromeDriverCommandExecutor.(ChromeDriver.java:111) at org.openqa.selenium.chrome.ChromeDriver.generateExecutor(ChromeDriver.java:101) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:88) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:84) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:73) at io.github.imsejin.dl.lezhin.browser.WebBrowser$SingletonLazyHolder.(WebBrowser.java:122) at io.github.imsejin.dl.lezhin.browser.WebBrowser.run(WebBrowser.java:137) at io.github.imsejin.dl.lezhin.process.impl.LoginProcessor.process(LoginProcessor.java:59) at io.github.imsejin.dl.lezhin.process.impl.LoginProcessor.process(LoginProcessor.java:39) at io.github.imsejin.dl.lezhin.Application.main(Application.java:59) Caused by: java.lang.IllegalArgumentException: Unknown HttpClient factory jdk-http-client at org.openqa.selenium.remote.http.HttpClient$Factory.create(HttpClient.java:57) at org.openqa.selenium.remote.http.HttpClient$Factory.createDefault(HttpClient.java:73) at org.openqa.selenium.remote.HttpCommandExecutor$DefaultClientFactoryHolder.(HttpCommandExecutor.java:58) ... 14 common frames omitted Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class io.github.imsejin.dl.lezhin.browser.WebBrowser$SingletonLazyHolder at io.github.imsejin.dl.lezhin.browser.WebBrowser.getDriver(WebBrowser.java:126) at io.github.imsejin.dl.lezhin.browser.WebBrowser.quitIfInitialized(WebBrowser.java:148) at io.github.imsejin.dl.lezhin.Application.main(Application.java:65) Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.ExceptionInInitializerError [in thread "main"] at org.openqa.selenium.remote.HttpCommandExecutor.getDefaultClientFactory(HttpCommandExecutor.java:62) at org.openqa.selenium.remote.HttpCommandExecutor.(HttpCommandExecutor.java:96) at org.openqa.selenium.remote.service.DriverCommandExecutor.(DriverCommandExecutor.java:88) at org.openqa.selenium.chromium.ChromiumDriverCommandExecutor.(ChromiumDriverCommandExecutor.java:40) at org.openqa.selenium.chrome.ChromeDriver$ChromeDriverCommandExecutor.(ChromeDriver.java:111) at org.openqa.selenium.chrome.ChromeDriver.generateExecutor(ChromeDriver.java:101) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:88) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:84) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:73) at io.github.imsejin.dl.lezhin.browser.WebBrowser$SingletonLazyHolder.(WebBrowser.java:122) at io.github.imsejin.dl.lezhin.browser.WebBrowser.run(WebBrowser.java:137) at io.github.imsejin.dl.lezhin.process.impl.LoginProcessor.process(LoginProcessor.java:59) at io.github.imsejin.dl.lezhin.process.impl.LoginProcessor.process(LoginProcessor.java:39) at io.github.imsejin.dl.lezhin.Application.main(Application.java:59)

ImSejin commented 1 year ago

Hi @yimeji Thank you for your useful feedback!

This is bug-fixed release v3.0.5.

yimeji commented 1 year ago

Hi,

I use the latest version 3.0.5 and it works with no problem.

Thank you very much.

Arekkusu1998 commented 1 year ago

@ImSejin, thank You very much for the fixing: everything works perfectly😊!