Error opening nwb files

I've spent almost two days on the interface of the MATNWB library to read NWB files, and I feel like I've only gone backwards, it would require a lot more work to produce something easy to use in Brainstorm. Unfortunately, I can't dedicate more time to this project at the moment.
Maybe I will wait for a few months or a year a see if it gets any better.

@mpompolas
No need to spend time sending me other files. I'll ask later if there is a clear need for a major project to revive your NWB reading code.

@IreneP
Sorry for giving up after sounding so promising...
Feel free to keep on working on the reading functions in Brainstorm if you have time for this (in_fopen_nwb.m / in_fread_nwb.m / bst_install_nwb.m). If you need to read one specific dataset, it should not be too complicated to write some code that reads it. The complicated part would be to make it generic...
Otherwise, you could write Matlab scripts to read the data you are interested in from the .nwb files are save in the Brainstorm database directly. The data structures are all documented on the website:
https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting#File_structures

FYI, the last message I posted on the github issue (Error reading example datasets with nwbRead · Issue #236 · NeurodataWithoutBorders/matnwb · GitHub):

Thank you for your prompt help and suggestions!

However, my goal is not really to read these files... I was hoping to be able to simply add the matnwb library to the Brainstorm environment (downloaded automatically from github when needed) to offer a native support for the NWB file format to the Brainstorm users, as it was accepted as one of the reference file format in the BIDS-EEG specifications.

But it looks a lot more complicated than expected. Apparently it will not be possible to include a version of the library that will be able to read all the .nwb files, it will always require some customized manipulations, and navigation between versions...

Another problem is that is doesn't seem to be clear how EEG/LFP/SEEG/ECOG signals should be stored in the NWB ontology. The various example files I could load in MATLAB do not organize the data in the same way. It doesn't seem easy to write code that could automatically find all the information it needs. This would require an important amount of work to supervise this interactive import of EEG signals from .nwb files into Brainstorm, and then to document it.

Our development resources on the Brainstorm project are limited and we have many projects to lead simultaneously. Unfortunately, we won't be able to invest time in writing supervision tools to manage multiple versions of the matnwb library or the schemas.
At the present time, it is not clear to me whether the matnwb library or the NWB file format are ready for a plug-and-play use from an EEG-processing software environment. Maybe I should wait for an extra year and try again later?

What are your plans for NWB/matnwb in the near future?
Will these problems of schema compatibility be handled more smoothly?
Will you provide more strict specifications/examples/tutorials for EEG/SEEG/ECoG/LFP?
Can you provide help (eg. development time) for integrating your library into external software?

Unless you have better suggestions, I will remove the NWB support currently available in the Brainstorm distribution: it was developed for one specific dataset by a former PhD student of our group (his work is mentioned on your website: https://www.nwb.org/tools/), but this code is not working with any other public dataset available using .nwb files. It needs more work than what we can provide at the moment to be maintained properly.