Embedding error

Good call, I tried it out on our staging site but unfortunately it didn’t fix things…

On Chrome I see errors like the following:

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://test-discourse.comses.net') does not match the recipient window's origin ('https://test.comses.net').

(from The Garbage Can Model of Organizational Choice)

Other people here seemed to be able to fix this by ensuring that the DiscourseEmbed.discourseEmbedUrl was the same as the referring URL but I verified that it was still correct… I poked around the Discourse logs (should I be looking at /var/discourse/shared/standalone/log/rails/production.log ?) but didn’t see any errors there either… any other ideas on places to look to troubleshoot this?

An example from the Discourse logs:

Started GET "/embed/comments?embed_url=https%3A%2F%2Ftest.comses.net%2Fcodebases%2Ff0613922-9cb1-4656-a26c-af57f823fb69%2Freleases%2F3.2.0%2F" for 72.201.57.141 at 2020-08-05 05:15:40 +0000
Processing by EmbedController#comments as HTML
  Parameters: {"embed_url"=>"https://test.comses.net/codebases/f0613922-9cb1-4656-a26c-af57f823fb69/releases/3.2.0/"}
  Rendering embed/loading.html.erb within layouts/embed
  Rendered embed/loading.html.erb within layouts/embed (Duration: 0.4ms | Allocations: 134)
Completed 200 OK in 91ms (Views: 1.8ms | ActiveRecord: 0.0ms | Allocations: 16308)
Started GET "/service-worker-c8000968830b6f6bd33f1e842dffdd569664119d449f93dc7d428d963a71635d.js" for 72.201.57.141 at 2020-08-05 05:15:42 +0000
Processing by StaticController#service_worker_asset as */*
  Rendering text template
  Rendered text template (Duration: 0.0ms | Allocations: 1)
Completed 200 OK in 27ms (Views: 1.3ms | ActiveRecord: 0.0ms | Allocations: 6617)