Skip to Content

Cannot use AssetService due to undefined error

Hello colleagues,

I'm creating a Portal Site, which tries to load an image that was uploaded in the Asset Management.

When I execute this command:

I receive the error message in my console:
Uncaught TypeError: Cannot read property 'hasNoAdapter' of undefined
at C.getService (
at eval (eval at evaluate (:117:21), <anonymous>:1:22)

However, I'm still able to get the services SiteService and CrossApplicationNavigation

I'm trying to execute the steps provided in this exercise url (page 35) and this API link.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Dec 28, 2016 at 01:04 PM


    Please check the network .through CMD and enter Ping then host name whether it is reachable or not



    Add comment
    10|10000 characters needed characters exceeded

    • Hi Dinesha,

      This makes sense. Today I had to set a different proxy in my computer before testing the Portal application again.

      But do you know why only the asset service fails and the other (navigation or SiteService) work fine?


  • Dec 28, 2016 at 01:01 PM

    Not sure why, but after I added the code in a try catch the sap.ushell.Container.getService('AssetService') started working without problems althoght I receive a 403.

    If execute it without the try catch the code breaks due to the error message described above.


    Add comment
    10|10000 characters needed characters exceeded