#   wixCrm.notifications.notify ERROR

**URL:** <https://forum.wixstudio.com/t/wixcrm-notifications-notify-error/28252>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [November 10, 2020, 2:00am UTC](https://forum.wixstudio.com/t/wixcrm-notifications-notify-error/28252 "2020-11-10T02:00:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![info39130](https://avatars.discourse-cdn.com/v4/letter/i/e480ec/32.png) [@info39130](https://forum.wixstudio.com/u/info39130)\
**Post date:** [November 10, 2020, 2:00am UTC](https://forum.wixstudio.com/t/wixcrm-notifications-notify-error/28252/1 "2020-11-10T02:00:15Z")

</div>

Hi! I’m having a new error in a backend function I have since many months ago. I have stopped receiving notifications, and right now I’m checking the code and found that when I call this “wixCrm.notifications.notify” it came with a bunch of errors displayed on the console log. My function is:

import wixCrm from ‘wix-crm-backend’ ;

export function notifyNewSignature(pTitle,pDesc,pActionTitle,pURL,pRole) {  
wixCrm.notifications.notify(  
pDesc,  
[“Browser” , “Dashboard” , “Mobile”],  
{  
“title” : pTitle,  
“actionTitle” : pActionTitle,  
“actionTarget” : { “url” : pURL},  
“recipients” : { “role” : pRole} //“Owner” “All\_Contributors”  
}  
);  
[[//console.log](https://console.log)(“Backend: NotificarMessage enviado”)]([//console.log](https://console.log)(“Backend: NotificarMessage enviado”)

})  
[}]([//console.log](https://console.log)(“Backend: NotificarMessage enviado”)

})

**The errors I’m getting are these (displayed on Console Log):**

Unhandled rejection TypeError: logger.debug is not a function at /dynamic-modules/edm\_root/3d049220-22ca-11eb-b9ec-a16ccc5e7368/node\_modules/@wix/wix-crm-backend/src/notifications/api.ts:26:10 at Generator.next () at /dynamic-modules/edm\_root/3d049220-22ca-11eb-b9ec-a16ccc5e7368/node\_modules/@wix/wix-crm-backend/dist/src/notifications/api.js:8:71 at Promise.\_execute (/elementory/node\_modules/bluebird/js/release/debuggability.js:384:9) at Promise.\_resolveFromExecutor (/elementory/node\_modules/bluebird/js/release/promise.js:518:18) at new Promise (/elementory/node\_modules/bluebird/js/release/promise.js:103:10) at \_\_awaiter (/dynamic-modules/edm\_root/3d049220-22ca-11eb-b9ec-a16ccc5e7368/node\_modules/@wix/wix-crm-backend/dist/src/notifications/api.js:4:12) at Object.exports.notify (/dynamic-modules/edm\_root/3d049220-22ca-11eb-b9ec-a16ccc5e7368/node\_modules/@wix/wix-crm-backend/src/notifications/api.ts:25:5) at notifyNewSignature (/user-code/backend/notifications.jsw:4:24) at webMethodWrapper (/elementory/src/js-server-side/web-module-extension.js:39:33) at /elementory/node\_modules/wix-error-boundaries/dist/index.js:11:23 at FunctionExecutor.\_run (/elementory/node\_modules/@wix/cloud-runtime-core/lib/processors/AbstractFunctionExecutor.js:18:26) at FunctionExecutor.\_execute (/elementory/node\_modules/@wix/cloud-runtime-core/lib/processors/FunctionExecutor.js:21:45) at /elementory/node\_modules/@wix/cloud-runtime-core/lib/processors/AbstractFunctionExecutor.js:11:12 at /elementory/node\_modules/@wix/cloud-monitoring-js/index.js:298:22 at FunctionExecutor.execute (/elementory/node\_modules/@wix/cloud-runtime-core/lib/processors/AbstractFunctionExecutor.js:10:85) at /elementory/node\_modules/@wix/cloud-runtime-core/lib/RuntimeProcessor.js:54:34 at /elementory/node\_modules/@wix/cloud-monitoring-js/index.js:298:22 at /elementory/node\_modules/@wix/cloud-runtime-core/lib/RuntimeProcessor.js:53:64 at RuntimeEnvironment.withEnv (/elementory/node\_modules/@wix/cloud-runtime-core/lib/RuntimeEnvironment.js:23:28) at RuntimeProcessor.process (/elementory/node\_modules/@wix/cloud-runtime-core/lib/RuntimeProcessor.js:35:31) at handler (/elementory/src/handlers/web-methods/index.js:74:8) at Layer.handle [as handle\_request] (/elementory/node\_modules/express/lib/router/layer.js:95:5) at next (/elementory/node\_modules/express/lib/router/route.js:137:13) at webMethodRouteValidator (/elementory/src/handlers/web-methods/index.js:39:14) at Layer.handle [as handle\_request] (/elementory/node\_modules/express/lib/router/layer.js:95:5) at next (/elementory/node\_modules/express/lib/router/route.js:137:13) at Route.dispatch (/elementory/node\_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle\_request] (/elementory/node\_modules/express/lib/router/layer.js:95:5) at /elementory/node\_modules/express/lib/router/index.js:281:22 at param (/elementory/node\_modules/express/lib/router/index.js:354:14) at param (/elementory/node\_modules/express/lib/router/index.js:365:14) at param (/elementory/node\_modules/express/lib/router/index.js:365:14) at param (/elementory/node\_modules/express/lib/router/index.js:365:14)

---

<div class="post-metadata">

**Author:** ![info39130](https://avatars.discourse-cdn.com/v4/letter/i/e480ec/32.png) [@info39130](https://forum.wixstudio.com/u/info39130)\
**Post date:** [November 10, 2020, 2:36am UTC](https://forum.wixstudio.com/t/wixcrm-notifications-notify-error/28252/2 "2020-11-10T02:36:53Z")

</div>

OK. New update, I’m also getting an error when I also use this function in the backend (see below), but it just happens (as I know so far) when the UserID is one of the following WIX Role: “Owner” or “administrator”. Same as before, I had this code working without error a long time ago, but right now it isn’t working anymore ☹

wixUsersBackend.emailUser(vEmailAccionable, vUserID1, {  
“variables” : {  
“eSubject” : pSubject,  
“eDesc” : pDesc  
}  
} )  
.then( () =\> {  
} )  
. **catch** ( (err) =\> {  
// there was an error sending the email  
**let** myErr = err  
console.log(vUserID1+ “||” + "fEmailAdmin Error: " + myErr)  
**return** (myErr)  
} );

The error I’m getting is:  
Error: server responded with - {“message”:“”,“details”:{}} (500)

---

<div class="post-metadata">

**Author:** ![shimistudio](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/shimistudio/32/7656_2.png) [@shimistudio](https://forum.wixstudio.com/u/shimistudio)\
**Post date:** [November 11, 2020, 9:34am UTC](https://forum.wixstudio.com/t/wixcrm-notifications-notify-error/28252/3 "2020-11-11T09:34:45Z")

</div>

hi Roger,

I also have issues with previously working code. all my site notifications stopped working about a week ago without notice.

I see that Wix updated the API. you should import:

```javascript
import {notifications} from 'wix-crm-backend';

```

instead of: import wixCrm from’wix-crm-backend’;

and you should delete ‘wixCrm.’ from your code at: wixCrm.notifications.notify(…

it should look like this:

```javascript
export function notifyOwnerOnDashboard() {
4 notifications.notify(
5 "Notification body", 
6 ["Dashboard"], 
7 {
8 "title": "Notification Title",
9 "actionTitle": "Click this!",
10 "actionTarget": {"url": "http://mysite.com/somepage"},
11 "recipients": {"role": "Owner"}
12 }
13 );
14}

```

and that’s the backend side if it wasn’t clear enough.

for the full API go to:  
[https://www.wix.com/corvid/reference/wix-crm-backend/notifications-obj/introduction](https://www.wix.com/corvid/reference/wix-crm-backend/notifications-obj/introduction)

but remember: it’s not working now, I don’t know why. I hope that someone from Wix could help with this matter…

maybe @Aleksander Denga? I see that you helped with a similar issue on another post,

---

<div class="post-metadata">

**Author:** ![shimistudio](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/shimistudio/32/7656_2.png) [@shimistudio](https://forum.wixstudio.com/u/shimistudio)\
**Post date:** [November 11, 2020, 8:02pm UTC](https://forum.wixstudio.com/t/wixcrm-notifications-notify-error/28252/4 "2020-11-11T20:02:45Z")

</div>

i checked now, and i also get the same error saying:  
**logger.debug is not a function**

maybe @yisrael-wix can help?

---

<div class="post-metadata">

**Author:** ![yisrael-wix](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yisrael-wix/32/1107_2.png) [@yisrael-wix](https://forum.wixstudio.com/u/yisrael-wix)\
**Post date:** [November 12, 2020, 6:22am UTC](https://forum.wixstudio.com/t/wixcrm-notifications-notify-error/28252/5 "2020-11-12T06:22:36Z")

</div>

You will have to provide more information in order for us to assist. Share your code in a code block. Explain what you’re doing, what works, and what doesn’t.

Post the editor URL of your site and I’ll take a look. _Only authorized Wix personnel can get access to your site in the editor._ **Please include the name of the page involved. And make sure you explain how to reproduce the problem.**

---

<div class="post-metadata">

**Author:** ![shimistudio](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/shimistudio/32/7656_2.png) [@shimistudio](https://forum.wixstudio.com/u/shimistudio)\
**Post date:** [November 12, 2020, 6:40am UTC](https://forum.wixstudio.com/t/wixcrm-notifications-notify-error/28252/6 "2020-11-12T06:40:31Z")

</div>

Thanks!

link to the editor:

> **[Log In | Wix](https://users.wix.com/signin?originUrl=http%3A%2F%2Feditor.wix.com%2Fhtml%2Feditor%2Fweb%2Frenderer%2Fedit%2F51154d7a-5319-4586-8723-3f882fc79306%3FmetaSiteId%3D017eb0da-d484-4423-9d19-a8092eb4e47d%26editorSessionId%3Da718b4e6-19a0-458a-9cf7-a1d21b21ea39%26referralInfo%3Dmy-account&redirectTo=http%3A%2F%2Feditor.wix.com%2Fhtml%2Feditor%2Fweb%2Frenderer%2Fedit%2F51154d7a-5319-4586-8723-3f882fc79306%3FmetaSiteId%3D017eb0da-d484-4423-9d19-a8092eb4e47d%26editorSessionId%3Da718b4e6-19a0-458a-9cf7-a1d21b21ea39%26referralInfo%3Dmy-account&overrideLocale=en&forceRender=true)**
>
> Login to Wix.com

I have many notifications on my site. it was functioning great until the 2nd of November. all of them stopped working at the same time without me changing anything.

I tried to update the code according to the updated API, but the error remains the same: I don’t receive notifications at all and I see this error:  
**Unhandled rejection TypeError: logger.debug is not a function**

That’s my code to one of my notifications. it’s on my **MasterPage.Js** , it should give me a notification each time a person clicks the green box on the button left side of the page.

my domain: [www.sbe-studio.com](http://www.sbe-studio.com)

Front end:

```javascript
import { notifyWhatsapp } from 'backend/notifications';

export function box38_click(event) {
    notifyWhatsapp();
}

```

Back end:

```javascript
import { notifications } from 'wix-crm-backend';

export function notifyWhatsapp() {
    notifications.notify(
    "לחיצה על פניית וואטסאפ מהאתר",
    ["Dashboard", "Mobile", "Browser"], 
    {
     "title": "וואטסאפ מהאתר",
     "recipients": { "role": "Owner" }
     }
     );
}

```

Thanks! 🙂
