m0ngr31 / EPlusTV

Virtual linear channels for ESPN, ESPN+, MSG+, NFL+, B1G+, NESN, Mountain West, FloSports, Paramount+, MLB.tv, and FOX Sports
MIT License
133 stars 23 forks source link

Error During Installation #9

Closed m181999 closed 2 years ago

m181999 commented 2 years ago

When I do the docker run process I get the following error:

_(node:21) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, open '/app/config/state.json' at Object.openSync (fs.js:497:3) at Object.writeFileSync (fs.js:1528:35) at initDirectories (/app/services/init-directories.ts:26:8) at /app/index.ts:178:18 at Generator.next () at /app/index.ts:8:71 at new Promise () at __awaiter (/app/index.ts:4:12) at /app/index.ts:177:13 at Object. (/app/index.ts:184:3) (Use node --trace-warnings ... to show where the warning was created) (node:21) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:21) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code._

I have tried to run as user and sudo. Same result occurs. A container is added but it is not fully setup and doesn't work.

How do I bypass this error?

Thanks in advance!

m0ngr31 commented 2 years ago

What command are you using to run it with docker?

m181999 commented 2 years ago

I have been using the docker run command listed on the page. Just with my credentials and IP instead.

docker run -p 8000:8000 -v /config_dir:/app/config -v /dev/shm:/app/tmp -e ACCESS_URI='http://192.168.0.10:8000' -e ESPN_USER='...' -e ESPN_PASS='...' m0ngr31/eplustv

I’m not super familiar with docker. I do have a few other containers running though. Am I missing a step?

freesidegit commented 2 years ago

I had the same error along with some others. I was able to get things running by removing both -v statements from the provided docker run command. I understand they are necessary though to keep channel schedules "persisted" although I am not sure exactly what that means.

What will the negative consequences be if I don't run with the -v statements (can't get it to run with them in)?

m181999 commented 2 years ago

Interesting that removing -v statements fixed it for you. That partly works for me but it still doesn't run correctly. Gets stuck at the "starting service at port 8000" step and then becomes unresponsive.

Love this concept so hopefully it starts working again soon.

rayusrnm commented 2 years ago

I am glad that I checked back here. If I also remove -v statement I can move on without error but also does not run correctly.

Main error I am getting is UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, mkdir '/app/tmp/eplustv'

I am using the Windows version of Docker and am running both the Pluto and Stir docker images for a few months now on different ports.

If anyone has some suggestions let us know. This is one of the best images to connect to Channels. Thanks for all the work.

freesidegit commented 2 years ago

Main error I am getting is UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, mkdir '/app/tmp/eplustv'

I was getting that error at first also under windows docker desktop. I built a PhotonOS vm in esxi to run my dockers instead and tried again there. I received a different error - the state.json one. removing both -v statements from the docker run and it spins up for me and generates the m3u and guide xml but I feel like perhaps it won't be renewing itself, although I'm not sure how to check that as I can't find any posts or docs yet that describe exactly how its supposed to work - how often are the m3u and xml files refreshed (so I know how often I need to tell channelsdvr which I am trying to use it with to refresh), etc.

This has amazing potential and also a huge thanks for trying to develop something for this - if I can get it working it would be fantastic (as would be some ability to filter out sports by category so I can have it, for example, only generate a list for nhl games)

m0ngr31 commented 2 years ago

So the one volume you don't have to mount is the /dev/shm one. That doesn't even exist on Windows.

Just to be sure, are you guys trying to pass through folders that actually exist?

This has amazing potential and also a huge thanks for trying to develop something for this - if I can get it working it would be fantastic (as would be some ability to filter out sports by category so I can have it, for example, only generate a list for nhl games)

Yeah, I made it just for NHL games as well. Good thinking adding a switch to prevent adding other things in. I'll add that to the backlog

rayusrnm commented 2 years ago

OK -- my issue might be a aprt that I am still learning docker and how it works -- so sorry about being a noob.

I removed the -v items with the following: docker run -p 8000:8000 -e ACCESS_URI='http://my-ip-address:8000' -e ESPN_USER='my_userName' -e ESPN_PASS='My_Password' --name ESPN_Plus m0ngr31/eplustv

I appears to be assigning channel numbers for the current games -- example: Assigning Chicago Blackhawks vs. Columbus Blue Jackets to Channel #20 Assigning Carolina Hurricanes vs. Philadelphia Flyers to Channel #21 Assigning Carolina Hurricanes vs. Philadelphia Flyers to Channel #22

Then I try to go to localhost:8000 though and I am getting a 404 error now. Seems like I am so close.

Thanks again

dromicron commented 2 years ago

i get event will start soon on every channels :(

m0ngr31 commented 2 years ago

Then I try to go to localhost:8000 though and I am getting a 404 error now. Seems like I am so close.

There isn't anything at that endpoint. You'll have to use /channels.m3u or /xmltv.xml

i get event will start soon on every channels :(

You'll have to verify that something is actually playing on a specific channel, and there is something like 10-30 second delay for the server to login and grab the stream from ESPN+. Sometimes the client will have a hard time switching over to the stream from the pre-slate, so you might have to stop the stream and hit the channel again.

dromicron commented 2 years ago

You'll have to verify that something is actually playing on a specific channel, and there is something like 10-30 second delay for the server to login and grab the stream from ESPN+. Sometimes the client will have a hard time switching over to the stream from the pre-slate, so you might have to stop the stream and hit the channel again

i have try multiples time to click all channels and nothing start playing, can you confirm that i really need vpn attached at frontend of this script? i'm from Canada, i have also try install on USA server too without succes.. The script generate all events and make the EPG without problem. Normally if EPG say that have events on channels 1 to 30, you can play all this channels without problem? ¨just wait cnx delay¨ ?

rayusrnm commented 2 years ago

Thanks for all the help. I have the channels coming into Channels DVR now and I am also getting Playback failed on all the channels. I went into the espn app and verified a valid stream and used the game to test the channel in Channels. I am in the US and have the espn app installed.

Is there another authorization that needs to take place? I immediately get Playback failed. Pluto I once in a while get this and I go back and hit the channel again and it brings the stream in. I tried that also with same results.

Log [ERR] Failed to start stream for ch5: M3U: Invalid URL: 'http://myIP:8000'/channels/5.m3u8: parse "'http://myip:8000'/channels/5.m3u8": first path segment in URL cannot contain colon

rayusrnm commented 2 years ago

Update: For anyone else this might help.

I am not sure what is different with Windows docker and Linux docker but I just installed docker on Linux and it is working as expected.

I was also getting "Event Will Start Soon" -- but I just left it alone and the stream started after 15-20 seconds, so be patient.

Here is the docker command I used to get it up and running: sudo docker run -p 8000:8000 -e ACCESS_URI='http://IP_Docker_Host:8000' -e ESPN_USER='espnplus_user_name' -e ESPN_PASS='espnplus_password' -e START_CHANNEL=400 --name ESPN_Plus m0ngr31/eplustv

For now I am using VituralBox and install ubuntu server with the docker option. (Bridged the network in vituralbox)

Hope this can help anyone else. Thank you for the image and all the work you put into this!

m181999 commented 2 years ago

@rayusrnm That command worked for me to do the setup. Thanks for posting that.

Seems like this was mostly due to my lack of experience with docker as others have mentioned.

Thanks devs for all your hard work on this project.

m181999 commented 2 years ago

However, is there an issue with not including those folders?

rayusrnm commented 2 years ago

I didn't have a chance to get back to this till tonight. I did add the flags back with the following. This is on a core Ubuntu install. Not sure if it will help you. Since moving to a linux docker host, this ESPN docker has been working great for me.

sudo docker run -p 8000:8000 -v /tmp:/app/config -e ACCESS_URI='http://IP_Docker_Host:8000' -e ESPN_USER='espnplus_user_name' -e ESPN_PASS=''espnplus_password' -e START_CHANNEL=400 --name ESPN_Plus m0ngr31/eplustv