1 Reply Latest reply on Sep 2, 2015 6:01 AM by jdvande

    ToDo app example broken?

    jdvande

      I've been playing around with the JiveSDK trying to get a handle on how things work, I can build and install the photoalbum example, but everytime I try to run ToDo I get the following error:

       

      [2015-08-27 13:42:39.671] [ERROR] jive-sdk - Error: TypeError: Cannot read property 'indexOf' of undefined

          at testapps/node_modules/jive-sdk/jive-sdk-service/lib/extension/extension.js:144:21

          at _rejected (testapps/node_modules/jive-sdk/node_modules/q/q.js:890:24)

          at testapps/node_modules/jive-sdk/node_modules/q/q.js:917:30

          at makePromise.when (testapps/node_modules/jive-sdk/node_modules/q/q.js:734:31)

          at makePromise.promise.promiseDispatch (testapps/node_modules/jive-sdk/node_modules/q/q.js:551:41)

          at Immediate._onImmediate (testapps/node_modules/jive-sdk/node_modules/q/q.js:438:41)

          at processImmediate [as _immediateCallback] (timers.js:367:17)

      FATAL - [Error: TypeError: Cannot read property 'indexOf' of undefined]

       

       

      any idea what's going on?

      Ryan Rutan? anyone? (who is the best person to @mention with jiveSDK issues?)

        • Re: ToDo app example broken?
          jdvande

          Okay so I found the issue.  Turns out that the Jive-SDK doesn't like case-sensitive filesystems.

           

          Aron Racho  the problem turns out to be one of the Tiles in the todo app.  The activity-stream component of the Todo example is named todoActivity.  This causes the marshalling of the extension_src (and therefore extension.zip) to crash.

           

          lines 697 - 702 of service.js:

          if ( !processedTile['config']) {
               // compute if a configure URL is required based on presence of the autowired route
               var path = _dir('/tiles') + '/' + name.toLowerCase() + '/backend/routes/configure/get.js';
               if ( fs.existsSync(path) ) {
                    processedTile['config'] = host + '/' + processedTile['definitionDirName'] + '/configure';
               }
          }
          

           

          As you can see, it forces the path from "/tiles/todoActivity/backend/routes/configure/get.js" to "/tiles/todoactivity/backend/routes/configure/get.js" which are not the same thing in a case-sensitive filesystem.  As a result 'processedTile['config']' is never set.  This causes the error above when it gets to line 747

          if (processedTile['config'].indexOf('/public') == 0) {
          

           

           

          The work-around was to rename the directory to todoactivity.  But it would be nice if a proper fix was implemented to deal with the fact that some filesystems are case-sensitive.

           

          (I know you and a lot of jivers are Mac users presumable on the default case-insensitive HFS+ so never noticed this)

           

          cheers.

          John v.