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

Continuously showing "Something Went Wrong" While Adding a Source #482

Open
RoManInv opened this issue Nov 30, 2024 · 4 comments
Open

Continuously showing "Something Went Wrong" While Adding a Source #482

RoManInv opened this issue Nov 30, 2024 · 4 comments

Comments

@RoManInv
Copy link

Describe the bug
While attempting to add an IPTV m3u source, the frontend continuously reports "something went wrong".

To Reproduce
Steps to reproduce the behavior:

  1. Access the frontend from LAN with http://my.iptvnator.ip:43080
  2. Click the "+" button from the main page and add a verified m3u source obtained from GitHub
  3. At the bottom of the page, it shows "something went wrong"
  4. Repeat 1-3, add other verified m3u/m3u8 sources (all obtained from GitHub), the same error message appears

Expected behavior
The source should be added.

Desktop (please complete the following information):
This does not apply to me. I'm using Dockage. Below is the docker-compose commands

  • Dockage: using host network, here both hostname my.dockage.ip and my.iptvnator.ip refer to the correct LAN-IP address of Dockage.
  • Using the following Docker-compose script to deploy the backend and the frontend
services:
  iptvnator-backend:
    image: 4gray/iptvnator-backend:latest
    ports:
      - 43000:3000
    environment:
      - CLIENT_URL=http://my.iptvnator.ip:43080#this one should match with the
        address and port in frontend CLIENT_URL env
  iptvnator-frontend:
    image: 4gray/iptvnator:latest
    ports:
      - 43080:80
    environment:
      - BACKEND_URL=http://my.iptvnator.ip:3000 # this one should match with the address of the backend service
networks: {}

Additional context
There might be another bug for indicating the backend URL for iptvnator frontend. According to your documentation, the expected line for backend URL should be:
- BACKEND_URL=http://my.iptvnator.ip:43000
However, when deployed using the expected line, the frontend will report "backend not reachable" when following the Step 1-3 of Bug Reproduction. By changing the port to 3000, the frontend shows the problem as described above. Below is the additional information of what the browser shows when accessing port 3000 and 43000 using HTTP:

@4gray
Copy link
Owner

4gray commented Nov 30, 2024

It your case the BACKEND_URL should point to the exposed port:
- BACKEND_URL=http://my.iptvnator.ip:43000
Also make sure that there is a space between comment and port at line 7.

services:
  iptvnator-backend:
    image: 4gray/iptvnator-backend:latest
    ports:
      - 43000:3000
    environment:
      - CLIENT_URL=http://localhost:43080
  iptvnator-frontend:
    image: 4gray/iptvnator:latest
    ports:
      - 43080:80
    environment:
      - BACKEND_URL=http://localhost:43000
networks: {}

@RoManInv
Copy link
Author

Thank you for your hint. Unluckily this does not solve the problem.
To make sure the comment does not create any problems, I have removed all of them. Now my docker-compose script looks like this:

services:
  iptvnator-backend:
    image: 4gray/iptvnator-backend:latest
    ports:
      - 43000:3000
    environment:
      - CLIENT_URL=http://localhost:43080
  iptvnator-frontend:
    image: 4gray/iptvnator:latest
    ports:
      - 43080:80
    environment:
      - BACKEND_URL=http://localhost:43000
networks: {}

When trying to add an m3u-source via "add via URL", the error message "something went wrong" still appears.

Additionally, when I change the localhost to the internal IP address, i.e. CLIENT_URL=http://192.168.1.220:43080 and similar to the backend URL, the same error still appears.

I have also checked the firewall settings on my router. The connection from LAN to LAN is by default all accepted and there is no other restriction on LAN-connection.

Additionally, the terminal output for dockage, and docker-shell

  • dockage terminal output upon new start
iptvnator-iptvnator-frontend-1  | 2024/11/30 16:39:08 [notice] 1#1: using the "epoll" event method
iptvnator-iptvnator-frontend-1  | 2024/11/30 16:39:08 [notice] 1#1: nginx/1.26.2
iptvnator-iptvnator-frontend-1  | 2024/11/30 16:39:08 [notice] 1#1: built by gcc 13.2.1 20240309 (Alpine 13.2.1_git20240309) 
iptvnator-iptvnator-frontend-1  | 2024/11/30 16:39:08 [notice] 1#1: OS: Linux 6.6.32-production+truenas
iptvnator-iptvnator-frontend-1  | 2024/11/30 16:39:08 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
iptvnator-iptvnator-frontend-1  | 2024/11/30 16:39:08 [notice] 1#1: start worker processes
iptvnator-iptvnator-frontend-1  | 2024/11/30 16:39:08 [notice] 1#1: start worker process 8
iptvnator-iptvnator-frontend-1  | 2024/11/30 16:39:08 [notice] 1#1: start worker process 9
iptvnator-iptvnator-frontend-1  | 2024/11/30 16:39:08 [notice] 1#1: start worker process 10
iptvnator-iptvnator-frontend-1  | 2024/11/30 16:39:08 [notice] 1#1: start worker process 11
iptvnator-iptvnator-backend-1 exited with code 0
iptvnator-iptvnator-backend-1 exited with code 0
iptvnator-iptvnator-backend-1   | 
iptvnator-iptvnator-backend-1   | > [email protected] start
iptvnator-iptvnator-backend-1   | > node index.js
iptvnator-iptvnator-backend-1   | 
iptvnator-iptvnator-backend-1   | Development mode: false
iptvnator-iptvnator-backend-1   | Origin URL: http://localhost:43080
iptvnator-iptvnator-backend-1   | Server running on 3000, http://localhost:3000
  • Docker shell for backend, querying process and listening ports
/usr/src/app # netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.11:37193        0.0.0.0:*               LISTEN      -
tcp        0      0 :::3000                 :::*                    LISTEN      18/node
  • Docker shell for frontend, querying process and listening ports
/ # netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1/nginx: master pro
tcp        0      0 127.0.0.11:36167        0.0.0.0:*               LISTEN      -

@4gray
Copy link
Owner

4gray commented Nov 30, 2024

CleanShot 2024-11-30 at 18 03 32@2x

I tested your config just now, works on my machine. Try to open browser dev tools and in the network tab make sure that the correct ip:port address is used for the /parse request.

@RoManInv
Copy link
Author

RoManInv commented Dec 1, 2024

Thank you for testing my config and the detailed example in the figure. I have done the following steps and got the result from chrome dev tool as shown in the picture below
Steps:

  1. Open http://192.168.1.220:43080 in the browser, and activate dev tool
  2. Add playlist by URL
  3. Enter a verified m3u playlist
  4. "Something went wrong" appears
    Result of dev tool:
    image

As I'm running iptvnator (both back- and frontend) on a stand alone mini server, I replaced the localhost with the exact LAN IP address, resulting in the following config:

services:
  iptvnator-backend:
    image: 4gray/iptvnator-backend:latest
    ports:
      - 43000:3000
    environment:
      - CLIENT_URL=http://192.168.1.220:43080
  iptvnator-frontend:
    image: 4gray/iptvnator:latest
    ports:
      - 43080:80
    environment:
      - BACKEND_URL=http://192.168.1.220:43000
networks: {}

Then I performed exactly the same steps as described above, and the dev tool gave me the following result:
image
This time, the client returned "backend not reachable".
In addition, I have also checked all the processes on my VM with IP 192.168.1.220. The result shows that the port 43000 or 43080 are not taken by any apps/containers other than iptvnator.
PS: I did not collapse the response header, the dev tool has not received any response for this request.

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