cancel
Showing results for 
Search instead for 
Did you mean: 

WebIDE generated UI5 app fails when run as widget in HCP Portal

Former Member
0 Kudos

Hi All,

I've spent far too long staring at this problem and searching for a fix, I'm finally giving up and posting here for help!

I've created a simple Northwind based application using WebIDE on my trial HCP account.  It works great as both a standalone app and embedded into a Fiori launchpad within my HCP Portal on the same trial account.  It deploys to my HCP account no problem and runs from there fine.

This is how it looks when run standalone:

I'm sure many of you will have seen this app before

This afternoon I've added the <appname>.spec.xml file to enable it to be created as a widget in HCP Portal, then used the Content tab in HCP Portal to add it as a new widget.  This has all appeared to have worked correctly, however when I then publish and test my Portal site, I see the following:-

As you can see, the first entry in the master list is not selected, and I get a "Not Found" text at the top.  If I click on the first entry in the master list, I then get this:

The Detail pane never loads.  In Chrome's console I see the following:-

and then if I refresh the page I see the following:-

Its been a long day and no amount of me staring at this is switching any lightbulbs on for me to fix it - any ideas?!

Cheers,

G.

Accepted Solutions (1)

Accepted Solutions (1)

HPSeitz
Active Participant
0 Kudos

debug  🙂

Former Member
0 Kudos

Erm yeah, need to re-focus and brush up my skills again on that front

Going to try a slightly quicker alternative first, by creating a new test app, just in case it is something more rudimentary.  I've had a very basic UI5 application (just a button that triggers an alert) working with no problems.  I want to understand if it is the Master/Detail pattern or something more fundamental.

Cheers,

G.

santhu_gowdaz
Active Contributor
0 Kudos

I too create master/Detail view, It's working fine for me. But i noticed your neo-app.json doesn't contail the routes path.

my neo-app.json looks below,

{

  "welcomeFile": "index.html",

  "routes": [

    {

      "path": "/sap/opu/odata",

      "target": {

        "type": "destination",

        "name": "MasterDetail",

        "entryPath": "/sap/opu/odata"

      },

      "description": "MasterDetail"

    },

    {

      "path": "/resources",

      "target": {

        "type": "service",

        "name": "sapui5",

        "entryPath": "/resources"

      },

      "description": "SAPUI5 Resources"

    },

    {

      "path": "/test-resources",

      "target": {

        "type": "service",

        "name": "sapui5",

        "entryPath": "/test-resources"

      },

      "description": "SAPUI5 Test Resources"

    }

  ]

}

Former Member
0 Kudos

Thanks Santhosh, I only showed an excerpt of my neo-app.json file earlier - here is the full file for reference:

{

  "welcomeFile": "index.html",

  "authenticationMethod":"none",

  "routes": [

    {

      "path": "/destinations/Northwind",

      "target": {

        "type": "destination",

        "name": "Northwind"

      },

      "description": "Northwind OData Service"

    },

    {

      "path": "/resources",

      "target": {

        "type": "service",

        "name": "sapui5",

        "entryPath": "/resources"

      },

      "description": "SAPUI5 Resources"

    },

    {

      "path": "/test-resources",

      "target": {

        "type": "service",

        "name": "sapui5",

        "entryPath": "/test-resources"

      },

      "description": "SAPUI5 Test Resources"

    }

  ]

}

Cheers,

G.

HPSeitz
Active Participant
0 Kudos

Hi G,

as the app is partially running (master is coming with data from the backend service): UI5 and the backend connectivity seems to run. So probably it is something more tricky, especially as the app is running standalone fine. Probably it has something to do with the environment in which it is running

I guess you have already cleared the browser cache?!

Probably you need to make your hands dirty and debug the step which do not work (Chrome dev tools, put break points at the relevant points in the source).

Have fun,

HP

Former Member
0 Kudos

Hi,

I've not been able to get any further into this problem yet but have kicked off my HCP instance this morning and launched my Portal to take a look.  Interestingly, this morning I'm getting a different error in the Chrome console:-

Failed to load resource: net::ERR_EMPTY_RESPONSE - http:// cloudportaltrial-***********trial.static.hanatrial.ondemand.com/portal/v1/sites/d92e95b2-0039-4445-a0f1-3fd06451f01b/theme?ts=5&5&type=ui5 Failed to load resource: net::ERR_EMPTY_RESPONSE

Here's a screenshot of it in action:-

If I click on an entry in the master list I then see this error:

I'm just about to reload with debug sources on but will very quickly be in over my head I suspect (really not done much UI5 debugging at all yet) so if anyonce can spot the obvious problem first, that would be great!

Cheers,

G.

Message was edited by: Gareth Ryan Managed to press submit before I'd finished typing!

Answers (4)

Answers (4)

Former Member
0 Kudos

Cheers all for the answers so far...

My index.html now looks like this:

<script id="sap-ui-bootstrap"

  src="https://sapui5.netweaver.ondemand.com/sdk/resources/sap-ui-core.js"

  data-sap-ui-libs="sap.m"

  data-sap-ui-theme="sap_bluecrystal"

  data-sap-ui-xx-bindingSyntax="complex"

  data-sap-ui-resourceroots='{"com.test.northwind": "./"}'>

  </script>

And my neo-app.json still contains this:

    {

      "path": "/resources",

      "target": {

        "type": "service",

        "name": "sapui5",

        "entryPath": "/resources"

      },

      "description": "SAPUI5 Resources"

    },

The app still works fine stand-alone (although it still throws an error that it can't find sap-ui-core.js, when it obviously can.)  However I'm still having issues with it running when embeded within HCP...

Cheers,

G.

Private_Member_15166
Active Contributor
0 Kudos

Yes i agree with .

Just for testing purpose put src eq this.

src="https://sapui5.netweaver.ondemand.com/sdk/resources/sap-ui-core.js"

and check if it's working or not.

If it will work then this is the same issue as suggested.

Qualiture
Active Contributor
0 Kudos

Am not sure, but the 'sap-ui-core.js not found' error indicates the SAPUI5 libs cannot be found at the /ui5-dist/resources location on your cloudportal host.

I just checked, but the bootstrap path for my trial cloud portal resolves to the same context root, and works ok...

Former Member
0 Kudos

Beuller...  Beuller..

Seriously, if people want to tell me I'm a complete idiot and should search harder or read the document that talks about this issue, that would be welcome.  I'm just really looking for a start point to try and figure out what I'm missing!

Cheers,

G.

agentry_src
Active Contributor
0 Kudos

Hi Gareth,

Ringing in some other folks to take a look.  Not sure I have ever seen this topic come up before, so not sure who are the experts.

, , , Any ideas who would know the answer here?

Thanks, Mike

SAP Technology RIG