Uncaught TypeError: Cannot read property 'getService' of undefined thrown for skuid.service.getService()

  • 1
  • Problem
  • Updated 2 years ago
  • Solved
  • (Edited)
Hi,

After the upgrade to SKUID Brooklyn 9.3.3 version I have been getting -
Uncaught TypeError: Cannot read property 'getService' of undefined error for skuid.service.getService() calls.

Could someone please suggest what the problem could be? This was working perfectly fine before the upgrade to Brooklyn Iteration 1 or 2 .

This is really urgent as my application is not working anymore.

Thanks & Regards,
Anshulika
Photo of anshulika sharan

anshulika sharan

  • 210 Points 100 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,200 Points 5k badge 2x thumb
Anshulika,
  • What version of Skuid were you on before? 
  • Are you seeing this issue across a few pages or multiple pages?
  • If multiple pages, do those pages have anything in common?
  • Is there an external data source on the page that's experiencing this issue?
Thanks!
Amy
Photo of anshulika sharan

anshulika sharan

  • 210 Points 100 badge 2x thumb
HI Amy,

We have fixed the issue by using skuid.dataSource.get( dataSourceName ).

Thank you for your response.

Anshulika

Photo of Zach McElrath

Zach McElrath, Employee

  • 49,004 Points 20k badge 2x thumb
Anshulika,

skuid.service.getService() is not and has never been a documented API, it was never supported and was removed in the Brooklyn release. I am curious what you were using it for? 

The supported API which is available in Brooklyn (which we have not documented yet but are planning to) is skuid.dataSource.get( dataSourceName ), this enables you to get a reference to a DataSource through its name. If you swap this out for skuid.service.getService(), your code should start working again.

Best,

Zach
Photo of anshulika sharan

anshulika sharan

  • 210 Points 100 badge 2x thumb
HI Zach,

Thank You for your response. We had already figured this out and have fixed the issue :)!

Thank you again for the help.

Regards,
Anshulika
(Edited)