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
When I tried to use Katana as an SDK, I encountered an issue. I added Katana as a package and ran it, but it didn't work. I tried go version go1.21.5 linux/amd64, and it seems Katana isn't stable in this version. Later, I investigated and found the problematic code block in Katana.
The problematic part was the Do function inside pkg/engine/common/base.go. In the Do function, the for loop at the top was for item := range crawlSession.Queue.Pop(), but it wasn't affected by the code at line 244 that I'm showing below
The go func(){} structure runs asynchronously, causing the for loop to complete without waiting for a new variable assignment to the queue, which was why Katana wasn't functioning.
I resolved the issue by modifying the relevant code block as follows. Keep this in mind if you encounter a similar problem. 😅
The text was updated successfully, but these errors were encountered:
MetzinAround
added
the
Type: Bug
Inconsistencies or issues which will cause an issue or problem for users or implementors.
label
Jan 4, 2024
@Serhatcck I think the issue could have been a too short timeout for the specific target, since go routine is anyway awaited via the `wg.Wait()` at the end. Have you tried with a larger `-timeout` (default is 10s)
katana version: 2
Current Behavior:
When I tried to use Katana as an SDK, I encountered an issue. I added Katana as a package and ran it, but it didn't work. I tried
go version go1.21.5 linux/amd64,
and it seems Katana isn't stable in this version. Later, I investigated and found the problematic code block in Katana.The problematic part was the
Do
function insidepkg/engine/common/base.go.
In theDo
function, the for loop at the top wasfor item := range crawlSession.Queue.Pop()
, but it wasn't affected by the code at line 244 that I'm showing belowThe
go func(){}
structure runs asynchronously, causing the for loop to complete without waiting for a new variable assignment to the queue, which was why Katana wasn't functioning.I resolved the issue by modifying the relevant code block as follows. Keep this in mind if you encounter a similar problem. 😅
The text was updated successfully, but these errors were encountered: