# Codesandbox demos on aurelia.io don't load with third-party cookies disabled

**URL:** <https://discourse.aurelia.io/t/codesandbox-demos-on-aurelia-io-dont-load-with-third-party-cookies-disabled/2040>\
**Category:** Site Feedback\
**Created:** [December 19, 2018, 10:09pm UTC](https://discourse.aurelia.io/t/codesandbox-demos-on-aurelia-io-dont-load-with-third-party-cookies-disabled/2040 "2018-12-19T22:09:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![timfish](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/timfish/32/1566_2.png) [@timfish](https://discourse.aurelia.io/u/timfish)\
**Post date:** [December 19, 2018, 10:09pm UTC](https://discourse.aurelia.io/t/codesandbox-demos-on-aurelia-io-dont-load-with-third-party-cookies-disabled/2040/1 "2018-12-19T22:09:30Z")

</div>

Because I’ve got “Block third-party cookies” enabled by default, it seems to block access to `localStorage`

I’ve opened an issue at [codesandbox-client](https://github.com/CompuIves/codesandbox-client/issues/1392) and a quick browse through the code, it looks like there is a unused `InMemoryStore` that it could fall back to in this case.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/aurelia/original/2X/c/c6f3d9f38562c6094b228c1b46b27a0765b47165.png)

---

<div class="post-metadata">

**Author:** ![bigopon](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/bigopon/32/18_2.png) [@bigopon](https://discourse.aurelia.io/u/bigopon)\
**Post date:** [December 20, 2018, 1:20am UTC](https://discourse.aurelia.io/t/codesandbox-demos-on-aurelia-io-dont-load-with-third-party-cookies-disabled/2040/2 "2018-12-20T01:20:13Z")

</div>

Probably any online editor will fail to work without cookies enabled for their site. Not sure what can be done though. Will it work by just enabling InMemoryStore?

---

<div class="post-metadata">

**Author:** ![timfish](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/timfish/32/1566_2.png) [@timfish](https://discourse.aurelia.io/u/timfish)\
**Post date:** [December 20, 2018, 4:12am UTC](https://discourse.aurelia.io/t/codesandbox-demos-on-aurelia-io-dont-load-with-third-party-cookies-disabled/2040/3 "2018-12-20T04:12:41Z")

</div>

I didn’t realise that blocking third-party cookies also blocked third party `localStorage` access, but it looks like that is where all the errors are coming from.

The code has two implementations of `SyncKeyValueStore`, the [`LocalStorageStore`](https://github.com/CompuIves/codesandbox-client/blob/13c9eda9bfaa38dec6a1699e31233bee388857bc/standalone-packages/codesandbox-browserfs/src/backend/LocalStorage.ts) and [`InMemoryStore`](https://github.com/CompuIves/codesandbox-client/blob/13c9eda9bfaa38dec6a1699e31233bee388857bc/standalone-packages/codesandbox-browserfs/src/backend/InMemory.ts). However, now I look a bit deeper, it looks like there are [plenty of other usages of `localStorage`](https://github.com/CompuIves/codesandbox-client/search?q=localstorage.getitem&unscoped_q=localstorage.getitem) throughout that repository which it might be tripping up on.

I would need to debug a bundled version to get a better idea of where its actually breaking.

---

<div class="post-metadata">

**Author:** ![timfish](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/timfish/32/1566_2.png) [@timfish](https://discourse.aurelia.io/u/timfish)\
**Post date:** [December 20, 2018, 4:28am UTC](https://discourse.aurelia.io/t/codesandbox-demos-on-aurelia-io-dont-load-with-third-party-cookies-disabled/2040/4 "2018-12-20T04:28:44Z")

</div>

I think many of the errors are caused by the `debug` module which uses `localStorage` in the browser and has no fallback:

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/aurelia/original/2X/9/91ab74bb2709a6fca1579028bb9827e122485c3e.png)

---

<div class="post-metadata">

**Author:** ![timfish](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/timfish/32/1566_2.png) [@timfish](https://discourse.aurelia.io/u/timfish)\
**Post date:** [December 20, 2018, 11:29am UTC](https://discourse.aurelia.io/t/codesandbox-demos-on-aurelia-io-dont-load-with-third-party-cookies-disabled/2040/5 "2018-12-20T11:29:05Z")

</div>

Looks like there is a fix:

> <https://github.com/CompuIves/codesandbox-client/commit/8e2fae0c1a6d1d0d67473362d92a24204975e1a6>
