bbb-recording-exporter icon indicating copy to clipboard operation
bbb-recording-exporter copied to clipboard

`captions.json` is `html` and error when parsing almost empty xml file

Open highlando opened this issue 3 years ago • 4 comments

Hi Daniel, didn't think of a better way to get in touch with you. I was trying to use your scripts to export a BBB recording.

However, ....

with ruby download_client.rb I run into an JSON parsing error in line 39

# Download all captions
json = JSON.parse(File.read('captions.json'))

In fact, this captions.json file looks not much like a json file: <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/playback/presentation/2.3/favicon.ico"/>...

If I comment out the relevant lines, the script completes.

However, I'm not able to run ruby export_presentation.rb successfully because of

	4: from export_presentation.rb:749:in `<main>'
	3: from export_presentation.rb:723:in `export_presentation'
	2: from export_presentation.rb:278:in `parse_whiteboard_shapes'
	1: from /var/lib/gems/2.7.0/gems/nokogiri-1.12.5-x86_64-linux/lib/nokogiri/xml/reader.rb:103:in `each'
/var/lib/gems/2.7.0/gems/nokogiri-1.12.5-x86_64-linux/lib/nokogiri/xml/reader.rb:103:in `read': 2:1: FATAL: Extra content at the end of the document (Nokogiri::XML::SyntaxError)

which is (as far as I understand the code) caused by line 722/723

  shapes, slides, timestamps =
   parse_whiteboard_shapes(Nokogiri::XML::Reader(File.open("#{@published_files}/shapes_modified.svg")))

and my "shapes_modified.svg" look like this:

# cat shapes_modified.svg                   
<?xml version="1.0"?>

I've tested this for two different recordings on different BBB servers with the same result. I can provide the links to the recordings if someone wants to have it.

highlando avatar Oct 15 '21 12:10 highlando

Hi @highlando, thanks for reaching out. Can you provide the recording link? Via email if the contents are sensitive. I'll then take a look at it, I couldn't make the problem out by looking at these lines.

Is that BBB 2.4? The contents of the captions file are very different compared to what they should look like. Regards, Daniel

danielpetri1 avatar Oct 15 '21 13:10 danielpetri1

Hi,

Thanks for the reply. Since other people are involved, I don't want to share the recording too publicly. Would you mind reaching out to me by email? @.***

Am 15. Oktober 2021 15:57:37 MESZ schrieb Daniel Petri Rocha @.***>:

Hi @highlando, thanks for reaching out. Can you provide the recording link? Via email if the contents are sensitive. I'll then take a look at it, I couldn't make the problem out by looking at these lines.

Is that BBB 2.4? The contents of the captions file are very different compared to what they should look like. Regards, Daniel

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/danielpetri1/bbb-recording-exporter/issues/56#issuecomment-944323368

highlando avatar Oct 15 '21 14:10 highlando

The version of BBB is 2.3.14

highlando avatar Oct 18 '21 14:10 highlando

@highlando Sorry for delayed reply. Unfortunately GitHub censored your email. You can reach me at daniel dot petri at tum de . Since the script is compatible with 2.3.14, it should not be a difficult fix. Have you tried commenting out the captions download?

danielpetri1 avatar Oct 19 '21 19:10 danielpetri1