Millau upgrade 11.2.9 ('Adapter' of undefined)

  • 1
  • Problem
  • Updated 1 month ago
  • Solved
  • (Edited)
I recently upgraded Skuid from version Rockaway - Iteration 15 8.15.17 to Millau 11.2.9 (JQuery 1.11.1 to 3.0.0).  I am troubleshooting the following JavaScript error:

Uncaught TypeError: Cannot read property 'Adapter' of undefined
    at skuid__RESTAdapterJS:2
    at skuid__RESTAdapterJS:2

/*! Rockaway - Iteration 15 8.15.17 09-05-2017 */ (Line 894)
 new a.adapter.Adapter({  //Error occuring here
        buildEntityMetadataRequest: F,
        getEntityMetadata: J,
        getEntityMetadataCacheKey: I,
        getEntityMetadataLoadingMessageFromBreadcrumb: G,
        getMethodProperties: O,
        getNameField: q,
        getNewId: o,
        initialize: K,
        isNewId: n,
        load: L,
        makeRequest: v,
        name: "REST",
        populateBreadcrumbFromEntityMetadata: D,
        processEntityMetadataRequest: E,
        properties: P,
        save: M,
        setDefaultConditionState: N
})

This issue is occuring in the Rockaway js resource on the page load.  I was able to google a similar issue but not sure if they are related in any way: https://gist.github.com/zachelrath/4eef2eceaa2d56be9cf2   

Any help would be greatly appreciated,

Thanks!
Photo of Bonzy

Bonzy

  • 132 Points 100 badge 2x thumb

Posted 2 months ago

  • 1
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 11,050 Points 10k badge 2x thumb
Hi Bonzy,

That looks to be related to an external data source. If your page is making use of an external data source (in this case, it looks like it's a REST data source), I would recommend doublechecking the data source, and possibly recreating it. Data sources have changed quite a bit between Rockaway and Millau, so it's hard to say what might be happening here. 
Photo of Bonzy

Bonzy

  • 132 Points 100 badge 2x thumb
Hey Mark,

Yes, I had thought the same thing but after further investigation, it turns out that it is related to a static resource called RestAdapterJS that is no longer being treated as part of the skuid managed package.  After the upgrade to Millau, there were 4 new REST Adapter related static resources added to the skuid managed package.  The old RestAdapterJS static resource was included as a JS snippet on our skuid page.  When I removed the JS snippet, the "adapter" error went away (but not sure if this is what I was supposed to do).  I guess my next question is, was there any other post upgrade steps needed for the inclusion of these newly added resources?

New REST Adapter Resources
RelationalDataSourceTypeBaseJS
RESTDataSourceTypeBaseJS
RESTDataSourceTypeJS
RESTDataSourceUtilsJS



Old REST Adapter Resource
RESTAdapterJS

Thanks!
(Edited)
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 11,050 Points 10k badge 2x thumb
Hi Bonzi,

That sounds like the right next step. Are the page's data sources working as expected? 
Photo of Bonzy

Bonzy

  • 132 Points 100 badge 2x thumb
Hey Mark, we are still in the middle of testing so not 100% sure.  I'm also not sure why RESTAdapterJS was included on our skuid page as a static resource snippet to begin with.  I would assume that all managed package resources are included on every page by default (so there would be no need to manually add them).  

Thanks for the help!
(Edited)