mobx-session
mobx-session copied to clipboard
ReactJS app not loading when iframed into another page with Mobx sessions in private/incognito mode
Intended outcome: Take our ReactJS app, which is using Mobx sessions, iframe it into another website (cross-origin), iframe should function as normal when the user is browsing in private or incognito mode.
Actual outcome: Our ReactJS app is using Mobx sessions to store data. When we take our ReactJS app and iframe it onto another website (cross-origin), the website in the iframe does not load when the user is navigating in private or incognito mode.
The error that is being logged in the console is:
Uncaught (in promise) Error: No available storage method found at driverPromiseLoop (localforage.js:2718)
It looks like this is an issue with the localforage package, with is a dependency for Mobx sessions
Notes:
- it works as expected not in private/incognito mode
- if you navigate to the iframed website on its own, in private mode, it works as expected
Versions
- "react": "^16.13.1",
- "mobx": "^5.15.7",
- "mobx-react": "^6.3.0",
- "mobx-session": "^1.0.0",