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

Error when adding a media item while a playlist is not saved #643

Closed
JunioCalu opened this issue May 8, 2024 · 10 comments
Closed

Error when adding a media item while a playlist is not saved #643

JunioCalu opened this issue May 8, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@JunioCalu
Copy link
Contributor

JunioCalu commented May 8, 2024

Possible steps to reproduce the error:

  1. Delete the currently playing playlist, if one exists.
  2. Restart ffplayout if the playlist was deleted while a clip was being displayed.
  3. Add a media item to a playlist.
  4. Add a title to the playback item.
  5. Save the playlist.
  6. Navigate to a different settings page, "/message", for example.
  7. Return to the player page.
  8. Add new items to the playlist.
  9. Do not save the playlist.
  10. Navigate again to a different settings page.
  11. Return to the player page.
  12. Attempt to add more media items to the unsaved playlist.

Server information:
OS: Manjaro 23.1.3
ffplayout 0.22.0
ffmpeg 6.1.1
are you using the current master of ffplayout? Yes

Additional settings:

Screenshot_20240508_170327

Error outputs:

image

Screenshot_20240508_160302

@JunioCalu JunioCalu added the bug Something isn't working label May 8, 2024
@brixxnatt
Copy link

YES BUGGGGGGGGGG

@JunioCalu
Copy link
Contributor Author

I am "attaching" logs from the processes running on systemd:

mai 11 03:59:34 junio-pc systemd[1]: Started Rest API for ffplayout.
mai 11 03:59:34 junio-pc systemd[1]: Started Rust and ffmpeg based playout solution.
mai 11 03:59:34 junio-pc sudo[528361]: pam_unix(sudo:session): session closed for user root
mai 11 03:59:34 junio-pc ffpapi[528366]: [ INFO] running ffplayout API, listen on http://0.0.0.0:8787
mai 11 03:59:34 junio-pc ffpapi[528366]: [ INFO] starting 4 workers
mai 11 03:59:34 junio-pc ffpapi[528366]: [ INFO] Actix runtime found; starting in Actix runtime
mai 11 03:59:35 junio-pc ffpapi[528366]: [DEBUG] Error in response: Unauthorized("Invalid or expired UUID")
mai 11 03:59:35 junio-pc ffpapi[528366]: [ INFO] 192.168.42.16 "GET /data/event/1?endpoint=playout&uuid=8b45e503-3c2b-4d0b-9adc-8e6a8f49f70c HTTP/1.1" 401 25 "http://192.168.42.16:8787/pt-br/player" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" 0.000291
mai 11 03:59:35 junio-pc ffpapi[528366]: [DEBUG] Error in response: Unauthorized("Invalid or expired UUID")
mai 11 03:59:35 junio-pc ffpapi[528366]: [ INFO] 192.168.42.16 "GET /data/event/1?endpoint=playout&uuid=e1b8bc78-5c49-4651-9efe-9ba18fbaf64f HTTP/1.1" 401 25 "http://192.168.42.16:8787/player" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" 0.000451
mai 11 03:59:35 junio-pc ffpapi[528366]: [DEBUG] Error in response: Unauthorized("Invalid or expired UUID")
mai 11 03:59:35 junio-pc ffpapi[528366]: [ INFO] 192.168.42.16 "GET /data/event/1?endpoint=playout&uuid=e1b8bc78-5c49-4651-9efe-9ba18fbaf64f HTTP/1.1" 401 25 "http://192.168.42.16:8787/player" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" 0.000124
mai 11 03:59:35 junio-pc ffpapi[528366]: [DEBUG] Error in response: Unauthorized("Invalid or expired UUID")
mai 11 03:59:35 junio-pc ffpapi[528366]: [ INFO] 192.168.42.16 "GET /data/event/1?endpoint=playout&uuid=e1b8bc78-5c49-4651-9efe-9ba18fbaf64f HTTP/1.1" 401 25 "http://192.168.42.16:8787/player" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" 0.000153
mai 11 03:59:35 junio-pc ffpapi[528366]: [DEBUG] Error in response: BadRequest("invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `n` at 1")
mai 11 03:59:35 junio-pc ffpapi[528366]: [ INFO] 192.168.42.16 "GET /data/event/1?endpoint=playout&uuid=null HTTP/1.1" 400 104 "http://192.168.42.16:8787/player" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" 0.001500
mai 11 03:59:36 junio-pc ffpapi[528366]: [DEBUG] Error in response: Unauthorized("Invalid or expired UUID")
mai 11 03:59:36 junio-pc ffpapi[528366]: [ INFO] 192.168.42.16 "GET /data/event/1?endpoint=playout&uuid=8b45e503-3c2b-4d0b-9adc-8e6a8f49f70c HTTP/1.1" 401 25 "http://192.168.42.16:8787/pt-br/player" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" 0.000156
mai 11 03:59:37 junio-pc ffpapi[528366]: [DEBUG] Error in response: BadRequest("invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `n` at 1")
mai 11 03:59:37 junio-pc ffpapi[528366]: [ INFO] 192.168.42.16 "GET /data/event/1?endpoint=playout&uuid=null HTTP/1.1" 400 104 "http://192.168.42.16:8787/player" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" 0.000194
mai 11 03:59:37 junio-pc ffpapi[528366]: [DEBUG] Error in response: BadRequest("invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `n` at 1")
mai 11 03:59:37 junio-pc ffpapi[528366]: [ INFO] 192.168.42.16 "GET /data/event/1?endpoint=playout&uuid=null HTTP/1.1" 400 104 "http://192.168.42.16:8787/player" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" 0.000101
mai 11 03:59:37 junio-pc ffpapi[528366]: [DEBUG] Error in response: BadRequest("invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `n` at 1")
mai 11 03:59:37 junio-pc ffpapi[528366]: [ INFO] 192.168.42.16 "GET /data/event/1?endpoint=playout&uuid=null HTTP/1.1" 400 104 "http://192.168.42.16:8787/player" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" 0.000143
mai 11 03:59:37 junio-pc ffpapi[528366]: [DEBUG] Error in response: BadRequest("invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `n` at 1")
mai 11 03:59:37 junio-pc ffpapi[528366]: [ INFO] 192.168.42.16 "GET /data/event/1?endpoint=playout&uuid=null HTTP/1.1" 400 104 "http://192.168.42.16:8787/player" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" 0.000209
mai 11 03:59:37 junio-pc ffpapi[528366]: [DEBUG] Error in response: Unauthorized("Invalid or expired UUID")
mai 11 03:59:37 junio-pc ffpapi[528366]: [ INFO] 192.168.42.16 "GET /data/event/1?endpoint=playout&uuid=8b45e503-3c2b-4d0b-9adc-8e6a8f49f70c HTTP/1.1" 401 25 "http://192.168.42.16:8787/pt-br/player" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" 0.000219
mai 11 03:59:38 junio-pc ffpapi[528366]: [DEBUG] Error in response: Unauthorized("Invalid or expired UUID")
mai 11 03:59:38 junio-pc ffpapi[528366]: [ INFO] 192.168.42.16 "GET /data/event/1?endpoint=playout&uuid=8b45e503-3c2b-4d0b-9adc-8e6a8f49f70c HTTP/1.1" 401 25 "http://192.168.42.16:8787/pt-br/player" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" 0.000118
mai 11 03:59:39 junio-pc ffpapi[528366]: [DEBUG] Error in response: BadRequest("invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `n` at 1")
mai 11 03:59:39 junio-pc ffpapi[528366]: [ INFO] 192.168.42.16 "GET /data/event/1?endpoint=playout&uuid=null HTTP/1.1" 400 104 "http://192.168.42.16:8787/player" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" 0.000232
mai 11 03:59:39 junio-pc ffpapi[528366]: [DEBUG] Error in response: BadRequest("invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `n` at 1")
mai 11 03:59:39 junio-pc ffpapi[528366]: [ INFO] 192.168.42.16 "GET /data/event/1?endpoint=playout&uuid=null HTTP/1.1" 400 104 "http://192.168.42.16:8787/player" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" 0.000318
mai 11 03:59:39 junio-pc ffpapi[528366]: [DEBUG] Error in response: BadRequest("invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `n` at 1")
mai 11 03:59:39 junio-pc ffpapi[528366]: [ INFO] 192.168.42.16 "GET /data/event/1?endpoint=playout&uuid=null HTTP/1.1" 400 104 "http://192.168.42.16:8787/player" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" 0.000350
mai 11 03:59:39 junio-pc ffpapi[528366]: [DEBUG] Error in response: BadRequest("invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `n` at 1")
mai 11 03:59:39 junio-pc ffpapi[528366]: [ INFO] 192.168.42.16 "GET /data/event/1?endpoint=playout&uuid=null HTTP/1.1" 400 104 "http://192.168.42.16:8787/player" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" 0.000310

@JunioCalu
Copy link
Contributor Author

Additional observations:

  1. After each page switch between "/message" and "/player", the "/player" page should be refreshed using the F5 keyboard shortcut.

  2. In this case, the ffpapi was compiled with the "embed_frontend" feature disabled.

  3. It appears that this bug is overwriting the web frontend installation files, and the only way to remedy it is to uninstall and reinstall the ffplayout installation package each time it occurs.

@jb-alvarado
Copy link
Member

I found some other little issues, but I was not able to reproduce this one.

jb-alvarado added a commit that referenced this issue May 12, 2024
add ru, process items on delete, make item optional (maybe fix #643)
@JunioCalu
Copy link
Contributor Author

JunioCalu commented May 13, 2024

New error:

Possible steps to reproduce:

  1. Add a media item to the playlist.
  2. Set a title for the item.
  3. Do not change the "duration".
  4. Set "in" to 00:01:000.000.
  5. Set "out" to 00:01:59:000.00 (the missing last "0" is intentional).
  6. Save the item.
  7. Save the playlist.
  8. Refresh the page (press F5).
  9. Try to add another media item to the playlist.

Additional configuration:

{
  "channel": "Channel 1",
  "date": "2024-05-13",
  "program": [
    {
      "title": "jjjjjjjjjjjjjj",
      "in": 0.0,
      "out": 119.071927,
      "duration": 119.071927,
      "source": "/var/lib/ffplayout/tv-media/filler/filler.mp4"
    },
    {
      "in": 60.0,
      "out": 119.0,
      "duration": 119.071927,
      "source": "/var/lib/ffplayout/tv-media/filler/filler.mp4"
    },
    {
      "in": 0.0,
      "out": 119.071927,
      "duration": 119.071927,
      "source": "/var/lib/ffplayout/tv-media/filler/filler.mp4"
    }
  ]
}

Console log:

image

Screenshot_20240513_043317

@jb-alvarado jb-alvarado reopened this May 14, 2024
@JunioCalu
Copy link
Contributor Author

JunioCalu commented May 14, 2024

Update, another way to trigger the same bug:

  1. Add a single media item to the playlist.
  2. Save the playlist.
  3. Exit the "/player" page and navigate to different pages such as "/message" "/logging".
  4. Return to the "/player" page.
  5. Refresh the page by pressing F5.
  6. Result: The playlist disappears from the screen and it is not possible to add any more items.

Note: Tests are still being conducted on an ffplayout binary compiled with the "embed_frontend" option disabled.

@jb-alvarado
Copy link
Member

I don't know why, but I can't reproduce this error. Not in a released version, and not in dev mode.

@JunioCalu
Copy link
Contributor Author

I don't know why, but I can't reproduce this error. Not in a released version, and not in dev mode.

In my tests, this bug is linked to the configuration in the image below, while the default installation configuration seems to be working fine.

image

@jb-alvarado
Copy link
Member

Ah that brings light in this issue.

jb-alvarado added a commit that referenced this issue May 15, 2024
 correct save absolut path, improve infinit mode, fix #643
@JunioCalu
Copy link
Contributor Author

Thanks, I'll see if I can test this today or find a new bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants