# \_addon.Getting\_GetRecordingPath is not a function

**URL:** <https://devforum.zoom.us/t/addon-getting-getrecordingpath-is-not-a-function/4722>\
**Category:** macOS\
**Created:** [June 21, 2019, 11:02am UTC](https://devforum.zoom.us/t/addon-getting-getrecordingpath-is-not-a-function/4722 "2019-06-21T11:02:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sloppy.cao](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sloppy.cao/32/942_2.png) [@sloppy.cao](https://devforum.zoom.us/u/sloppy.cao)\
**Post date:** [June 21, 2019, 11:02am UTC](https://devforum.zoom.us/t/addon-getting-getrecordingpath-is-not-a-function/4722/1 "2019-06-21T11:02:11Z")

</div>

**Description**

when i call zoomsdk.GetSetting().GetRecordingSetting().Getting\_GetRecordingPath(),get en error as below:

Uncaught Exception:  
TypeError: \_addon.Getting\_GetRecordingPath is not a function  
at Object.Getting\_GetRecordingPath

**Which version?**  
mac electron

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [June 21, 2019, 10:07pm UTC](https://devforum.zoom.us/t/addon-getting-getrecordingpath-is-not-a-function/4722/2 "2019-06-21T22:07:40Z")

</div>

Hi Sloppy.cao,

Thanks for using Zoom SDK. The Getting\_GetRecordingPath is inside here: [https://github.com/zoom/zoom-macsdk-electron/blob/master/lib/zoom\_setting\_recording.js#L35](https://github.com/zoom/zoom-macsdk-electron/blob/master/lib/zoom_setting_recording.js#L35), and the error you are getting, if might be either your \_addon is not successfully initialized, or your ZoomRecordingSetting instance is not been initialized successfully. You can refer to the following part: [https://github.com/zoom/zoom-macsdk-electron/blob/d01da57f455f01f5256bace5a86a7a1451b99334/lib/zoom\_setting.js#L77](https://github.com/zoom/zoom-macsdk-electron/blob/d01da57f455f01f5256bace5a86a7a1451b99334/lib/zoom_setting.js#L77), as you can see, if the \_addon part is null, then it will return null instead of the ZoomRecordingSetting instance, then calling the methods in this instance will bring you the error you are getting.

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![sloppy.cao](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sloppy.cao/32/942_2.png) [@sloppy.cao](https://devforum.zoom.us/u/sloppy.cao)\
**Post date:** [June 22, 2019, 1:23am UTC](https://devforum.zoom.us/t/addon-getting-getrecordingpath-is-not-a-function/4722/3 "2019-06-22T01:23:13Z")

</div>

hello, i try to console \_addon at line77 and line35,found \_addon is null,just:{},and i run the demo code follow as:[https://github.com/zoom/zoom-macsdk-electron,and](https://github.com/zoom/zoom-macsdk-electron,and) other zoom function is ok,for example,join meeting,login,auth sdk,anything wrong with the demo code?and i found the mac init sdk code as below:

```
//mac initoption
var ZOOMSDKMOD = require("./lib/zoom_sdk.js")
var initoptions={
    path:'',
    threadsafemode:0,
    ostype:ZOOMSDKMOD.ZOOM_TYPE_OS_TYPE.MAC_OS,
}
const zoomsdk = ZOOMSDKMOD.ZoomSDK.getInstance(initoptions)
```

the path is empty,is the right?

---

<div class="post-metadata">

**Author:** ![sloppy.cao](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sloppy.cao/32/942_2.png) [@sloppy.cao](https://devforum.zoom.us/u/sloppy.cao)\
**Post date:** [June 22, 2019, 3:51am UTC](https://devforum.zoom.us/t/addon-getting-getrecordingpath-is-not-a-function/4722/4 "2019-06-22T03:51:12Z")

</div>

and i found zooksdk\_bridge.js has only implement getAuthService, there is not an implement getSettingService

---

<div class="post-metadata">

**Author:** ![sloppy.cao](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sloppy.cao/32/942_2.png) [@sloppy.cao](https://devforum.zoom.us/u/sloppy.cao)\
**Post date:** [June 22, 2019, 5:24am UTC](https://devforum.zoom.us/t/addon-getting-getrecordingpath-is-not-a-function/4722/5 "2019-06-22T05:24:39Z")

</div>

and i found there is no setting bridge.js at lib/mac folder ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/c/cd1b18c8bf6f9f9c46e79d187b4a0ed91966e08e.png)

---

<div class="post-metadata">

**Author:** ![sloppy.cao](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sloppy.cao/32/942_2.png) [@sloppy.cao](https://devforum.zoom.us/u/sloppy.cao)\
**Post date:** [June 22, 2019, 8:43am UTC](https://devforum.zoom.us/t/addon-getting-getrecordingpath-is-not-a-function/4722/6 "2019-06-22T08:43:40Z")

</div>

hi,  
i fix it,i found no implement for getSettingService, and i write some code implement this function

**first: create two bridge file ,recording\_setting\_bridge.js,setting\_bridge.js into folder lib/mac**

And file content as below:  
setting\_bridge.js

```auto
var ZOOMSDKMOD = require('../zoom_sdk.js')

var $ = require('../../node_modules/nodobjc');
var ZOOMSDK = require('./zoomsdk_bridge.js');
var RECORDINSETTINGBRIDGE= require("./recording_setting_bridge.js");

var zoomSettingService;
var ZoomSettingBJ = (function () {
    return{
        SetZoomSetting: function(zoomSetting){
            zoomSettingService = zoomSetting;
            if(!zoomSettingService){
                return;
            }
            RECORDINSETTINGBRIDGE.RecordingSettingBJ.SetRecordSetting(zoomSettingService("getRecordSetting"));
        }
  }
})();

module.exports = 
{
  ZoomSettingBJ: ZoomSettingBJ,
}

```

recording\_setting\_bridge.js content as below:

```auto

var ZOOMSDKMOD = require('../zoom_sdk.js')

var $ = require('../../node_modules/nodobjc');
var ZOOMSDK = require('./zoomsdk_bridge.js');

var recordSettingService;
var ReSettingBJ = (function () {
    return{
        SetRecordSetting: function(recordSetting){
            recordSettingService = recordSetting;
        },
        Setting_SetRecordingPath: function(szPath){
            if(!recordSettingService){
                ZOOMSDKMOD.ZoomSDKError.SDKERR_UNINITIALIZE;
            }
            var szPathstring = $.NSString('stringWithUTF8String',szPath);
            var result = recordSettingService('setRecordingPath', szPathstring);
            return result;
        },
        Getting_GetRecordingPath: function(){
            if(!recordSettingService){
                return "";
            }
            var szPath = recordSettingService('getRecordingPath');
            console.log("szPath:"+szPath);
            return String(szPath);
        },
  }
})();

module.exports = 
{
  RecordingSettingBJ: ReSettingBJ,
}

```

**Second ,change some code:**

change lib/zoom\_setting.js **GetRecordingSetting** function add one line code:  
`clientOpts.ostype = _osType`

change lib/zoom\_setting\_recording.js **init** function add code as below:

```auto
 var _osType = clientOpts.ostype;
  // Private methods and variables
 var _addon = clientOpts.addon || null
 var ZOOMSDKMOD_4AUTH = require('./zoom_sdk.js')
 if (ZOOMSDKMOD_4AUTH.ZOOM_TYPE_OS_TYPE.MAC_OS == _osType)
 {
        var SETTINGBRIDGE = require('./mac/recording_setting_bridge.js');
        _addon = SETTINGBRIDGE.RecordingSettingBJ;
 }

```

change lib/mac/zooksdk\_bridge.js add code as below to function **InitComponent** :

```auto
var ZOOMSETTINGBRIDGE = require('./setting_bridge.js')
var settingService = zoomSDK('getSettingService');
if(settingService){
      ZOOMSETTINGBRIDGE.ZoomSettingBJ.SetZoomSetting(settingService);
}

```

**then i can call the function in my project code as below:**  
`zoomsdk.GetSetting().GetRecordingSetting().Getting_GetRecordingPath();`

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [June 24, 2019, 5:56pm UTC](https://devforum.zoom.us/t/addon-getting-getrecordingpath-is-not-a-function/4722/7 "2019-06-24T17:56:44Z")

</div>

Hi,

Thank you very much for your reply and the details. Glad to hear that you problem has been resolved.

Thanks!

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 6:30pm UTC](https://devforum.zoom.us/t/addon-getting-getrecordingpath-is-not-a-function/4722/8 "2020-08-21T18:30:34Z")

</div>

Closed on August 21, 2020, 6:30pm UTC


