Support Topics Documentation Slack YouTube Blog

Backendless.Messaging.publishSync is not a function

i’m getting this error now. not there before.

Uncaught TypeError: Backendless.Messaging.publishSync is not a function

How do you import Backendless SDK for JS into your app?

<script src=""></script>

This is not a good idea since whenever library changes, it may impact your code (like now). The blocking methods had been deprecated for a while and in version 6.0 (the latest one), they have been removed. Rather than importing from /latest/, you should import a specific version of the library, for example, this should work for you:

<script src=""></script>

We describe in the docs how to import a specific version of the library.


you guys should put a warning on the docs that its no longer supported

It is still supported in all versions prior to 6.0. There has bee a warning for about a year now in your code that the functions are deprecated.


Nothing that i can see even now.
and i still think a big red warning in the JS docs will help others in the future :slightly_smiling_face:

Hello @mohammad_altoiher

We have been printing the following warnings in browser’s console for more that two years, see when it was added

To get almost same result in your code you can use async/await which is support by all modern browsers

const result = await Backendless.Messaging.publish('default', { foo: 123, message: 'hello' })

Regards, Vlad

1 Like