HTML5 Error - Build failed: Sequence contains no elements

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
Frank_Finnegan
Jr. Propeller Head
Posts: 5
Joined: Thu Aug 27, 2020 5:03 am

HTML5 Error - Build failed: Sequence contains no elements

Post by Frank_Finnegan »

Hello folks,

Lately I've had issues with HTML5 target outputs that contain *.flglo glossary files. The build fails with a Compile Status of Build failed: Sequence contains no elements.

The issue first occurred a few months ago and it seemed to fix itself. Now it's back again and can be replicated. I'd appreciate anyone's thoughts as to what is causing this and how I can fix it.

Background
  • Each author in our team is responsible for their own products. All of the products are related and share common terms.
  • We keep our glossary of terms in a master project that is imported into all of our product projects.
  • Each letter of the alphabet corresponds to a separate *.fltoc file and a separate *.flglo file. For example, Glossary_A.fltoc and Glossary_A.flglo.
  • Not every term is used in every product. We use conditional tags for each product name. The glossary project terms are marked-up with the appropriate product name conditional tags in each of the *.htm, *.fltoc, and *.flglo files.
  • Everything has been working well for the past couple of years.
Issue
During the compilation, the build fails with a Compile Status of Build failed: Sequence contains no elements.

Troubleshooting
  1. I searched the forums and knowledge base but found no similar issue.
  2. When this issue occurred in Project ABC, the only change the author made to the project was to select all of the *.flglo file check boxes on the Glossary tab of the target. We cleared all of the check boxes, except for the Glossary_A.flglo file, and then rebuilt the target. The build was successful.
  3. We then added the Glossary_B.flglo file and rebuilt the target. The build was successful.
  4. This process continued until the build failed, which happened when we added the Glossary_I.flglo file.
  5. Project DEF, which uses the same files as Project ABC, builds correctly with all *.flglo files, including Glossary_I.flglo.
  6. I compared the target files from both projects and didn't see any major differences apart from the names of the projects.
Workaround
The author has had to build the targets without the Glossary_I.flglo file. This means the glossary terms in that HTML5 Help file do not appear in the Glossary tab of the Tripane skin we use. However, because the source *.htm files are included in the build, the terms appear in the main Search field.

I'd like to resolve this if possible but have run out of ideas. Before logging a ticket with MadCap, I thought I'd ask for your help.

Thanks in advance.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: HTML5 Error - Build failed: Sequence contains no element

Post by NorthEast »

I've no idea what the problem is, but a similar sounding message "Sequence contains more than one element" has cropped up a few times, and seems related to using Git.
Probably best to ask MadCap, as it sounds like it'll require some digging.
robdocsmith
Sr. Propeller Head
Posts: 247
Joined: Thu May 24, 2018 3:11 pm
Location: Queensland, Australia

Re: HTML5 Error - Build failed: Sequence contains no element

Post by robdocsmith »

The only thing I can think of is conditions in targetABC accidentally or deliberately excluding all glossary terms in letter I therefore it being empty when it comes to being built. I'd start at the conditions and check if there was something screwy in that target's condition definitions. If you copied the conditions from targetDEF into targetABC does it work correctly?

Just a thought,

Rob
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: HTML5 Error - Build failed: Sequence contains no element

Post by NorthEast »

Frank_Finnegan wrote:Issue
During the compilation, the build fails with a Compile Status of Build failed: Sequence contains no elements.
Also, check the build log to see when the build fails - check the previous line in the messages tab, as this might give some clue to what the build was doing when it failed.
Frank_Finnegan
Jr. Propeller Head
Posts: 5
Joined: Thu Aug 27, 2020 5:03 am

Re: HTML5 Error - Build failed: Sequence contains no element

Post by Frank_Finnegan »

Thanks for everyone's useful comments. I've resolved the issue.
Dave Lee wrote:Also, check the build log to see when the build fails - check the previous line in the messages tab, as this might give some clue to what the build was doing when it failed.
That was a great suggestion. I opened the last *.htm file in the log file where the issue happened. I found there was a word beginning with 'I' in the topic that would have been converted automatically to a glossary term. After checking that word in the Glossary_I.flgo file I saw that the conditional tag excluded it from that target. After fixing the tag it all worked.

So, the short answer is there was a nut loose on the keyboard (Me ;)). Although, it would have been useful if the error message gave more information about the issue; it took quite a bit of searching to discover where the problem lay.

Thanks again everyone for your help. Hopefully this entry will help others in the future with the same error message.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: HTML5 Error - Build failed: Sequence contains no element

Post by NorthEast »

Glad that helped.

Flare has a number of incoherent and completely undocumented error messages.

And sometimes, the build log offers a wild stab in the dark to finding the problem!
Post Reply