kewlbear / YoutubeDL

An iOS app using youtube-dl Python module with PythonKit Swift package
MIT License
210 stars 36 forks source link

Thread 8: Fatal error: attempt to await next() on more than one task #14

Open leecaa opened 1 year ago

leecaa commented 1 year ago

Thread 8: Fatal error: attempt to await next() on more than one task xcode 14.3 image image

kewlbear commented 1 year ago

That's old code I don't use now. You better call yt_dlp().

kieuquangloc commented 1 year ago

Hi @kewlbear, I face the crash when I try to download another video after finishing the first downloading, it occurs after this line: let context = Context()

image

why do we need to set typealias Context = YoutubeDL?

kewlbear commented 1 year ago

As you can see it's just an alias, there should be no change in behavior.

kieuquangloc commented 1 year ago

Hi @kewlbear the problem is when the Context init, it calls:

public override init() {
        super.init()
        _ = postDownloadTask
 }

when _ = postDownloadTask be called, the app get the crash

_Concurrency/AsyncStreamBuffer.swift:253: Fatal error: attempt to await next() on more than one task 2023-08-18 10:03:38.043840+0700 {project_name} _Concurrency/AsyncStreamBuffer.swift:253: Fatal error: attempt to await next() on more than one task

kewlbear commented 1 year ago

I guess you can comment out init() entirely.

HamstyDeveloper commented 3 months ago

Thread 8: Fatal error: Could not access PythonObject member 'Popen'

HamstyDeveloper commented 3 months ago

@kewlbear Thread 8: Fatal error: Could not access PythonObject member 'Popen'