simorgh icon indicating copy to clipboard operation
simorgh copied to clipboard

Bug - Flourish include expects only valid JSON but shared messaging API with ads

Open LilyL0u opened this issue 3 years ago • 0 comments

https://www.test.bbc.com/mundo/23263889

I had put a Flourish include on this test page. It was causing this application error to fail the E2E tests:

Screenshot 2022-03-02 at 15 21 35

With some digging by @andrewscfc, we found that the message.event is expecting JSON but it is also being used by ads on that page, and they are not sending valid json. This is why we get an unexpected token of a letter, and it varies what that letter is; that letter is what is being received first instead of the valid JSON opener {.

Now I am sure @andrewscfc can explain this better. If necessary I can get screenshots to give more detail.

I can put the include back in if it is needed for fixing the bug, but it does cause application errors in the simorgh pipeline e2es.

LilyL0u avatar Mar 04 '22 16:03 LilyL0u