PharmaLedger-IMI / ctr-workspace

UC8 Clinical Trials Recruitment
MIT License
2 stars 0 forks source link

v0.10.2 patient-ssapp Dashboard does not always refresh properly after initial load #60

Open joaoluis-pdm opened 2 years ago

joaoluis-pdm commented 2 years ago

Mostly on google-chrome, the DB records "Your Match Requests" seem not to refresh.

image

The DashboardController seems not to receive the EVENT_SSAPP_HAS_LOADED and neither the EVENT_REFRESH on the default tab.

joaoluis-pdm commented 2 years ago
[3:54 PM] João Paulo Luís
    Hummm. Em chrome,  o DashboardController não chega a apanhar os eventos,
EVENT_SSAPP_HAS_LOADED
pq não foi sequer instanciado quando esse evento dispara. (Ou seja, o HomeController corre o

self.on(EVENT_SSAPP_HAS_LOADED
quando os outros controllers pode ainda nem existir... confused

​[3:55 PM] Tiago José Torres Venceslau
    hummmmm ele dispara o evento antes do webcardinal ligar os controladores?

​[3:56 PM] João Paulo Luís
    Sim. Coloquei console.log no início e final de cada constructor, 
e o evento acontece antes sequer do DashboardController.constructor() começar a correr... sad
joaoluis-pdm commented 2 years ago

v0.10.3 contains the previous commit.

The previous workaround seems to work for now. But @TiagoV-PDMFC has different proposal. In FGT, he managed to delay the initialization of the other controllers by placing a

around each template. The HomeController updates the model @identified when the model initialization is ready. And WebCardinal only initializes the other controllers afterwards...

                    <ion-tab tab="tab-stock">
                            <ion-content class="tab-content" overflow-scroll="true">
                                <div data-if="@identified">
                                    <webc-template template="stock" disable-container></webc-template>
                                </div>
                            </ion-content>
                        </ion-tab>

Asking RomSoft if this behaviour is dependeable.

joaoluis-pdm commented 2 years ago

Still happened at least once on TST on v0.10.3

joaoluis-pdm commented 2 years ago

Still not fixed on v0.10.11. MS-Edged on a Windows 10 PT: image

Uncaught (in promise) Error: DB is not initialized
    getStorage https://ctr-dev.pharmaledger.pdmfc.com/iframe/3JstiXPCRm1hcfvcJE2ieHuauGB2J1Eg8fi3HuE9dVYMAuy5Mx1S7imyaBk5p7EY1Pi9Yuc3bTX4yBrwqFW3wSLo/scripts/bundles/wizard.js:3660
    query https://ctr-dev.pharmaledger.pdmfc.com/iframe/3JstiXPCRm1hcfvcJE2ieHuauGB2J1Eg8fi3HuE9dVYMAuy5Mx1S7imyaBk5p7EY1Pi9Yuc3bTX4yBrwqFW3wSLo/scripts/bundles/wizard.js:4326
    getAll https://ctr-dev.pharmaledger.pdmfc.com/iframe/3JstiXPCRm1hcfvcJE2ieHuauGB2J1Eg8fi3HuE9dVYMAuy5Mx1S7imyaBk5p7EY1Pi9Yuc3bTX4yBrwqFW3wSLo/scripts/bundles/wizard.js:1991
    DashboardController https://ctr-dev.pharmaledger.pdmfc.com/iframe/3JstiXPCRm1hcfvcJE2ieHuauGB2J1Eg8fi3HuE9dVYMAuy5Mx1S7imyaBk5p7EY1Pi9Yuc3bTX4yBrwqFW3wSLo/scripts/controllers/DashboardController.js:43
    getIdentity https://ctr-dev.pharmaledger.pdmfc.com/iframe/3JstiXPCRm1hcfvcJE2ieHuauGB2J1Eg8fi3HuE9dVYMAuy5Mx1S7imyaBk5p7EY1Pi9Yuc3bTX4yBrwqFW3wSLo/scripts/bundles/wizard.js:3545
    getObject https://ctr-dev.pharmaledger.pdmfc.com/iframe/3JstiXPCRm1hcfvcJE2ieHuauGB2J1Eg8fi3HuE9dVYMAuy5Mx1S7imyaBk5p7EY1Pi9Yuc3bTX4yBrwqFW3wSLo/scripts/bundles/iframeBoot.js:41695
    doDownload https://ctr-dev.pharmaledger.pdmfc.com/iframe/3JstiXPCRm1hcfvcJE2ieHuauGB2J1Eg8fi3HuE9dVYMAuy5Mx1S7imyaBk5p7EY1Pi9Yuc3bTX4yBrwqFW3wSLo/scripts/bundles/iframeBoot.js:41482

Also another error (could it be ignored?):

Uncaught (in promise) DOMException: IDBDatabase.transaction: Can't start a transaction while running an upgrade transaction iframeBoot.js:32377
joaoluis-pdm commented 2 years ago

When testing with issue #93 the error above occurs more frequently.

image

joaoluis-pdm commented 1 year ago

The DB not initialized continues to occur frequently on v0.11.6

imagem