Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500 Unhandled internal error: runtime error: invalid memory address or nil pointer dereference #4

Closed
neuroverflow opened this issue Apr 22, 2024 · 5 comments

Comments

@neuroverflow
Copy link

Hi (and thank you for that great tool!)

I get an error 500 when trying to connect telegram

curl -v -T kitty.jpg ftp://telegram:telegram@localhost:2121/
*   Trying 127.0.0.1:2121...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to localhost (127.0.0.1) port 2121 (#0)
< 220 ftpserver
> USER telegram
< 331 OK
> PASS telegram
< 500 Unhandled internal error: runtime error: invalid memory address or nil pointer dereference
* Access denied: 500

my docker file:

  ftp2telegram:
    container_name: ftp2telegram
    image: fclairamb/ftpserver
    restart: unless-stopped
    ports:
      - '2121-2130:2121-2130'
    volumes:
      - /home/neuro/Docker/ftp2telegram:/tmp
      - /home/neuro/Docker/ftp2telegram_cfg:/app
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris

my ftpserver.json:
notice that cert.pm and key.pm are in my folder /app

{
  "version": 1,
  "accesses": [
    {
      "fs": "telegram",
      "shared": true,
      "user": "telegram",
      "pass": "telegram",
      "params": {
        "Token": "fghgfh:fghgfhfgh",
        "ChatID": "fghgfh"}
    }
  ],
  "passive_transfer_port_range": {
    "start": 2122,
    "end": 2130
  },
   "tls": {
      "server_cert": {
         "cert": "cert.pem",
         "key": "key.pem"
      }
   }
}
@slayer
Copy link
Owner

slayer commented Aug 6, 2024

Hey, sorry, missed this issue, will check soon

@slayer
Copy link
Owner

slayer commented Aug 6, 2024

Found, the problem,

  1. Use integer value for ChatID string like "1234567"
  2. panic is the ftpserver issue (not telegram connector) because errors while loading fs is not handling, will prepare PR soon

@neuroverflow
Copy link
Author

Hi Slayer! I actually use a numeric chatID : "6461759878" (changed a few digits)
Thank you for checking 👍

@slayer
Copy link
Owner

slayer commented Aug 21, 2024

strange,
"ChatID": "495241753" (changed few digits) and it works

@slayer
Copy link
Owner

slayer commented Aug 21, 2024

fclairamb#1415 fixed the panic if FS is unable to initialize

@slayer slayer closed this as completed Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants