Form-Model cannot be loaded

Dear all,

I’m quite lost and frustrated and hope that someone can help or suggest something that I could try, other than what I already tried.

I did some changes to an existing form-model (that go hand in hand with some prior document-model changes). There are no errors whatsoever in the SME, but when I open the preview I get:

When I start my BAP application with that form-model I get the following errors in the browser console:
vendor-a12.bundle.a052c180.js?73849aa8b05b270ff931:24 core/model An error occurred during the loading of some models! {type: 'POST_PROCESSING_FAILED', message: 'Post processing for model "EventCancellation_form" failed.', source: TypeError: Cannot read properties of undefined (reading 'convertWithOnlyBasicTypeCheck')

message: "Post processing for model \"EventCancellation_form\" failed.

Then I tried starting the SME with logging and the only additional error message I got out of it was:
[25616:0829/172507.704:INFO:CONSOLE(425)] "Error: Internal Error: Screen "/screenDummy" was not found!", source: http://localhost:52064/vendors.e7c5bd7e9ef51c4f140c.js (425)
But I don’t have and never had a screen called screenDummy in my form-model.

Now I’m out of ideas and still have no clue what’s wrong with my form-model :frowning:

Unfortunately this is very urgent, so I’m happy for any suggestion!

Cheers,
Bianca

P.S.: The reason I’m not uploading any models here is because my setting is very complex: the underlying document model is a CDM and therefore I would need to give you all relationship models, all bindings and so on…

So my first hope would be that someone could maybe tell me to set a breakpoint somewhere in the browser console to get deeper/more detailed information, or something…

Hi,

the error is probably originating here: form-engine/core/src/back-end/store/internal/kernel-adapter.ts?at=release%2F36.7.4#94-99 you may be able to put a breakpoint in this function and trace why the form model references a field that is not available in the validation code.
This could be happening if the validation code was not regenerated after adding the field. Depending on your setup, you may try the following:

  1. Make sure that the field is present in the (document) model that the backend will load
  2. Clean & restart backend so document models are collected
  3. Check that the field is present in the document model that the backend sends to the client

I hope this helps finding the issue.

The result of many hours of preparation and analysis is:
I changed the path of a field, but did not adapt the context path of an expression (reading that field) accordingly. And the SME doesn’t mind/validate wrong context paths in expressions…

Thank you @alexander-async-gorge for your help!