in our new project I have removed UAA and am trying to load modules produced in SME.
im getting errors in the console when trying to load these models (getServerConnector).
there are no requests sent from the client to the server, it is failing in the client before sending them.
erros form console:
extensions/platform-server-connectors Request {method: 'GET', relativeUrl: '/v2/models/Pruefung_om', customHeaders: Array(1)}
custom-form.loader.ts:30 custom-form.loader false
ConsoleStrategies.js:126 core/application Data Provider "PlatformDocumentListDataLoader" can handle "{"model":"Pruefung_dm"}"
ConsoleStrategies.js:126 core/application Loading: data provider PlatformDocumentListDataLoader handles 1 data holder(s).
{
"type": "NOT_FOUND",
"message": "Cannot receive model "Pruefung_om" from server.",
"source": {}
}
extensions/platform-server-connectors Request {method: 'GET', relativeUrl: '/v2/models/Pruefung_om', customHeaders: Array(1)}
custom-form.loader.ts:30 custom-form.loader false
ConsoleStrategies.js:126 core/application Data Provider "PlatformDocumentListDataLoader" can handle "{"model":"Pruefung_dm"}"
ConsoleStrategies.js:126 core/application Loading: data provider PlatformDocumentListDataLoader handles 1 data holder(s).
ConsoleStrategies.js:126 core/model {type: 'NOT_FOUND', message: 'Cannot receive model "Pruefung_om" from server.', source: TypeError: Cannot read properties of undefined (reading 'getServerConnector')
at fetchServerReq…}
ConsoleStrategies.js:126 core/application Error while loading activity (ID 2) Error: Cannot receive model "Pruefung_om" from server.
at Object.provideData (createDataProviderForDataLoader.ts:113:11)
at [provideData.next](https://provideData.next) (<anonymous>)
at next (redux-saga-core.esm.js:1157:1)
at Object.currCb [as cont] (redux-saga-core.esm.js:1251:1)
at end (redux-saga-core.esm.js:1012:1)
at task.cont (redux-saga-core.esm.js:836:1)
at next (redux-saga-core.esm.js:1170:1)
at currCb (redux-saga-core.esm.js:1251:1)
at runSelectEffect (redux-saga-core.esm.js:731:1)
at runEffect (redux-saga-core.esm.js:1204:1)
app setup
const dataHandlers: DataHandlers = {
dataEditors: [],
dataLoaders: [...dataLoaders, ...platformServerConnectors.loaders.dataLoaders],
dataProviders: [createEmptyDocumentDataProvider()]
};
config = ApplicationFactories.createApplicationSetup({
model: appModel,
modelLoaders: platformServerConnectors.loaders.modelLoaders,
applicationBusyTriggers: {
start: [UaaActions.loggingInLocal],
end: [UaaActions.loggedIn, UaaActions.loginFailed]
},
applicationResetTriggers: {
resetRequested: [UaaActions.logoutRequested],
resetConfirmed: UaaActions.loggingOut(),
reset: [UaaActions.loggedOut]
},
dataHandlers,
overridePlatformSagas: [...DirtyHandlingFactories.createSagas()],
customSagas: [
...CRUDFactories.createSagas(),
...formEngineSagas,
LoadAddressesSaga,
DeepLinkingFactories.createWelcomePageSaga({ applyTriggers: [UaaActions.loggedIn] })
],
preComputeNewDocuments: true,
composeEnhancer: isProduction ? undefined : enableReduxDevTools(),
additionalMiddlewares: [
...createFormEngineMiddlewares(),
CRUDFactories.createCRUDMiddleware(),
...platformServerConnectors.middlewares,
setLocaleKeycloakOnLoginMiddleware,
registerModulesOnLoginMiddleware,
unregisterModulesOnLogoutMiddleware,
devToolMiddleware(),
],
dataReducers: [...formEngineDataReducers],
reducerMap: {
mainViewReducer
}
});
/*
* Listen to the window.onbeforeunload event to trigger a dialog
* if there are dirty or locked activities when the application gets closed.
*/
window.onbeforeunload = () => {
// Show the dialog if there are dirty or locked activities.
const dirtySubTree = ActivitySelectors.allDirtyOrLockedActivities()(config.store.getState());
if (dirtySubTree.length > 0) {
/* This string will not be shown in most modern browser versions,
* instead a browser specific message will be shown:
* https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload#Browser_compatibility
*
* Current Firefox (version 100.0.x) and Chromium (version 101.0.x) display a browser-specific alert box.
*/
return "Changes you made may not be saved.";
} else {
return undefined;
}
};
return {
config,
initialStoreActions: async () => {
config.store.dispatch(UaaActions.loggedIn({
user: {username: "admin", displayName: "admin"},
type: AuthenticationType.LOCAL
}));
}
};
as far as I understand we need to create a custom form/overview loader, or perhaps not because Its failing somewhere in the client, probably because of missing configuration.
any input on the matter would be very helpful.
dependencies versions:
"@com.mgmtp.a12.base/base-model-api": "27.0.0",
"@com.mgmtp.a12.client/client-core": "14.2.1",
"@com.mgmtp.a12.dataservices/dataservices-access": "36.1.1",
"@com.mgmtp.a12.formengine/formengine-core": "36.2.1",
"@com.mgmtp.a12.kernel/kernel-core-runtime-api-ts": "28.1.0",
"@com.mgmtp.a12.kernel/kernel-md-facade": "28.1.0",
"@com.mgmtp.a12.overviewengine/overviewengine-core": "36.2.1",
"@com.mgmtp.a12.uaa/uaa-authentication-client": "7.2.2",
"@com.mgmtp.a12.utils/utils-connector": "6.0.1",
"@com.mgmtp.a12.utils/utils-localization": "5.5.0",
"@com.mgmtp.a12.utils/utils-localization-react": "5.5.0",
"@com.mgmtp.a12.utils/utils-logging": "5.5.0",
"@com.mgmtp.a12.widgets/widgets-core": "36.2.1",