# Offline Support Issue

**URL:** <https://forum.codewithmosh.com/t/offline-support-issue/2185>\
**Category:** React Native\
**Created:** [January 22, 2021, 1:50pm UTC](https://forum.codewithmosh.com/t/offline-support-issue/2185 "2021-01-22T13:50:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![tt703](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@tt703](https://forum.codewithmosh.com/u/tt703)\
**Post date:** [January 22, 2021, 1:50pm UTC](https://forum.codewithmosh.com/t/offline-support-issue/2185/1 "2021-01-22T13:50:59Z")

</div>

In lesson 9 of RN parts 2, mosh turns off his wifi to check cached data. When i turn off my wifi, expo goes offline and i get this message:

 ![Screenshot 2021-01-22 at 6.32.25 PM](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/1X/a51de9588cbf0e4ae033f3195542daeefa667952.png)

---

<div class="post-metadata">

**Author:** ![dpickut](https://avatars.discourse-cdn.com/v4/letter/d/a87d85/32.png) [@dpickut](https://forum.codewithmosh.com/u/dpickut)\
**Post date:** [January 25, 2021, 7:59pm UTC](https://forum.codewithmosh.com/t/offline-support-issue/2185/2 "2021-01-25T19:59:25Z")

</div>

I ran into the same problem. I created a forum topic titled “React Native Advanced - caching with Async Storage - Tip” – did you take a look at that? That worked for me.

---

<div class="post-metadata">

**Author:** ![Lukkar](https://avatars.discourse-cdn.com/v4/letter/l/b782af/32.png) [@Lukkar](https://forum.codewithmosh.com/u/Lukkar)\
**Post date:** [February 1, 2021, 3:27pm UTC](https://forum.codewithmosh.com/t/offline-support-issue/2185/3 "2021-02-01T15:27:25Z")

</div>

Similar problem. I disabled wifi connection through “REact Native Debuger”. And I can’t upload the AppNavigator component.

Code the same as Mosh with this one difference that imported AsyncStorage from “@react-native-async-storage/async-storage”. Also, I have PC, and I check it on Andriod, but I’m don’t think it is an issue.

The previous one was deprecated.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/1X/326cf0d9607af50bcd3ac4622c649724d821a6d6.png)

---

<div class="post-metadata">

**Author:** ![bekzod](https://avatars.discourse-cdn.com/v4/letter/b/53a042/32.png) [@bekzod](https://forum.codewithmosh.com/u/bekzod)\
**Post date:** [May 22, 2021, 7:21pm UTC](https://forum.codewithmosh.com/t/offline-support-issue/2185/4 "2021-05-22T19:21:04Z")

</div>

You are just talking about library changes. This forum topic is different. This is about lesson 9 in part 2

---

<div class="post-metadata">

**Author:** ![bekzod](https://avatars.discourse-cdn.com/v4/letter/b/53a042/32.png) [@bekzod](https://forum.codewithmosh.com/u/bekzod)\
**Post date:** [May 22, 2021, 7:21pm UTC](https://forum.codewithmosh.com/t/offline-support-issue/2185/5 "2021-05-22T19:21:38Z")

</div>

Hello. Have you found a solution?

---

<div class="post-metadata">

**Author:** ![TermenVox](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@TermenVox](https://forum.codewithmosh.com/u/TermenVox)\
**Post date:** [August 19, 2021, 2:33pm UTC](https://forum.codewithmosh.com/t/offline-support-issue/2185/6 "2021-08-19T14:33:01Z")

</div>

Yes, I have the same issue.  
But additionally I have some funny thing. To emulate losing of connection I just turn off my backend server. Everything works pretty as expected, application tries to reach server, finally fails and download cache using AsyncStorage. But somehow I still able to see images 🙂 I can’t reach them using url, because obviously server is turned off, but Android emulator which I use saves them somewhere in its cache and uses them.

---

<div class="post-metadata">

**Author:** ![combyses](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@combyses](https://forum.codewithmosh.com/u/combyses)\
**Post date:** [February 7, 2022, 8:29am UTC](https://forum.codewithmosh.com/t/offline-support-issue/2185/7 "2022-02-07T08:29:14Z")

</div>

Couple things to keep in mind here:

1. Testing this on a device doesn’t work - I tried on iPhone - turned off wifi - shut down the data server and everything produced a connection error.

2. I tried it on Android emulator and shutting down the wifi as Mosh suggests does not work but shutting down data server make images disappear as mentioned in the lesson.

However, keep in mind that first couple of images will still show. I believe that is the Android cache in action. If you scroll down, on the rest of the items, there are no images on the listed items as expected.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![muhammadzakria](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@muhammadzakria](https://forum.codewithmosh.com/u/muhammadzakria)\
**Post date:** [January 7, 2023, 5:23pm UTC](https://forum.codewithmosh.com/t/offline-support-issue/2185/8 "2023-01-07T17:23:09Z")

</div>

when I turned my wifi off the metro disconnected and doesn’t work as expected

---

<div class="post-metadata">

**Author:** ![delboy1978uk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/delboy1978uk/32/4513_2.png) [@delboy1978uk](https://forum.codewithmosh.com/u/delboy1978uk)\
**Post date:** [August 21, 2023, 4:27pm UTC](https://forum.codewithmosh.com/t/offline-support-issue/2185/9 "2023-08-21T16:27:09Z")

</div>

The way to do this properly is install a proxy on the machine that you run expo on, and then use the proxy ip and port in your device’s wifi settings. Then every single request will go through your computer, and will go offline if you disable it. I use Proxyman, which used to be mac only but now has a windows version [https://proxyman.io/](https://proxyman.io/)

The other advantage of doing this is that you can install the proxy’s CA cert on your phone, meaning that whilst developing you can use a self signed SSL certificate (more info here [Using self signed certificates in a React Native project – DelBoys Place](https://delboy1978uk.wordpress.com/2022/10/16/using-self-signed-certificates-in-a-react-native-project/)).
