react-livechat icon indicating copy to clipboard operation
react-livechat copied to clipboard

LiveChat in React site drops license

Open pieterbergmans opened this issue 7 years ago • 3 comments

Hi...I'm trying to install LiveChat on my react site. I'm using the react-livechat component. It works in my development environment (i.e. localhost) but it doesn't work in my staging or production environments. In those environments, I get the following error:

GET https://secure.livechatinc.com/licence/null/v2/get_dynamic_config.js?t=1567016999765&referrer=http%3A%2F%2Fredwavetech.com%2Fproducts%2Fthreatid&url=http%3A%2F%2Fredwavetech.com%2Fproducts%2Fthreatid&params=&channel_type=code&jsonp=__lc_data_480459 net::ERR_ABORTED 400 (Bad Request).

While it seems pretty clear to me that the license is not being passed correctly, it doesn't explain why it's being passed on my localhost and not in my staging/production environments. I've also tried installing LiveChat via the conventional way (i.e. the JS code snippet recommended by LiveChat during account creation) but I get the same error.

Any help would be appreciated.

Thanks.

pieterbergmans avatar Aug 28 '19 18:08 pieterbergmans

Did anyone manage to fix that?

Headmaster11 avatar May 16 '20 18:05 Headmaster11

I had this same problem. Try to add LiveChat with a hardcoded licence ID (not from env variables) - if it'll work, probably you have problem with env on production. In my case, I didn't export new env in webpack configuration

dawidholisz avatar Jun 10 '20 11:06 dawidholisz

Hello everyone 👋

I am happy to say that we have created a new set of packages to support more frontend frameworks integration with LiveChat Chat Widget: Chat Widget Adapters 🙂

From now on it will be the official, actively maintained repository for each framework-specific package that allows easy integration of LiveChat Chat Widget. The Hooks API is one part of the new React package: @livechat/widget-react.

You can give it a try as we didn't observe there such issues during the test. Your feedback would be much appreciated, thanks 🙌 🙂

walaszczykm avatar Jan 20 '22 11:01 walaszczykm