Open smallcatpd opened 1 month ago
Hi @smallcatpd
Browsing contexts (like the parent page and the nested iframe) can only access resources in another if they share the same origin (protocol, host, and port).
Hi @codecapitano
Yes they share the same origin and use same faro instance.
All right thanks. Do you use the NPM or CDN version?
All right thanks. Do you use the NPM or CDN version?
NPM
Description
The session_id does not get updated in iframe which causes traces / events / logs sent from within an iframe to have the initial session_id value even though it already got updated due to e.g. inactivity. It doesn’t seem to matter whether the persistent or volatile sessions are being used. May be related to: https://github.com/grafana/faro-web-sdk/issues/267
Steps to reproduce
Expected behavior
Actual behavior
Environment
Demo
Logs sent from outside of iframe after session update:
Logs sent from within iframe after session update:
Traces sent from outside of iframe after session update:
Traces sent from within iframe after session update:
![Zrzut ekranu 2024-07-8 o 12 07 32](https://github.com/grafana/faro-web-sdk/assets/175007507/9c8928f9-cb31-475f-bf4e-11534ee5d654)
Context