You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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: #267
Steps to reproduce
Have a page that sends traces / logs / events via e.g. a button click.
Add an iframe that embeds this exact page
Send data from outside of the iframe
Send data from within the iframe
Compare the session ids - they should match
Wait for a session to timeout e.g. due to 15min inactivity
Send data again and compare the session_ids:
The one from outside of the iframe will have a new session_id
The one from within the iframe will have the initial session_id
Expected behavior
session_id should get updated in both cases
Actual behavior
session_id in iframe does not get updated
Environment
SDK version: "@grafana/faro-web-sdk": "^1.8.1"
SDK instrumentations: SessionInstrumentation
Device type: Desktop
Device name: Macbook
OS: MacOS
Browser: Chrome
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:
Context
The text was updated successfully, but these errors were encountered:
Do both documents share the same origin or are they from different origins?
Does each (parent page/iframe) use a separate Faro instance?
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).
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: #267
Steps to reproduce
Expected behavior
Actual behavior
Environment
Demo
Logs sent from outside of iframe after session update:
![Zrzut ekranu 2024-07-8 o 12 06 36](https://private-user-images.githubusercontent.com/175007507/346519936-d53e2b3b-cd28-4318-85b8-36abe0c211d5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5MzkxNzgsIm5iZiI6MTczOTkzODg3OCwicGF0aCI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MzAwJlgtQW16LVNpZ25hdHVyZT0wZDcxZjNjYWRiNDUzODZiZTUzZmFhMzBiODMzMDZkZDA5MzNkZDA0ODI5MmEzYTQwNDUyMjAzYjZkNzYwNDU5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.ovA_VG3YodvIkrrTTDVAjRoqNXnXleWw-5_blE53PsQ)
![Zrzut ekranu 2024-07-8 o 12 07 46](https://private-user-images.githubusercontent.com/175007507/346519953-c99de293-14db-4c2f-89c8-1e1bc0f1c8af.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5MzkxNzgsIm5iZiI6MTczOTkzODg3OCwicGF0aCI6Ii8xNzUwMDc1MDcvMzQ2NTE5OTUzLWM5OWRlMjkzLTE0ZGItNGMyZi04OWM4LTFlMWJjMGYxYzhhZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxOVQwNDIxMThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lN2E5OTdhODQwNTg1NTY0YTFkMzk3NjU5YzQ1Yzg5ZmJhMDNhZjY2NzRlNTZiZjVhZDc2NjNhN2E4YWVjMTkwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.eZHcLGhxS5AIF9pAZ1KDa4GPB6Hph2ETHvQB3Ord7DA)
![Zrzut ekranu 2024-07-8 o 12 07 32](https://private-user-images.githubusercontent.com/175007507/346519949-9c8928f9-cb31-475f-bf4e-11534ee5d654.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5MzkxNzgsIm5iZiI6MTczOTkzODg3OCwicGF0aCI6Ii8xNzUwMDc1MDcvMzQ2NTE5OTQ5LTljODkyOGY5LWNiMzEtNDc1Zi1iZjRlLTExNTM0ZWU1ZDY1NC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxOVQwNDIxMThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lYWUwOGM2MjEwMDY5MDMwMmUwN2I2NDc0NWFiNDRmMWViOThjODNhYmEwNjFiZWFkODQzYTBmMmNmNWY1YTZhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Juk4oiZ6IfVCXhtMbc8pEpuqlCMxXuJ81iAeRtpe64I)
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:
Context
The text was updated successfully, but these errors were encountered: