An Exception Occurred While Rating Widget Running
Application Type
Service Studio Version
11.10.14 (Build 39806)

Hi, guys!

    When I use the rating widget in the web block and try to use the web block in the page's Popup. An excpetion "Cannot read property 'querySelector' of null" occurred after the Popup loaded. I did some tests and I can sure the exception is casued by the rating widget.

    Did anyone met the same situation as me? And how can I solve the problem? I really need your help (T.T) .

Best regards.   

Hi Lu,

Can you please share your OML to look into the issue?

Thanks & Kind Regards,


I create a test application and this problem will always happens in the popup.


Hi Lu,

I have spent some time on this and found that if we remove block from popup it is appearing without any error message. It is only when we add rating block on the popup and making it to appear when screen is loading which is causing the issue and giving error message. 

I agree with @Rahul Kumar that DOM is not getting ready to pull and display the different rating on the popup during screen rendering. So, I would suggest here to make the popup visible on button click or some other event.

Thanks & Kind Regards,


Hi lu jiangjun,

Check this link How to use Rating Pattern -  Rating Pattern

And also read about querySelector .

querySlector- representing the first element that matches the specified CSS selector(s). If no matches are found, null is returned.  

 So what happening , you are trying to select rating value where DOM is not completely available. (Because You are putting ratting pattern in Pop up).

Thank You.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.