# PWA and service workers on Bubble

**URL:** <https://forum.bubble.io/t/pwa-and-service-workers-on-bubble/95484>\
**Category:** Questions\
**Created:** [June 4, 2020, 9:30pm UTC](https://forum.bubble.io/t/pwa-and-service-workers-on-bubble/95484 "2020-06-04T21:30:01Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrew.kruk](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/andrew.kruk/32/60110_2.png) [@andrew.kruk](https://forum.bubble.io/u/andrew.kruk)\
**Post date:** [June 4, 2020, 9:30pm UTC](https://forum.bubble.io/t/pwa-and-service-workers-on-bubble/95484/1 "2020-06-04T21:30:01Z")

</div>

Starting from Bubble version 6, you cannot store files straight in the root directory. Well, technically, you can upload files, but now file requests redirect to download from S3.

So service workers file that should be hosted on the root directory

“[domain.com/sw.js](http://domain.com/sw.js)”

For real would be hosted on S3

“[s3.amazonaws.com/.../sw.js](http://s3.amazonaws.com/.../sw.js)”

 ![root](https://us1.discourse-cdn.com/bubble/original/3X/0/2/0243401d77f59e9def6c371224c474a8911b0bf2.jpeg)

As you know, it’s impossible to build full-fledged PWA w/o service workers. But sw.js file can’t be settled on a different domain than the pages it controls. And in case you’re trying to claim that sw.js hosted on your domain, the browser doesn’t register it, because it understands that file is under redirect.

 ![redirect](https://us1.discourse-cdn.com/bubble/original/3X/d/e/de7d32cf6ae7e4b5681934189492d46d3b6b257b.jpeg)

Additionally, the place where sw.js hosted affects the maximum scope of the service worker’s control, and to give him access to the whole app, you need to place the sw.js file at the “top-level” (root directory).

Yeah, you still can run manifest.json from an external source, but that’s not a whole thing you need for real PWA.

So, the question is the following.  
Did someone manage to get the service workers run from S3 or any other external source? Or maybe you found a method to make it work in another way on Bubble version 6 version and higher?

---

<div class="post-metadata">

**Author:** ![sudsy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sudsy/32/114637_2.png) [@sudsy](https://forum.bubble.io/u/sudsy)\
**Post date:** [June 5, 2020, 12:08am UTC](https://forum.bubble.io/t/pwa-and-service-workers-on-bubble/95484/2 "2020-06-05T00:08:10Z")

</div>

> [@andrew.kruk](#):
>
> Starting from Bubble version 6, you cannot store files straight in the root directory. Well, technically, you can upload files, but now file requests redirect to download from S3.

Are you sure that’s not a bug? After all, it says right there in your screenshot…

`Hosted root files let you expose a file at yourdomain.com/filename.`

I’d suggest submitting a [bug report](https://bubble.io/bug_report).

---

<div class="post-metadata">

**Author:** ![AliFarahat](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/alifarahat/32/189604_2.png) [@AliFarahat](https://forum.bubble.io/u/AliFarahat)\
**Post date:** [June 5, 2020, 1:20am UTC](https://forum.bubble.io/t/pwa-and-service-workers-on-bubble/95484/3 "2020-06-05T01:20:41Z")

</div>

It is a bug, I reported 2 weeks ago and they are working on it.

---

<div class="post-metadata">

**Author:** ![andrew.kruk](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/andrew.kruk/32/60110_2.png) [@andrew.kruk](https://forum.bubble.io/u/andrew.kruk)\
**Post date:** [June 5, 2020, 8:06am UTC](https://forum.bubble.io/t/pwa-and-service-workers-on-bubble/95484/4 "2020-06-05T08:06:18Z")

</div>

Well, technically, it’s not a bug itself, cuz you’re still able to upload files to [yourdomain.com/filename](http://yourdomain.com/filename), the only thing - that file will be under redirect. And it’s okay for many cases, but not for service workers.

I chatted with support on this matter. The only thing they can suggest for now - downgrade to v.5. Obviously, staying forever on the outdated version of Bubble doesn’t sound like an elegant solution for me.

And yeah, they are " hoping to improve this function in the future."  
But you know how it works if only two users are complaining (myself and @AliFarahat ), they can put it on the back-burner, and we’ll wait for fixes for a very long time.  
That’s why I’m looking for a solution to force sw.js register and install from external sources.

---

<div class="post-metadata">

**Author:** ![AliFarahat](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/alifarahat/32/189604_2.png) [@AliFarahat](https://forum.bubble.io/u/AliFarahat)\
**Post date:** [June 5, 2020, 9:53pm UTC](https://forum.bubble.io/t/pwa-and-service-workers-on-bubble/95484/5 "2020-06-05T21:53:32Z")

</div>

Hey Andrew

We have tryed different solutions for 5 days and there are none. The file must be served from the same domain and path to be considered secured.

The browser will not allow anything else and it is part of the PWA specs. We have also tried generating the file using a blob bit that wind work for two reasons. 1st it’s not a valid protocol and 2nd you can control the blobs name.

As whether it’s a bug or not? well… It is as the v5 and before have done it correctly and now it does not. A redirect basically means the file is not hosted at root.

We have invested so much time and money building our PWAs and serviceworkers the right way now it’s basically on hold till 5his bug is resolved. I can see the bug that I reported has a report attached to it but still underway…

Hope is all I have left for this fix to be pushed out soon.

---

<div class="post-metadata">

**Author:** ![lucas.ar](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/lucas.ar/32/63393_2.png) [@lucas.ar](https://forum.bubble.io/u/lucas.ar)\
**Post date:** [June 6, 2020, 4:18pm UTC](https://forum.bubble.io/t/pwa-and-service-workers-on-bubble/95484/6 "2020-06-06T16:18:45Z")

</div>

hello there, is the bug reported on the [public bug reports](http://forum.bubble.io/t/new-page-to-track-your-bugs/89194) ?

Anyways, I’m interested to follow the outcome for PWA on Bubble

---

<div class="post-metadata">

**Author:** ![andrew.kruk](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/andrew.kruk/32/60110_2.png) [@andrew.kruk](https://forum.bubble.io/u/andrew.kruk)\
**Post date:** [June 7, 2020, 11:01pm UTC](https://forum.bubble.io/t/pwa-and-service-workers-on-bubble/95484/7 "2020-06-07T23:01:02Z")

</div>

Hi Ali,

Yeah, I couldn’t agree more.  
Even if technically, Bubble informed us in the version message saying:

 ![v6](https://us1.discourse-cdn.com/bubble/original/3X/f/c/fc0cf24cc53a9ff815b7ad6f705b64c764de02e1.jpeg)  
That doesn’t make it any better for people like us.

Hope we don’t have to wait months for that fix. Cuz I tried all the known methods, and nothing works for me as well.

@lucas.ar

I believe it’s up to the support team to decide whether to post it as [reported bugs](https://bubble.io/reported-bugs) or not. The only thing we can do it’s reporting the bug.

I’ll post here if I get any news on my bug report.

---

<div class="post-metadata">

**Author:** ![lucas.ar](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/lucas.ar/32/63393_2.png) [@lucas.ar](https://forum.bubble.io/u/lucas.ar)\
**Post date:** [June 8, 2020, 8:33am UTC](https://forum.bubble.io/t/pwa-and-service-workers-on-bubble/95484/8 "2020-06-08T08:33:38Z")

</div>

Did they defined as a bug (meaning correcting) or more of a side effect and analysing if they are taking the time to modify ?

---

<div class="post-metadata">

**Author:** ![AliFarahat](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/alifarahat/32/189604_2.png) [@AliFarahat](https://forum.bubble.io/u/AliFarahat)\
**Post date:** [June 8, 2020, 5:26pm UTC](https://forum.bubble.io/t/pwa-and-service-workers-on-bubble/95484/9 "2020-06-08T17:26:48Z")

</div>

Hey all,

Yes it is a bug. Latest information is it will be resolved sometime next week maybe

---

<div class="post-metadata">

**Author:** ![jroberts](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@jroberts](https://forum.bubble.io/u/jroberts)\
**Post date:** [June 18, 2020, 3:32pm UTC](https://forum.bubble.io/t/pwa-and-service-workers-on-bubble/95484/10 "2020-06-18T15:32:12Z")

</div>

Anyone have an update on this? I’m just getting ready to tackle a PWA and SW but don’t need to spin my wheels if this is still an issue.  
Thanks!

---

<div class="post-metadata">

**Author:** ![lstk.kb](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/lstk.kb/32/163042_2.png) [@lstk.kb](https://forum.bubble.io/u/lstk.kb)\
**Post date:** [July 23, 2020, 1:18pm UTC](https://forum.bubble.io/t/pwa-and-service-workers-on-bubble/95484/11 "2020-07-23T13:18:38Z")

</div>

I am currently exploring the possibility of using this technology for the bubble. Any information on how to fix the error?

---

<div class="post-metadata">

**Author:** ![AliFarahat](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/alifarahat/32/189604_2.png) [@AliFarahat](https://forum.bubble.io/u/AliFarahat)\
**Post date:** [July 23, 2020, 1:29pm UTC](https://forum.bubble.io/t/pwa-and-service-workers-on-bubble/95484/12 "2020-07-23T13:29:41Z")

</div>

I believe the error has been fixed already
