wouterdebie / locast2tuner

Locast to Emby/Plex/Channels server
https://wouterdebie.github.io/locast2tuner/
MIT License
52 stars 8 forks source link

New issues 5/9/2021 #46

Closed lawrence1986101 closed 3 years ago

lawrence1986101 commented 3 years ago

Locast or your docker is Haveing an issue again

config selected = /config/config May 09 22:03:30.417 INFO locast2tuner 0.1.33 on Linux 5.10.19-Unraid starting.. May 09 22:03:30.418 INFO UUID: 78e455a6-39fc-456b-8279-bb4a2c7e3f2f May 09 22:03:30.418 INFO Logging in with lawrence.crandall@yahoo.com May 09 22:03:30.603 INFO Login succeeded! May 09 22:03:30.950 INFO Using cached FCC facilities at /root/.locast2tuner/facilities " this is the issue thread 'main' panicked at 'called Result::unwrap() on an Err value: reqwest::Error { kind: Decode, source: Error("missing field showType", line: 1, column: 161536) }', src/service/mod.rs:333:10

note: run with RUST_BACKTRACE=1 environment variable to display a backtrace /config/run.bash: line 19: 7 Aborted locast2tuner --config /config/config -b 0.0.0.0 -m -d 8 -r --tuner_count 4

scumola commented 3 years ago

I'm also getting this error. Container is crashing and service is no longer running. Was working fine for 1-2 weeks prior. Restarting the container causes error to immediately happen. Something must have changed on the locast-side.

jg-24 commented 3 years ago

Ditto...

Application failed because EPG missing field showType

Obviously not the application's fault, but ideally a worker failing shouldn't bubble up to make the application exit.

May 09 20:20:02.747 INFO locast2tuner 0.1.33 on Darwin 20.4.0 starting..
May 09 20:20:02.748 INFO UUID: 
May 09 20:20:02.748 INFO Logging in
May 09 20:20:02.748 DEBG starting new connection: https://api.locastnet.org/
May 09 20:20:03.329 DEBG response '200 OK' for https://api.locastnet.org/api/user/login
May 09 20:20:03.329 INFO Login succeeded!
May 09 20:20:03.330 DEBG starting new connection: https://api.locastnet.org/
May 09 20:20:03.856 DEBG response '200 OK' for https://api.locastnet.org/api/user/me
May 09 20:20:03.856 DEBG starting new connection: https://api.locastnet.org/
May 09 20:20:04.359 DEBG response '200 OK' for https://api.locastnet.org/api/dma
May 09 20:20:04.367 DEBG starting new connection: https://api.locastnet.org/
May 09 20:20:04.884 DEBG response '200 OK' for https://api.locastnet.org/api/watch/dma/ip
May 09 20:20:04.892 DEBG starting new connection: https://api.locastnet.org/
May 09 20:20:05.492 DEBG response '200 OK' for https://api.locastnet.org/api/watch/epg/819?startTime=2021-05-10T00:00:00-00:00&hours=192
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: reqwest::Error { kind: Decode, source: Error("missing field `showType`", line: 1, column: 2115084) }', src/service/mod.rs:333:10
wouterdebie commented 3 years ago

Interesting. I'll make this field optional tomorrow..

On Sun, May 9, 2021, 22:38 Jeff @.***> wrote:

Ditto...

Application failed because EPG missing field showType

Obviously not the application's fault, but ideally a worker failing shouldn't bubble up to make the application exit.

May 09 20:20:02.747 INFO locast2tuner 0.1.33 on Darwin 20.4.0 starting.. May 09 20:20:02.748 INFO UUID: May 09 20:20:02.748 INFO Logging in May 09 20:20:02.748 DEBG starting new connection: https://api.locastnet.org/ May 09 20:20:03.329 DEBG response '200 OK' for https://api.locastnet.org/api/user/login May 09 20:20:03.329 INFO Login succeeded! May 09 20:20:03.330 DEBG starting new connection: https://api.locastnet.org/ May 09 20:20:03.856 DEBG response '200 OK' for https://api.locastnet.org/api/user/me May 09 20:20:03.856 DEBG starting new connection: https://api.locastnet.org/ May 09 20:20:04.359 DEBG response '200 OK' for https://api.locastnet.org/api/dma May 09 20:20:04.367 DEBG starting new connection: https://api.locastnet.org/ May 09 20:20:04.884 DEBG response '200 OK' for https://api.locastnet.org/api/watch/dma/ip May 09 20:20:04.892 DEBG starting new connection: https://api.locastnet.org/ May 09 20:20:05.492 DEBG response '200 OK' for https://api.locastnet.org/api/watch/epg/819?startTime=2021-05-10T00:00:00-00:00&hours=192 thread 'main' panicked at 'called Result::unwrap() on an Err value: reqwest::Error { kind: Decode, source: Error("missing field showType", line: 1, column: 2115084) }', src/service/mod.rs:333:10

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/wouterdebie/locast2tuner/issues/46#issuecomment-836123013, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABKABU75R5DE2BTZT6JJGDTM5IJXANCNFSM44QAFJJQ .

jg-24 commented 3 years ago

Since the offending column was so far out (2115084), I changed EPG days to 3 instead of the default 8 and it started up. Maybe by the time the offending day gets closer, the source data will be fixed.

Added to config:

days = 3
Croq360 commented 3 years ago

Out of curiosity, did you figure out which show was the one with the missing showType data? I have not encountered this issue on my setup (running as a Windows Service, not in Docker, though that shouldn't matter).

jg-24 commented 3 years ago

This could just be a function of the listing information not being available to locast, so making that one field optional may not solve the issue. It may be better to see if there are even "listings" present before trying to parse additional fields.

I have not been able to manually parse the API call that caused the issue to see the exclusion of the "showType" field when combined with valid data. I have also not been able to find any sort of API documentation from locast to see whether their service is supposed to conform to any spec or schema so that I could write a ticket in their system (like I said, it may just be that they don't have the source data to create listings at the time the request was made).

As time passes this won't pull back the same result, but as an example of empty listings here's a query for 10 days from now:

https://api.locastnet.org/api/watch/epg/819?startTime=2021-05-20T00:00:00-00:00&hours=1
[
  {
    "id": 1572389490750,
    "dma": 819,
    "stationId": "19629",
    "name": "KOMODT",
    "callSign": "4.1 ABC",
    "logoUrl": "https://static.locastnet.org/logo/819/1613399029122_ABC.png",
    "active": true,
    "listings": [],
    "sequence": 10,
    "logo226Url": "https://static.locastnet.org/roku/Seattle/ABC.png",
    "tivoId": 69022751,
    "transcodeId": 2
  },
  {
    "id": 1572389490915,
    "dma": 819,
    "stationId": "63537",
    "name": "KOMODT2",
    "callSign": "4.2 COMET",
    "logoUrl": "https://static.locastnet.org/logo/Seattle/COMET.png",
    "active": true,
    "listings": [],
    "sequence": 20,
    "logo226Url": "https://static.locastnet.org/roku/Seattle/COMET.png",
    "tivoId": 69025724,
    "transcodeId": 3
  },

...

]

For those that haven't seen a full listing, here's one as an example of where the "showType" resides:

https://api.locastnet.org/api/watch/epg/819?startTime=2021-05-10T00:00:00-00:00&hours=1
[
  {
    "id": 1572389490750,
    "dma": 819,
    "stationId": "19629",
    "name": "KOMODT",
    "callSign": "4.1 ABC",
    "logoUrl": "https://static.locastnet.org/logo/819/1613399029122_ABC.png",
    "active": true,
    "listings": [
      {
        "stationId": 1572389490750,
        "startTime": 1620604800000,
        "duration": 7200,
        "isNew": true,
        "audioProperties": "CC, DD 5.1, HD 720p, HDTV, Live, New, Stereo",
        "videoProperties": "CC, DD 5.1, HD 720p, HDTV, Live, New, Stereo",
        "rating": "TVPG",
        "programId": "EP005520800722",
        "title": "American Idol",
        "description": "The remaining finalists perform one song dedicated to the special loved ones in their lives in honor of Mother's Day and a second song from the Coldplay songbook, mentored by the band's lead singer, Chris Martin.",
        "entityType": "Episode",
        "airdate": 1620518400000,
        "genres": "Music, Competition Reality",
        "episodeTitle": "417 (Coldplay Songbook & Mother's Day Dedication)",
        "showType": "Series",
        "hasImageArtwork": false,
        "hasSeriesArtwork": false,
        "preferredImage": "https://fans.tmsimg.com/assets/p19188102_b_v13_aa.jpg?w=240&h=360",
        "preferredImageWidth": 240,
        "preferredImageHeight": 360,
        "topCast": "Katy Perry, Luke Bryan, Lionel Richie",
        "seasonNumber": 19,
        "episodeNumber": 17,
        "shortDescription": "The remaining finalists perform one song dedicated to the special loved ones in their lives.",
        "releaseYear": 2021,
        "releaseDate": 1620518400000,
        "seriesId": "187350"
      }
    ],
    "sequence": 10,
    "logo226Url": "https://static.locastnet.org/roku/Seattle/ABC.png",
    "tivoId": 69022751,
    "transcodeId": 2
  },

...

]
wouterdebie commented 3 years ago

I just pushed 0.1.34 (which is building as we speak) that contains a fix for this. showType should be there, but apparently isn't always. @jg-24, what I meant with optional is making the field Option<String>, instead of String, so the json deserializer doesn't care if the field is in the json coming from locast.org or not. In the xml template, I now make the <category> "unknown" if showType isn't there. The case you mention where the listings field is empty is because locast.org didn't provide any listings, but that case should be handled just right. The case where you go 10 days out (while locast only provides 8 days) should still work.

scumola commented 3 years ago

Pulled the latest image. Fixed for me now. Thanks!

config selected = /app/config/config May 10 15:04:19.325 INFO locast2tuner 0.1.34 on Linux 5.4.0-67-generic starting.. May 10 15:04:19.325 INFO UUID: [redacted] May 10 15:04:19.325 INFO Logging in with [redacted] May 10 15:04:19.599 INFO Login succeeded! May 10 15:04:20.079 INFO Downloading FCC facilities May 10 15:04:20.753 INFO Cached FCC facilities to /root/.locast2tuner/facilities May 10 15:04:24.283 INFO Loading stations for Denver (cache: true, cache timeout: 3600, days: 8).. May 10 15:04:24.295 INFO Starting http server for Denver on http://0.0.0.0:6077 May 10 15:04:24.295 INFO Starting 4 workers May 10 15:04:24.295 INFO Starting "actix-web-service-0.0.0.0:6077" service on 0.0.0.0:6077 May 10 15:04:24.295 INFO Tuners: May 10 15:04:24.295 INFO +--------+----------+-----+--------------------------------------+----------------+---------------------+ May 10 15:04:24.295 INFO | City | Zip code | DMA | UUID | Timezone | URL | May 10 15:04:24.295 INFO +--------+----------+-----+--------------------------------------+----------------+---------------------+ May 10 15:04:24.296 INFO | Denver | | 751 | [redacted]| America/Denver | http://0.0.0.0:6077 | May 10 15:04:24.296 INFO +--------+----------+-----+--------------------------------------+----------------+---------------------+ May 10 15:04:24.296 INFO locast2tuner started..

sumocomputers commented 3 years ago

I found the same thing on macOS, using Homebrew and 0.1.33 (debug log below).

Speaking of which, how long does it usually take for Homebrew to update? I am still seeing 0.1.33 when running:

brew upgrade locast2tuner

May 10 08:14:24.460 INFO locast2tuner 0.1.33 on Darwin 20.4.0 starting..
May 10 08:14:24.460 INFO UUID: obfuscated
May 10 08:14:24.460 INFO Logging in with myobfuscatedemail@something.com
May 10 08:14:24.460 DEBG starting new connection: https://api.locastnet.org/
May 10 08:14:25.110 DEBG response '200 OK' for https://api.locastnet.org/api/user/login
May 10 08:14:25.110 INFO Login succeeded!
May 10 08:14:25.110 DEBG starting new connection: https://api.locastnet.org/
May 10 08:14:25.662 DEBG response '200 OK' for https://api.locastnet.org/api/user/me
May 10 08:14:25.662 DEBG starting new connection: https://api.locastnet.org/
May 10 08:14:26.362 DEBG response '200 OK' for https://api.locastnet.org/api/dma
May 10 08:14:26.362 INFO Using cached FCC facilities at /Users/mediamacmini/.locast2tuner/facilities
May 10 08:14:26.370 DEBG starting new connection: https://api.locastnet.org/
May 10 08:14:26.926 DEBG response '200 OK' for https://api.locastnet.org/api/watch/dma/zip/44144
May 10 08:14:26.934 DEBG starting new connection: https://api.locastnet.org/
May 10 08:14:27.987 DEBG response '200 OK' for https://api.locastnet.org/api/watch/epg/510?startTime=2021-05-10T00:00:00-00:00&hours=208
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: reqwest::Error { kind: Decode, source: Error("missing field `showType`", line: 1, column: 2073290) }', src/service/mod.rs:333:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Abort trap: 6
lawrence1986101 commented 3 years ago

Still nothing on unraid even tryed to force update to the latest docker image Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: Steve Webb @.> Date: 5/10/21 11:07 AM (GMT-05:00) To: wouterdebie/locast2tuner @.> Cc: lawrence1986101 @.>, Author @.> Subject: Re: [wouterdebie/locast2tuner] New issues 5/9/2021 (#46) Pulled the latest image. Fixed for me now. Thanks! config selected = /app/config/config May 10 15:04:19.325 INFO locast2tuner 0.1.34 on Linux 5.4.0-67-generic starting.. May 10 15:04:19.325 INFO UUID: [redacted] May 10 15:04:19.325 INFO Logging in with [redacted] May 10 15:04:19.599 INFO Login succeeded! May 10 15:04:20.079 INFO Downloading FCC facilities May 10 15:04:20.753 INFO Cached FCC facilities to /root/.locast2tuner/facilities May 10 15:04:24.283 INFO Loading stations for Denver (cache: true, cache timeout: 3600, days: 8).. May 10 15:04:24.295 INFO Starting http server for Denver on http://0.0.0.0:6077 May 10 15:04:24.295 INFO Starting 4 workers May 10 15:04:24.295 INFO Starting "actix-web-service-0.0.0.0:6077" service on 0.0.0.0:6077 May 10 15:04:24.295 INFO Tuners: May 10 15:04:24.295 INFO +--------+----------+-----+--------------------------------------+----------------+---------------------+ May 10 15:04:24.295 INFO | City | Zip code | DMA | UUID | Timezone | URL | May 10 15:04:24.295 INFO +--------+----------+-----+--------------------------------------+----------------+---------------------+ May 10 15:04:24.296 INFO | Denver | | 751 | [redacted]| America/Denver | http://0.0.0.0:6077 | May 10 15:04:24.296 INFO +--------+----------+-----+--------------------------------------+----------------+---------------------+ May 10 15:04:24.296 INFO locast2tuner started..

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

wouterdebie commented 3 years ago

@sumocomputers for some reasons building homebrew failed and I'm investigating right now what's up with that. @lawrence1986101 Just know that the unraid images are not built by me and afaik, they need a version bump in order to fix things.

wouterdebie commented 3 years ago

@sumocomputers the build broke because I had removed vendored tls, but I've reverted that. 0.1.37 should be available for all platforms now.

jg-24 commented 3 years ago

Does the build automagically update https://github.com/wouterdebie/homebrew-repo ?

lawrence1986101 commented 3 years ago

Well I did try to do a force update which would force the update but that didn't work so I don't know I wish I had more detail for you guys but I don't know how to code or anyting I wish I did but I don't but I figured I would at least give you guys an update of somethingSent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: Wouter de Bie @.> Date: 5/10/21 11:50 AM (GMT-05:00) To: wouterdebie/locast2tuner @.> Cc: lawrence1986101 @.>, Mention @.> Subject: Re: [wouterdebie/locast2tuner] New issues 5/9/2021 (#46) @sumocomputers for some reasons building homebrew failed and I'm investigating right now what's up with that. @lawrence1986101 Just know that the unraid images are not built by me and afaik, they need a version bump in order to fix things.

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.

wouterdebie commented 3 years ago

Does the build automagically update https://github.com/wouterdebie/homebrew-repo ?

It does. The build process in locast2tuner triggers a pipeline in the homebrew repo as well.

Well I did try to do a force update which would force the update but that didn't work

Gotcha. That is the way to do it, but since the build was broken, it might not have updated correctly. I wonder if it makes sense to add a specific unraid image to this repo, so there's no manual intervention when I bump the version.

jg-24 commented 3 years ago
RandomNinjaAtk commented 3 years ago

Unraid image is up-to-date

wouterdebie commented 3 years ago

@RandomNinjaAtk would it make sense to incorporate the unraid image build in this repo? I'd be more than happy to port it over.

RandomNinjaAtk commented 3 years ago

@RandomNinjaAtk would it make sense to incorporate the unraid image build in this repo? I'd be more than happy to port it over.

Sure