Skip to Content

[SAP UI5] - Some ressources could not be loaded after a certain amount of time

Hello Everyone,

I recently wrote a SAP UI5 (Master / Detail Theme) application, which is now used in the company. Now I have received a bug report which says that after about half an hour (of inactivity) fragments (dialogs), which are called by the detail controller, can't be loaded anymore. The following error is thrown:

sap-ui-core.js:217 Uncaught Error: resource .../.../.../view/AddRecordDialog.fragment.xml could not be loaded from ./view/AddRecordDialog.fragment.xml. Check for 'file not found' or parse errors. Reason: Error: Invalid XML: <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html 
    xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
            <meta http-equiv="pragma" content="no-cache" />
        </head>
        <body style="background-color:#FFFFFF">
    <h1>Unauthorized</h1>
        <HR size="1" noshade="noshade">
            <p>
                <b>type</b> Status report
            </p>
            <p>
                <b>message</b>
                <u>Unauthorized</u>
            </p>
            <p>
                <b>description</b>
                <u>This request requires HTTP authentication.</u>
            </p>
        </body>
    </html>
    at Object.error (sap-ui-core.js:217)
    at p (sap-ui-core.js:2116)
    at Object.fireWith [as rejectWith] (sap-ui-core.js:2116)
    at h3 (sap-ui-core.js:2116)
    at XMLHttpRequest.<anonymous> (sap-ui-core.js:2116)
    at Object.send (sap-ui-core.js:2116)
    at Function.ajax (sap-ui-core.js:2116)
    at Object.b.loadResource (sap-ui-core.js:217)
    at Object.X.loadTemplate (library-preload.js:819)
    at constructor.init (library-preload.js:362)

The strange thing about this error is that it only appears in fragments called by the detail controller. Fragments called from the master side works fine.

I guess the detail page timed out somehow. Is there a way to programmatically re-authenticate to the server side?

Thank you for every answer. I hope you can help me with my problem.

Cheers Jannik

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Mar 15 at 11:14 AM

    Hi Jannik,

    An app should timeout completely and not the individual views ( Master/Detail).

    Does the same scenario happens if you have loaded a fragment from Detail Controller and then wait for another half hour and try to reload it.

    I think the way your fragments are loaded in the view is making the difference.

    Can you check what is the difference in the loading of fragments in both Views ?

    If possible can you share your code for Controllers to identify the root cause.

    Thanks,

    Vaibhav Maheshwari

    Add comment
    10|10000 characters needed characters exceeded