teldrive icon indicating copy to clipboard operation
teldrive copied to clipboard

http: panic serving

Open aniel300 opened this issue 1 year ago • 17 comments

04/03/2024 05:27 AM DEBUG requesting file {"name": "㕉㺜絷䔶䉰嘲睻朳ᡔ錐䡷携阄蝫套脼豈䎤爡ស炸吟㿨两羵䡫沑胾葃㒭㒟保玐ꂬɿ", "bot": "6808523031", "botNo": 2, "start": 2409494896, "end": 2410609279, "fileSize": 2562328362} 2024/03/04 05:27:06 http: panic serving 172.18.0.1:46866: runtime error: index out of range [2] with length 2 goroutine 669 [running]: net/http.(*conn).serve.func1() net/http/server.go:1898 +0xbe panic({0x192d8c0?, 0xc0003dd1e8?}) runtime/panic.go:770 +0x132 github.com/divyam234/teldrive/pkg/services.rangedParts({0xc0004ccba0?, 0xc000c3f400?, 0xc0006cd008?}, 0xc000036330?, 0xc0004394a0?) github.com/divyam234/teldrive/pkg/services/common.go:199 +0x2a5 github.com/divyam234/teldrive/pkg/services.(*FileService).GetFileStream(0xc0000101b0, 0xc000c3f400) github.com/divyam234/teldrive/pkg/services/file.go:527 +0x1534 github.com/divyam234/teldrive/pkg/controller.(*Controller).GetFileStream(...) github.com/divyam234/teldrive/pkg/controller/file.go:172 github.com/gin-gonic/gin.(*Context).Next(...) github.com/gin-gonic/[email protected]/context.go:174 github.com/divyam234/teldrive/cmd.initApp.func1(0xc000c3f400) github.com/divyam234/teldrive/cmd/run.go:220 +0x1a3 github.com/gin-gonic/gin.(*Context).Next(0xc000c3f400) github.com/gin-gonic/[email protected]/context.go:174 +0x2b github.com/divyam234/teldrive/cmd.initApp.GinzapWithConfig.func4(0xc000c3f400) github.com/gin-contrib/[email protected]/zap.go:59 +0xb1 github.com/gin-gonic/gin.(*Context).Next(...) github.com/gin-gonic/[email protected]/context.go:174 github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc0003564e0, 0xc000c3f400) github.com/gin-gonic/[email protected]/gin.go:620 +0x66e github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc0003564e0, {0x264bad8, 0xc000c0cee0}, 0xc000e43680) github.com/gin-gonic/[email protected]/gin.go:576 +0x1b2 net/http.serverHandler.ServeHTTP({0xc000036150?}, {0x264bad8?, 0xc000c0cee0?}, 0x6?) net/http/server.go:3137 +0x8e net/http.(*conn).serve(0xc0006db5f0, {0x264e6b8, 0xc0006ca480}) net/http/server.go:2039 +0x5e8 created by net/http.(*Server).Serve in goroutine 26 net/http/server.go:3285 +0x4b4

aniel300 avatar Mar 04 '24 05:03 aniel300

Hello, I have exactly the same problem on my side and I have to restart teldrive to resolve the problem

antoinerzad avatar Mar 13 '24 12:03 antoinerzad

Hello, I have exactly the same problem on my side and I have to restart teldrive to resolve the problem

am still doing some testing. i will report back when i finish

aniel300 avatar Mar 14 '24 23:03 aniel300

i gave up on this project for the time being because few different issues, some of them including this one. best of the luck, will leave this open just in case @antoinerzad

aniel300 avatar Mar 24 '24 04:03 aniel300

Hello @aniel300 and @antoinerzad, I have the same problem... some suggestion to solve this?

Best Regards Stefano

wes1993 avatar Apr 01 '24 21:04 wes1993

no solutions as in yet. i it seems to happens after for whatever reason the files get corrupted or something like that. rclone version 1.66 didn't help either and was being problematic so do go back to 1.65 for the time being. am personally running into this issue right now. something to do with "FILE_PART_SIZE_INVALID" i think is similar to this one: https://github.com/divyam234/teldrive/issues/86

aniel300 avatar Apr 01 '24 22:04 aniel300

@aniel300, Thanks a lot for your reply, so now we are stuck... I hope someone find a solutio :-D

Best Regards Stefano

wes1993 avatar Apr 02 '24 08:04 wes1993

@aniel300 , Do you know some alternatives? Now I'm testing tgmount-ng but seems that the project is not mainteined anymore..

wes1993 avatar Apr 02 '24 09:04 wes1993

@wes1993 i took a look at tgmount-ng and it seems it needs to be set up at the host level which i dont like. as for it being maintained i think u are right. there is another project out there which also doesn't support docker so am stuck with this

aniel300 avatar Apr 02 '24 19:04 aniel300

@aniel300 , Could you tell me the name of the other project?

wes1993 avatar Apr 02 '24 20:04 wes1993

teledrive

aniel300 avatar Apr 02 '24 21:04 aniel300

teledrive

that project is slow as hell, good luck with the ban of your account. You don't know how to use this project anyways

mdznf avatar Apr 02 '24 21:04 mdznf

teledrive

that project is slow as hell, good luck with the ban of your account. You don't know how to use this project anyways

my dude am not using that project, and am very thankful to this project. i was just answering to @wes1993. stop putting words in my mouth

aniel300 avatar Apr 02 '24 22:04 aniel300

@aniel300 I think i have found the problem... I don't know why but seems that sometimes if I try to open file A the tool open file B but the message ID in the Database is correct...

This can create the problem index out of range because the file size is from File A but the real file is File B.

I'm trying to find a way to read the message ID of the File B... In the log i can see only this values:

requesting file {"name": "FILEA", "bot": "Hidden By ME", "user": "Hidden By ME", "start": 0, "end": 1460225641, "fileSize": 1460225642}

But when the file start is different content...

@divyam234 could you please add the MessageID in the requesting file Log?

Best regards

wes1993 avatar Apr 03 '24 08:04 wes1993

wow this is good news. hopefully a fix or workaround can be found. let me know if u need my help.

aniel300 avatar Apr 03 '24 08:04 aniel300

I have fixed my problem, i don't know why but the channel_id for some files was wrong.. So i suggest to check the DB with SQL query to see if there is some error in the channel_id:

select * from teldrive.files where channel_id<>YOURCHANNEL/GROUPID;

wes1993 avatar Apr 03 '24 09:04 wes1993

i dont have nay files now over there. so i guess then the remaining issue would be https://github.com/divyam234/teldrive/issues/86?

aniel300 avatar Apr 03 '24 17:04 aniel300

I have fixed my problem, i don't know why but the channel_id for some files was wrong.. So i suggest to check the DB with SQL query to see if there is some error in the channel_id:

select * from teldrive.files where channel_id<>YOURCHANNEL/GROUPID;

how can i do do this on my end?

aniel300 avatar Apr 08 '24 16:04 aniel300