Skip to content

Commit 6303d25

Browse files
authored
Merge pull request #11270 from Calinou/exporting-for-web-troubleshooting
Add a Troubleshooting section to Exporting for the Web
2 parents 829920c + a0d4ac9 commit 6303d25

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed

tutorials/export/exporting_for_web.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,46 @@ the export menu.
453453
* - Encryption / Encryption Key
454454
- ``GODOT_SCRIPT_ENCRYPTION_KEY``
455455

456+
.. _doc_exporting_for_web_troubleshooting:
457+
458+
Troubleshooting
459+
---------------
460+
461+
Running the export locally shows another project instead
462+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
463+
464+
If you use one-click deploy in multiple projects, you may notice that one
465+
of the projects you've previously deployed is shown instead of the project
466+
you're currently working on. This is due to service worker caching which
467+
currently lacks an automated cache busting mechanism.
468+
469+
As a workaround, you can manually unregister the current service worker
470+
so that the cache is reset. This also allows a new service worker to be registered.
471+
In Chromium-based browsers, open the Developer Tools by pressing
472+
:kbd:`F12` or :kbd:`Ctrl + Shift + I` (:kbd:`Cmd + Option + I` on macOS),
473+
then click on the Application tab in DevTools (it may be hidden behind a chevron
474+
icon if the devtools pane is narrow). You can either check
475+
:button:`Update on reload` and reload the page, or click :button:`Unregister`
476+
next to the service worker that is currently registered, then reload the page.
477+
478+
.. figure:: img/exporting_for_web_reset_unregister_service_worker_chromium.webp
479+
:align: center
480+
:alt: Unregistering the service worker in Chromium-based browsers' DevTools
481+
482+
Unregistering the service worker in Chromium-based browsers' DevTools
483+
484+
The procedure is similar in Firefox. Open developer tools by pressing
485+
:kbd:`F12` or :kbd:`Ctrl + Shift + I` (:kbd:`Cmd + Option + I` on macOS),
486+
click on the Application tab in DevTools (it may be hidden behind a chevron
487+
icon if the devtools pane is narrow). Click :button:`Unregister` next to the
488+
service worker that is currently registered, then reload the page.
489+
490+
.. figure:: img/exporting_for_web_reset_unregister_service_worker_firefox.webp
491+
:align: center
492+
:alt: Unregistering the service worker in Firefox's DevTools
493+
494+
Unregistering the service worker in Firefox's DevTools
495+
456496
Export options
457497
--------------
458498

22.7 KB
Loading
9.78 KB
Loading

tutorials/export/one-click_deploy.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,11 @@ Web > Use TLS**.
157157
the paths to the key and certificate files in the **Export > Web > TLS Key**
158158
and **Export > Web > TLS Certificate**. This will only work if the project
159159
is accessed through a domain name that is part of the TLS certificate.
160+
161+
.. warning::
162+
163+
When using one-click deploy on different projects, it's possible that
164+
a previously edited project is being shown instead. This is due to service
165+
worker caching not being cleared automatically. See
166+
:ref:`doc_exporting_for_web_troubleshooting` for instructions on unregistering
167+
the service worker, which will effectively clear the cache and resolve the issue.

0 commit comments

Comments
 (0)