Continuously showing "Something Went Wrong" While Adding a Source
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:
- Access the frontend from LAN with http://my.iptvnator.ip:43080
- Click the "+" button from the main page and add a verified m3u source obtained from GitHub
- At the bottom of the page, it shows "something went wrong"
- 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.ipandmy.iptvnator.iprefer 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:
- http://my.iptvnator.ip:3000
{"status":"OK","version":{"major":2,"minor":12,"revision":1}} - http://my.iptvnator.ip:3000
Hello World
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: {}
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 -
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.
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:
- Open http://192.168.1.220:43080 in the browser, and activate dev tool
- Add playlist by URL
- Enter a verified m3u playlist
- "Something went wrong" appears
Result of dev tool:
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:
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.
+1