App Builder PWA build error

I have tried to build PWAs using both SAB and DAB. In both I get an error.

Any ideas?

Thanks,
Chris

Copying PWA to output folder


ROBOCOPY :: Robust File Copy for Windows

Started : Friday, April 12, 2024 11:02:22 AM
Source : C:\Users\crice\AppData\Local\Temp\App Builder\build\SAB.001\p\appbuilder-pwa\build
Dest : C:\Users\crice\OneDrive\Documents\App Builder\Scripture Apps\PWA Output\org.sil.pg.finonganscripture.finongan\

Files : *.*

Options : . /NFL /S /E /DCOPY:T /COPY:DAT /R:0 /W:30


2024/04/12 11:02:22 ERROR 2 (0x00000002) Accessing Source Directory C:\Users\crice\AppData\Local\Temp\App Builder\build\SAB.001\p\appbuilder-pwa\build
The system cannot find the file specified.

C:\Users\crice\OneDrive\Documents\App Builder\Scripture Apps\PWA Output\org.sil.pg.finonganscripture.finongan

This error is because the build system isn’t putting any files in the build folder. The actual error is almost certainly higher up in the log.

I’m getting very similar results, meaning an error and no output. I’m pretty sure the actual error comes here:

Error: Adding document, likely not USFM? : data\books\C01\02 Noah.usfm
{“errors”:[{“message”:“Attempt to import document with bookCode ‘undefined’ which already exists in docSet en_C01”,“locations”:[{“line”:3,“column”:37}],“path”:[“addDocument”]}],“data”:null}
at C:\Users\mjames\AppData\Local\Temp\App Builder\build\SAB.010\p\appbuilder-pwa\scripts\convertBooks.ts:211:47
at SABProskomma.gqlQuery (C:\Users\mjames\AppData\Local\Temp\App Builder\build\SAB.010\p\appbuilder-pwa\node_modules\proskomma-core\dist\index.js:50585:9)
at processTicksAndRejections (node:internal/process/task_queues:95:5)

The source documents are Bible Modules, so they are USFM but maybe not the scripture-only order that SAB expects. Is that the problem? Exactly what kinds of files can PWA support (and not support)?

With the Modern PWA, we had to use a JavaScript-based USFM parser (Proskomma) which is more strict that the USFM Parser in the native Android/iOS apps.

The message “Attempt to import document with bookCode ‘undefined’ which already exists” seems to indicate that you used non-standard \id ID book code ids.

The official USFM documentation for \id states that the code:

This is the initial USFM marker in any scripture text file.
CODE is a standard 3 letter scripture book abbreviation

Extra material is supposed to use XXA, XXB, XXC, etc.

I have submitted an issue to see if it would be acceptable to use CODE with more than 3 letters.

To work-around the issue, you can use standard book ids for extra biblical material.

Chris

Thank you for figuring that out. Yes, the USFM spec wasn’t written with Bible Modules in mind. For example, the XXA books in PT aren’t really sufficient for a number of projects I’m working with. Many of them import from so many Bible Modules that PT’s XXA-XXG limitation quickly becomes an issue.

In the meantime I’ll experiment with seeing if I can change the id’s, either inside of SAB or, if necessary, as part of my Python import process.

With are current parser, you can use XXA-XXZ. You could probably use other three-letter codes, as long as it isn’t a known code. Try other three-letter codes starting with X?