Implex-ltd / HcaptchaSolver

Hcaptcha enterprise challenge solver
https://hcaptcha.com
Apache License 2.0
25 stars 7 forks source link

[Bug] panic: `JSON decoder out of sync - data changing underfoot?` #6

Closed 0xF7A4C6 closed 11 months ago

0xF7A4C6 commented 11 months ago

Related to line: https://github.com/Implex-ltd/HcaptchaSolver/blob/4c9476684eea2ecdd73e21cd95fab25b7d735d44/internal/hcaptcha/hcaptcha.go#L178

logs

panic: JSON decoder out of sync - data changing underfoot?

goroutine 4103 [running]:
encoding/json.(*decodeState).object(0xc00b6f5680, {0x10734a0?, 0xc00b964380?, 0xc003d8d400?})
        D:/Programmes/go/src/encoding/json/decode.go:816 +0x14b0
encoding/json.(*decodeState).value(0xc00b6f5680, {0x10734a0?, 0xc00b964380?, 0x206f3450dd8?})
        D:/Programmes/go/src/encoding/json/decode.go:374 +0x3e
encoding/json.(*decodeState).unmarshal(0xc00b6f5680, {0x10734a0?, 0xc00b964380?})
        D:/Programmes/go/src/encoding/json/decode.go:181 +0x133
encoding/json.Unmarshal({0xc012f90000, 0x2fe, 0x400}, {0x10734a0, 0xc00b964380})
        D:/Programmes/go/src/encoding/json/decode.go:108 +0x111
github.com/Implex-ltd/hcsolver/internal/hcaptcha.(*Hcap).GetChallenge(0xc00821d9a0, 0xc007ed3500, 0x0)
        C:/Users/arm/Documents/GitHub/HcaptchaSolver/internal/hcaptcha/hcaptcha.go:178 +0xd75
github.com/Implex-ltd/hcsolver/internal/handlers/task.(*HcaptchaTask).Solve(0xc001e55dc0)
        C:/Users/arm/Documents/GitHub/HcaptchaSolver/internal/handlers/task/manager.go:75 +0x105
github.com/Implex-ltd/hcsolver/internal/handlers/task.CreateTask.func1(0xc00821d6d0)
        C:/Users/arm/Documents/GitHub/HcaptchaSolver/internal/handlers/task/task.go:87 +0x46
created by github.com/Implex-ltd/hcsolver/internal/handlers/task.CreateTask in goroutine 199
        C:/Users/arm/Documents/GitHub/HcaptchaSolver/internal/handlers/task/task.go:86 +0xa25
exit status 2
make: *** [Makefile:10: run] Error 1
panic: JSON decoder out of sync - data changing underfoot?

goroutine 2032 [running]:
encoding/json.(*decodeState).literalStore(0xc00749e000, {0xc0094f8331, 0x1e80, 0x3ccf}, {0x122e760?, 0xc00ac4a3b0?, 0x0?}, 0x0)
        D:/Programmes/go/src/encoding/json/decode.go:926 +0x21e7
encoding/json.(*decodeState).value(0xc00749e000, {0x122e760?, 0xc00ac4a3b0?, 0x3?})
        D:/Programmes/go/src/encoding/json/decode.go:388 +0x115
encoding/json.(*decodeState).object(0xc00749e000, {0x12234a0?, 0xc00ac4a380?, 0x4?})
        D:/Programmes/go/src/encoding/json/decode.go:755 +0xd08
encoding/json.(*decodeState).value(0xc00749e000, {0x12234a0?, 0xc00ac4a380?, 0x1df32bb1348?})
        D:/Programmes/go/src/encoding/json/decode.go:374 +0x3e
encoding/json.(*decodeState).unmarshal(0xc00749e000, {0x12234a0?, 0xc00ac4a380?})
        D:/Programmes/go/src/encoding/json/decode.go:181 +0x133
encoding/json.Unmarshal({0xc0094f8000, 0x24d6, 0x4000}, {0x12234a0, 0xc00ac4a380})
        D:/Programmes/go/src/encoding/json/decode.go:108 +0x111
github.com/Implex-ltd/hcsolver/internal/hcaptcha.(*Hcap).GetChallenge(0xc00d500c80, 0xc0085682d0, 0x0)
        C:/Users/arm/Documents/GitHub/HcaptchaSolver/internal/hcaptcha/hcaptcha.go:178 +0xd75
github.com/Implex-ltd/hcsolver/internal/handlers/task.(*HcaptchaTask).Solve(0xc0015a1940)
        C:/Users/arm/Documents/GitHub/HcaptchaSolver/internal/handlers/task/manager.go:75 +0x105
github.com/Implex-ltd/hcsolver/internal/handlers/task.CreateTask.func1(0xc00170dc20)
        C:/Users/arm/Documents/GitHub/HcaptchaSolver/internal/handlers/task/task.go:87 +0x46
created by github.com/Implex-ltd/hcsolver/internal/handlers/task.CreateTask in goroutine 101
        C:/Users/arm/Documents/GitHub/HcaptchaSolver/internal/handlers/task/task.go:86 +0xa25
exit status 2
make: *** [Makefile:10: run] Error 1
Appuyez sur une touche pour continuer...
panic: JSON decoder out of sync - data changing underfoot?

goroutine 19247 [running]:
encoding/json.(*decodeState).object(0xc00e820b40, {0xf2d0c0?, 0xc00c090630?, 0x1e8a?})
        D:/Programmes/go/src/encoding/json/decode.go:668 +0x1a10
encoding/json.(*decodeState).value(0xc00e820b40, {0xf2d0c0?, 0xc00c090630?, 0xe?})
        D:/Programmes/go/src/encoding/json/decode.go:374 +0x3e
encoding/json.(*decodeState).object(0xc00e820b40, {0xf7b060?, 0xc00c090600?, 0xf08720?})
        D:/Programmes/go/src/encoding/json/decode.go:755 +0xd08
encoding/json.(*decodeState).value(0xc00e820b40, {0xf7b060?, 0xc00c090600?, 0x1?})
        D:/Programmes/go/src/encoding/json/decode.go:374 +0x3e
encoding/json.(*decodeState).array(0xc00e820b40, {0xf08720?, 0xc0068bf9e8?, 0x1f0a?})
        D:/Programmes/go/src/encoding/json/decode.go:555 +0x50f
encoding/json.(*decodeState).value(0xc00e820b40, {0xf08720?, 0xc0068bf9e8?, 0x8?})
        D:/Programmes/go/src/encoding/json/decode.go:364 +0x74
encoding/json.(*decodeState).object(0xc00e820b40, {0xf034a0?, 0xc0068bf880?, 0x4?})
        D:/Programmes/go/src/encoding/json/decode.go:755 +0xd08
encoding/json.(*decodeState).value(0xc00e820b40, {0xf034a0?, 0xc0068bf880?, 0x1f1a2a90108?})
        D:/Programmes/go/src/encoding/json/decode.go:374 +0x3e
encoding/json.(*decodeState).unmarshal(0xc00e820b40, {0xf034a0?, 0xc0068bf880?})
        D:/Programmes/go/src/encoding/json/decode.go:181 +0x133
encoding/json.Unmarshal({0xc0086e2000, 0x23e6, 0x4000}, {0xf034a0, 0xc0068bf880})
        D:/Programmes/go/src/encoding/json/decode.go:108 +0x111
github.com/Implex-ltd/hcsolver/internal/hcaptcha.(*Hcap).GetChallenge(0xc008c0f270, 0xc00d5c2720, 0x0)
        C:/Users/arm/Documents/GitHub/HcaptchaSolver/internal/hcaptcha/hcaptcha.go:178 +0xd75
github.com/Implex-ltd/hcsolver/internal/handlers/task.(*HcaptchaTask).Solve(0xc00102a000)
        C:/Users/arm/Documents/GitHub/HcaptchaSolver/internal/handlers/task/manager.go:75 +0x105
github.com/Implex-ltd/hcsolver/internal/handlers/task.CreateTask.func1(0xc0049f6e10)
        C:/Users/arm/Documents/GitHub/HcaptchaSolver/internal/handlers/task/task.go:87 +0x46
created by github.com/Implex-ltd/hcsolver/internal/handlers/task.CreateTask in goroutine 16605
        C:/Users/arm/Documents/GitHub/HcaptchaSolver/internal/handlers/task/task.go:86 +0xa25
exit status 2
make: *** [Makefile:10: run] Error 1
0xF7A4C6 commented 11 months ago

fixed