Open JavkhlanK opened 5 months ago
I am getting this Exception with the following steps in the current nightly (0.27.2/1003):
android.os.NetworkOnMainThreadException
at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1667)
at com.android.org.conscrypt.Platform.blockGuardOnNetwork(Platform.java:431)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLOutputStream.writeInternal(ConscryptEngineSocket.java:666)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLOutputStream.write(ConscryptEngineSocket.java:661)
at okio.OutputStreamSink.write(JvmOkio.kt:56)
at okio.AsyncTimeout$sink$1.write(AsyncTimeout.kt:102)
at okio.RealBufferedSink.flush(RealBufferedSink.kt:186)
at okhttp3.internal.http2.Http2Writer.flush(Http2Writer.kt:120)
at okhttp3.internal.http2.Http2Connection.flush(Http2Connection.kt:408)
at okhttp3.internal.http2.Http2Stream$FramingSink.close(Http2Stream.kt:624)
at okio.ForwardingSink.close(ForwardingSink.kt:37)
at okhttp3.internal.connection.Exchange$RequestBodySink.close(Exchange.kt:247)
at okio.RealBufferedSink.close(RealBufferedSink.kt:206)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:63)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
at org.schabi.newpipe.DownloaderImpl.execute(DownloaderImpl.java:163)
at org.schabi.newpipe.extractor.downloader.Downloader.post(Downloader.java:143)
at org.schabi.newpipe.extractor.downloader.Downloader.postWithContentType(Downloader.java:175)
at org.schabi.newpipe.extractor.downloader.Downloader.postWithContentTypeJson(Downloader.java:217)
at org.schabi.newpipe.extractor.downloader.Downloader.postWithContentTypeJson(Downloader.java:235)
at org.schabi.newpipe.extractor.services.bandcamp.extractors.BandcampExtractorHelper.getArtistDetails(BandcampExtractorHelper.java:120)
at org.schabi.newpipe.extractor.services.bandcamp.linkHandler.BandcampChannelLinkHandlerFactory.getUrl(BandcampChannelLinkHandlerFactory.java:56)
at org.schabi.newpipe.extractor.linkhandler.ListLinkHandlerFactory.getUrl(ListLinkHandlerFactory.java:77)
at org.schabi.newpipe.extractor.services.bandcamp.linkHandler.BandcampChannelTabLinkHandlerFactory.getUrl(BandcampChannelTabLinkHandlerFactory.java:56)
at org.schabi.newpipe.extractor.linkhandler.ListLinkHandlerFactory.fromQuery(ListLinkHandlerFactory.java:57)
at org.schabi.newpipe.fragments.list.channel.ChannelTabFragment.handleResult(ChannelTabFragment.java:137)
at org.schabi.newpipe.fragments.list.channel.ChannelTabFragment.handleResult(ChannelTabFragment.java:39)
at org.schabi.newpipe.fragments.list.BaseListInfoFragment.doInitialLoadLogic(BaseListInfoFragment.java:120)
at org.schabi.newpipe.fragments.BaseStateFragment.onViewCreated(BaseStateFragment.java:47)
at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:3147)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:588)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:272)
at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:114)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1455)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3034)
at androidx.fragment.app.FragmentManager.dispatchViewCreated(FragmentManager.java:2945)
at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:3148)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:588)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:272)
at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:114)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1455)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3034)
at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:2952)
at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:263)
at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:350)
at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:251)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1547)
at android.app.Activity.performStart(Activity.java:8367)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3670)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:224)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:204)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7924)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
The problem is that the current Bandcamp implementation is doing network requests when calling BandcampChannelLinkHandlerFactory.getUrl()
and BandcampChannelLinkHandlerFactory.getId()
. The other services do not need to perform a request for their implementations.
Checklist
Affected version
0.27.0
Steps to reproduce the bug
Expected behavior
No response
Actual behavior
The app crashes
Screenshots/Screen recordings
No response
Logs
Exception
Crash log
Affected Android/Custom ROM version
Android 14 / One UI 6.1
Affected device model
Galaxy S22 Ultra
Additional information
It's the same as #10688, but since the author deleted their account…